This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
14 / 35
Nov 2018

There was an issue, that geolocation features were broken in the most recent Android OS releases and this has been fixed several days ago, but not published yet

@mykola-mokhnach I’ve downloaded the io.appium.settings and installed the latest 2.9.0 build in device. But still I’m getting the same issue. I’m using android 8. When would I expect the latest changes to be published for this fix? Thanks!

It might an issue with the device itself or its settings. Can you attach the logcat output?

@mykola-mokhnach I’ve attached the logcat logs for Appium settings (io.appium.settings).

11-01 15:50:41.286: D/LocationInfoReceiver(28047): Getting current location
11-01 15:50:41.304: E/GPSTracker(28047): Appium Settings has no access to FINE location permission
11-01 15:50:41.310: E/GPSTracker(28047): Appium Settings has no access to COARSE location permission

After looking into these logs, I just enabled the location permission for Appium settings app. Then I can able to get the location information. This is fine for now. But it would be more fine if the location permission is enabled by default.

@mykola-mokhnach I need one more clarification regarding enable the location using Appium driver? Is there any way to do this? As of now I’m using ADB command to enable the location. But it would be much better if the method is available in Appium.

Appium does enable permissions for settings utility if it is installed not manually (it adds -g flag to adb install command). Although, if the tool is already installed and is up to date, then we don’t touch any other settings or permissions there.

No it is impossible to change that programmatically. Although you can try to do the switch in your script directly via Settings UI.

@mykola-mokhnach But it’s possible to run adb command in appium since I’ve seen in appium logs that the adb commands are getting executed to interact with devices. Then why can’t you do enable/disable location with appium since there are adb commands to enable/disable location? Can you take it as a feature request?

@mykola-mokhnach As of now I’m using the following ADB commands to enable/disable the location in device

CMD_GET_GLOBAL_LOCATION_STATUS = “adb shell settings get secure location_providers_allowed”;
CMD_ENABLE_GLOBAL_LOCATION = “adb shell settings put secure location_providers_allowed +network,gps”;
CMD_DISABLE_GLOBAL_LOCATION = “adb shell settings put secure location_providers_allowed -”;

But if you’re planning to add these chnages you need to check these commands are working for all android versions.

@mykola-mokhnach I’m getting the same parse error again while fetching the location using driver. I’m using fake gps app to mock the location. Once I set the fake location in device using fake gps app, I can’t able to see the output for driver.location().
Any ideas on how to make it work?

I just uninstall the appium settings and reinstalled again (2.9.0), All permissions are enabled. But still no luck.

LOG:

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot parse the actual location values from the command output: Broadcasting: Intent { act=io.appium.settings.location cmp=io.appium.settings/.receivers.LocationInfoReceiver launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } }
Broadcast completed: result=0, data=""

Okay @mykola-mokhnach Kindly guide me on how to solve the parse error while getting the location, that is most important for now. Is there any chance of an issue when some mock location set by some other apps in device. But I’ve uninstalled the fake gps app but still the problem persists.

Is there a way to stop(clear) the mock location in device using appium?

Yeah I’ve checked but the logs are not clear. I’ve attached the minimal log.

11-02 17:44:10.593 4615 4675 D ListenerMonitor_FLP: addListener, packageName : io.appium.settings , listener count : 1
11-02 17:44:10.594 7450 7589 I RemoteCall: (SystemEventReceiver, 3357) packageMonitor @ intent : android.intent.action.PACKAGE_RESTARTED
11-02 17:44:10.596 3854 6933 D LocationManagerService: request 3750da6 gps Request[ACCURACY_FINE gps requested=+1m0s0ms fastest=+1m0s0ms] from io.appium.settings(10509 background)
11-02 17:44:10.596 3854 6933 D LocationManagerService: provider request: gps ProviderRequest[ON interval=+10m0s0ms]
11-02 17:44:10.596 3854 6933 I GnssLocationProvider: WakeLock acquired by sendMessage(SET_REQUEST, 0, com.android.server.location.GnssLocationProvider$GpsRequest@76393e7)
11-02 17:44:10.596 4615 4675 E RequestManager_FLP: [LocationManagerService] Location request 3750da6 gps interval=60000 from io.appium.settings
11-02 17:44:10.596 3854 4581 D GnssLocationProvider: setRequest ProviderRequest[ON interval=+10m0s0ms]
11-02 17:44:10.597 3854 6933 D PermissionMonitor: we received permission notification for rUid: 10509, rPid: 6597from rModuleFlag: 8
11-02 17:44:10.597 3854 6933 I PermissionMonitor: Binder.getCallingUid(): 5013
11-02 17:44:10.597 3854 6933 I PermissionMonitor: packageName: io.appium.settings
11-02 17:44:10.597 3854 5442 D ConnectivityService: filterNetworkStateForUid() uid: 5013 networkInfo: [type: WIFI[] - WIFI, state: CONNECTED/CONNECTED, reason: (unspecified), extra: “p15”, failover: false, available: true, roaming: false, metered: false]
11-02 17:44:10.597 6597 6597 D GPSTracker: GPS enabled. Getting FINE location
11-02 17:44:10.597 3854 4581 D GnssLocationProvider: startNavigating, singleShot is false
11-02 17:44:10.597 3854 4581 D GnssLocationProvider: setting position_mode to standalone
11-02 17:44:10.597 3854 4798 D LocationManagerService: getLastLocation: Request[ACCURACY_FINE gps requested=0 fastest=0 num=1]
11-02 17:44:10.598 3854 6933 E PermissionMonitor: Calling app is not pre-installed on system. Ignore its notification. pkgName: io.appium.settings, UserId: 0
11-02 17:44:10.598 3495 3495 D libgps : GpsiHook: API: gpsSetPositionMode(GpsiHookStateIdle: e,c,g)
11-02 17:44:10.598 3495 3495 D libgps : proxy__gps_set_position_mode(0, 0, 1000, 0, 0)
11-02 17:44:10.598 3495 3495 D libgps : GpsiHook: API: gpsStart(GpsiHookStateIdle: e,c,g)
11-02 17:44:10.598 3495 3495 D libgps : GpsiHookStateIdle : EXIT
11-02 17:44:10.598 3495 3495 D libgps : GpsiHookStateGps : ENTRY
11-02 17:44:10.598 3495 3495 D libgps : [proxy__gps_start][line = 1088]: called.
11-02 17:44:10.598 3495 3495 D libgps : GpsiHook: API: gpsStatusCb(GpsiHookStateGps: e,c,g)
11-02 17:44:10.599 3854 6933 E PermissionMonitor: We found matching pid. (uid, pid) : (10509, 6597
11-02 17:44:10.599 3854 6933 E PermissionMonitor: calling = io.appium.settings8, currentTime = 1541160850599, lastTime = 1541157617781
11-02 17:44:10.599 3854 6933 D PermissionMonitor: All conditions are satisfied, report app access now.
11-02 17:44:10.599 3854 4581 V GnssLocationProvider: reportStatus status: 3
11-02 17:44:10.599 3495 3495 D libgps : GpsiHook: API: gpsStatusCb(GpsiHookStateGps: e,c,g)
11-02 17:44:10.599 3854 4581 V GnssLocationProvider: reportStatus status: 1
11-02 17:44:10.600 3854 4581 D GnssLocationProvider: send an intent to notify GPS has been enabled or disabled mNavigating = true
11-02 17:44:10.601 3495 4587 D libgps : OnGpsExtensionMessage: message_id(11), data(0x775fe27044), size(4)
11-02 17:44:10.601 3495 4587 D libgps : [OnGpsExtensionMessage] Received: MSG_SET_LOG_LEVEL(2)
11-02 17:44:10.602 3495 4587 D libgps : OnGpsExtensionMessage: message_id(6), data(0x0), size(0)
11-02 17:44:10.607 6895 7098 I OpenGLRenderer: prepareTree mLayerUpdateQueue is not empty, size = 3
11-02 17:44:10.607 6895 7098 I OpenGLRenderer: name = RelativeLayout, size (1080, 1942)
11-02 17:44:10.607 6895 7098 I OpenGLRenderer: name = FrameLayout, size (1080, 1942)
11-02 17:44:10.607 6895 7098 I OpenGLRenderer: name = LinearLayout, size (1080, 1942)
11-02 17:44:10.612 3854 4493 D PermissionMonitor: we received permission notification for rUid: 10509, rPid: 6597from rModuleFlag: 8
11-02 17:44:10.612 3854 4493 I PermissionMonitor: Binder.getCallingUid(): 5013
11-02 17:44:10.612 3854 4493 I PermissionMonitor: packageName: io.appium.settings
11-02 17:44:10.616 3854 4493 E PermissionMonitor: Calling app is not pre-installed on system. Ignore its notification. pkgName: io.appium.settings, UserId: 0
11-02 17:44:10.617 3854 4581 D SamsungAlarmManager: setInexact Intent (T:2/F:8/AC:false) 20181102T174510 - CU:1000/CP:3854
11-02 17:44:10.617 7514 7514 D HealthDataStore: Service for HealthDataStore is connected
11-02 17:44:10.617 3854 4581 I GnssLocationProvider: WakeLock released by handleMessage(SET_REQUEST, 0, com.android.server.location.GnssLocationProvider$GpsRequest@76393e7)
11-02 17:44:10.618 4615 4676 D GnssStatusListener_FLP: GPS Engine started
11-02 17:44:10.619 3854 5442 D ConnectivityService: filterNetworkStateForUid() uid: 5013 networkInfo: [type: WIFI[] - WIFI, state: CONNECTED/CONNECTED, reason: (unspecified), extra: “p15”, failover: false, available: true, roaming: false, metered: false]
11-02 17:44:10.620 3854 4493 E PermissionMonitor: We found matching pid. (uid, pid) : (10509, 6597
11-02 17:44:10.620 3854 4493 E PermissionMonitor: calling = io.appium.settings8, currentTime = 1541160850620, lastTime = 1541160850599
11-02 17:44:10.620 3854 4493 I PermissionMonitor: isCalledPkg is in effect. Ignore.
11-02 17:44:10.622 4623 21833 E NetworkScheduler: Invalid component specified.
11-02 17:44:10.625 3854 5442 D StorageManagerService: getExternalStorageMountMode : 1
11-02 17:44:10.626 3854 5442 D StorageManagerService: getExternalStorageMountMode : 3
11-02 17:44:10.626 3854 5442 D StorageManagerService: getExternalStorageMountMode : final mountMode=1, uid : 10039, packageName : com.sec.android.service.health
11-02 17:44:10.626 3854 5442 I ApplicationPolicy: isApplicationExternalStorageWhitelisted:com.sec.android.service.health user:0
11-02 17:44:10.626 3854 5442 D ApplicationPolicy: isApplicationExternalStorageWhitelisted: DO is not enabled on user 0. Allowed.
11-02 17:44:10.626 3854 5442 D ActivityManager: package com.sec.android.service.health, user - 0 is SDcard whitelisted
11-02 17:44:10.626 3854 5442 I ApplicationPolicy: isApplicationExternalStorageBlacklisted:com.sec.android.service.health user:0
11-02 17:44:10.626 3854 5442 D ApplicationPolicy: isApplicationExternalStorageBlacklisted: DO is not enabled on user 0. Allowed.
11-02 17:44:10.632 7514 7514 D HealthDataStore: HealthConnectionErrorResult code : 9
11-02 17:44:10.635 3854 5528 D ConnectivityService: filterNetworkStateForUid() uid: 10030 networkInfo: [type: WIFI[] - WIFI, state: CONNECTED/CONNECTED, reason: (unspecified), extra: “p15”, failover: false, available: true, roaming: false, metered: false]
11-02 17:44:10.635 3854 4798 D ConnectivityService: filterNetworkStateForUid() uid: 10030 networkInfo: [type: WIFI[] - WIFI, state: CONNECTED/CONNECTED, reason: (unspecified), extra: “p15”, failover: false, available: true, roaming: false, metered: false]
11-02 17:44:10.644 7595 7595 E Zygote : isWhitelistProcess - Process is Whitelisted
11-02 17:44:10.645 3854 5442 I ActivityManager: Start proc 7595:com.sec.android.service.health/u0a39 for content provider com.sec.android.service.health/.cp.MigrationCpProvider
11-02 17:44:10.645 7595 7595 W SELinux : SELinux selinux_android_compute_policy_index : Policy Index[2], Con:u:r:zygote:s0 RAM:SEPF_SM-N950F_8.0.0_0002, [-1 -1 -1 -1 0 1]
11-02 17:44:10.647 7595 7595 I SELinux : SELinux: seapp_context_lookup: seinfo=platform, level=s0:c512,c768, pkgname=com.sec.android.service.health
11-02 17:44:10.647 7514 7514 D HealthConsole: Service for HealthDataConsole is connected
11-02 17:44:10.649 7514 7514 D HealthDataStore: Trying to connect with Health Service fails (error code: 9)
11-02 17:44:10.650 7514 7514 E HealthDataStore: disconnectService: Context instance is invalid
11-02 17:44:10.650 6895 7098 D OpenGLRenderer: eglDestroySurface = 0x773f512d20
11-02 17:44:10.655 7480 7480 D HealthDataStore: Service for HealthDataStore is connected
11-02 17:44:10.656 6895 6895 D ViewRootImpl@536bc97[SplashActivity]: Relayout returned: old=[0,0][1080,2220] new=[0,0][1080,2220] result=0x5 surface={valid=false 0} changed=true
11-02 17:44:10.659 7480 7480 D HealthDataStore: HealthConnectionErrorResult code : 9
11-02 17:44:10.660 3854 5528 D SamsungAlarmManager: Cancel Alarm calling from uid:10030 pid :4623 / op:PendingIntent{da9b92c: PendingIntentRecord{d21438f com.google.android.gms broadcastIntent}}
11-02 17:44:10.661 7480 7480 D HealthConsole: Service for HealthDataConsole is connected
11-02 17:44:10.663 7480 7480 D HealthDataStore: Trying to connect with Health Service fails (error code: 9)
11-02 17:44:10.664 7480 7480 E HealthDataStore: disconnectService: Context instance is invalid
11-02 17:44:10.665 4623 24541 W Conscrypt: Could not set socket write timeout: java.net.SocketException: Socket closed
11-02 17:44:10.665 4623 24541 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@14366019@14.3.66 (040400-213742215):2)
11-02 17:44:10.665 4623 24541 W Conscrypt: at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.setSoWriteTimeout(:com.google.android.gms@14366019@14.3.66 (040400-213742215):2)
11-02 17:44:10.672 6895 7098 I OpenGLRenderer: prepareTree mLayerUpdateQueue is not empty, size = 2
11-02 17:44:10.672 6895 7098 I OpenGLRenderer: name = RelativeLayout, size (1080, 1942)
11-02 17:44:10.672 6895 7098 I OpenGLRenderer: name = LinearLayout, size (1080, 1942)
11-02 17:44:10.683 7031 7463 D NoSync : Called fsync
11-02 17:44:10.684 3854 4492 I ClientCertificateManager Service: fixContextInfoForMP() returning Caller uid: 10039 ,Container id: 0
11-02 17:44:10.685 3854 4492 I ClientCertificateManager Service: fixContextInfoForMP() returning Caller uid: 10039 ,Container id: 0
11-02 17:44:10.685 3854 4492 I ClientCertificateManager Service: ClientCertificateManager.isPremiumContainer() : false for user : 0
11-02 17:44:10.695 3854 5453 I ClientCertificateManager Service: fixContextInfoForMP() returning Caller uid: 10039 ,Container id: 0
11-02 17:44:10.695 3854 5453 I ClientCertificateManager Service: fixContextInfoForMP() returning Caller uid: 10039 ,Container id: 0
11-02 17:44:10.696 3854 5453 I ClientCertificateManager Service: ClientCertificateManager.isPremiumContainer() : false for user : 0
11-02 17:44:10.700 3854 5528 D SamsungAlarmManager: setInexact Intent (T:2/F:0/AC:false) 20181102T175200 - CU:10030/CP:4623
11-02 17:44:10.705 3854 4798 W StorageManager: getStorageLowBytes lowPercent : 5, lowBytes : 2853089689, maxLowBytes : 524288000
11-02 17:44:10.709 7595 7595 D ActivityThread: Added TimaKeyStore provider
11-02 17:44:10.712 3854 6933 I ActivityManager: DSS on for com.sec.android.service.health and scale is 1.0
11-02 17:44:10.712 3854 5528 D ConnectivityService: filterNetworkStateForUid() uid: 10189 networkInfo: [type: WIFI[] - WIFI, state: DISCONNECTED/BLOCKED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false, metered: false]
11-02 17:44:10.715 6895 7102 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
11-02 17:44:10.726 3854 4798 D ConnectivityService: filterNetworkStateForUid() uid: 10030 networkInfo: [type: WIFI[] - WIFI, state: CONNECTED/CONNECTED, reason: (unspecified), extra: “p15”, failover: false, available: true, roaming: false, metered: false]
11-02 17:44:10.727 3854 4493 D ConnectivityService: filterNetworkStateForUid() uid: 10030 networkInfo: [type: WIFI[] - WIFI, state: CONNECTED/CONNECTED, reason: (unspecified), extra: “p15”, failover: false, available: true, roaming: false, metered: false]
11-02 17:44:10.730 3854 3882 W BroadcastQueue: Permission Denial: broadcasting Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) } from null (pid=-1, uid=-1) requires com.facebook.permission.prod.FB_APP_COMMUNICATION due to registered receiver BroadcastFilter{53bf7cf u0 ReceiverList{32702e 7031 com.facebook.katana/10122/u0 remote:29622a9}}
11-02 17:44:10.730 6895 7073 I System.out: pool-3-thread-1 calls detatch()
11-02 17:44:10.733 3854 6933 D SamsungAlarmManager: Cancel Alarm calling from uid:10030 pid :4623 / op:PendingIntent{923c55c: PendingIntentRecord{d21438f com.google.android.gms broadcastIntent}}
11-02 17:44:10.740 6895 6895 W Verve : 2018-11-02 17:44:10.739;Warning;Ads;VerveBannerAdAdapter-loadBannerAd-onAdError;[Verve ads] Could not load ad because of: BAD_RESPONSE, cause: [invalid request], AdView@: 181752760
11-02 17:44:10.747 7595 7595 I zygote : no shared libraies, dex_files: 1
11-02 17:44:10.749 3854 4493 W StorageManager: getStorageLowBytes lowPercent : 5, lowBytes : 2853089689, maxLowBytes : 524288000
11-02 17:44:10.751 3854 4798 W StorageManager: getStorageLowBytes lowPercent : 5, lowBytes : 2853089689, maxLowBytes : 524288000
11-02 17:44:10.760 3854 4493 W StorageManager: getStorageLowBytes lowPercent : 5, lowBytes : 2853089689, maxLowBytes : 524288000
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.attribution.AttributionIdService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.common.errorreporting.memory.MemoryDumpUploadService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.globallibrarycollector.GlobalLibraryCollectorService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.browser.lite.BrowserLiteIntentService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.browser.lite.BrowserLiteFallbackIntentService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.contacts.service.ContactLocaleChangeService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.account.login.notification.LoginNotificationService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.analytics.appstatelogger.AppStateIntentService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.analytics2.logger.LollipopUploadService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.appupdate.DownloadCompleteService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.backgroundlocation.process.BackgroundLocationGatheringService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.backgroundlocation.reporting.periodic.PeriodicSignalCollectorJobService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.763 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.battery.monitor.ContinuousBatteryMonitorService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.764 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.common.dextricks.DexOptimization$Service is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.764 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.compost.service.CompostNotificationService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.764 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.conditionalworker.ConditionalWorkerService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.764 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.confirmation.service.BackgroundVoiceCallConfirmationService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.764 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.delayedworker.DelayedWorkerService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.764 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.displaytimeinvalidation.service.DisplayTimeBlockIntentService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.764 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.lite.messagingapps.FirstPartyMessagingAppsDetectionService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.764 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.fbservice.service.BlueServiceJobIntentService is missing meta key com.facebook.common.jobscheduler.compat.jobIds
11-02 17:44:10.765 7031 7463 W fb4a.ServiceInfoParser: X.46T: Service com.facebook.feed.platformads.AppInstallService is missing meta key com.facebook.common.jobscheduler.compat.jobIds

16 days later