{"action":"created","issue":{"url":"https://api.github.com/repos/mauron85/cordova-plugin-background-geolocation/issues/404","repository_url":"https://api.github.com/repos/mauron85/cordova-plugin-background-geolocation","labels_url":"https://api.github.com/repos/mauron85/cordova-plugin-background-geolocation/issues/404/labels{/name}","comments_url":"https://api.github.com/repos/mauron85/cordova-plugin-background-geolocation/issues/404/comments","events_url":"https://api.github.com/repos/mauron85/cordova-plugin-background-geolocation/issues/404/events","html_url":"https://github.com/mauron85/cordova-plugin-background-geolocation/issues/404","id":314103503,"number":404,"title":"Android App Crashes as soon as it hits BackgroundGeolocation.start()","user":{"login":"onkar0777","id":4092102,"avatar_url":"https://avatars3.githubusercontent.com/u/4092102?v=4","gravatar_id":"","url":"https://api.github.com/users/onkar0777","html_url":"https://github.com/onkar0777","followers_url":"https://api.github.com/users/onkar0777/followers","following_url":"https://api.github.com/users/onkar0777/following{/other_user}","gists_url":"https://api.github.com/users/onkar0777/gists{/gist_id}","starred_url":"https://api.github.com/users/onkar0777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onkar0777/subscriptions","organizations_url":"https://api.github.com/users/onkar0777/orgs","repos_url":"https://api.github.com/users/onkar0777/repos","events_url":"https://api.github.com/users/onkar0777/events{/privacy}","received_events_url":"https://api.github.com/users/onkar0777/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-13T13:17:10Z","updated_at":"2018-04-13T17:28:50Z","closed_at":null,"author_association":"NONE","body":"<!-- PLEASE DON'T DELETE THIS TEMPLATE, OR YOUR ISSUE WILL BE CLOSED/IGNORED !!! -->\r\n\r\n<!--- Provide a general summary of the issue in the Title above -->\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n* Plugin version: 3.0.0-alpha.14 (tried with 2.3.5 as well)\r\n* Platform: Android\r\n* OS version: 6.0.1\r\n* Device manufacturer and model: OnePlus 2\r\n* Cordova version (`cordova -v`): 8.0.0\r\n* Cordova platform version (`cordova platform ls`): 7.0.0\r\n* Plugin configuration options: BackgroundGeolocation.configure({\r\n            locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER, (Tried with others also)\r\n            desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY,\r\n            stationaryRadius: 50,\r\n            distanceFilter: 50,\r\n            notificationTitle: 'Background tracking',\r\n            notificationText: 'Enabled for Vehicle Tracking',\r\n            debug: true,\r\n            interval: 10000,\r\n            fastestInterval: 5000,\r\n            activitiesInterval: 10000,\r\n            url: serverLocationUrl+'?routeId='+routeId,\r\n            httpHeaders: {\r\n                'authorization': $window.UTILITIES.LOCAL_STORAGE.get('auth')\r\n            },\r\n            // customize post properties\r\n            postTemplate: {\r\n                lat: '@latitude',\r\n                lon: '@longitude',\r\n                bear: '@bearing'\r\n            }\r\n        });\r\n* Link to your project:\r\n\r\n## Context\r\n<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->\r\nAs soon as the code reaches backgroundlocation.start() , the app crashes\r\n\r\n## Expected Behavior\r\n<!--- Tell us what should happen -->\r\nshould run and not crash\r\n\r\n## Actual Behavior\r\n<!--- Tell us what happens instead -->\r\napp crashed\r\n\r\n## Possible Fix\r\n<!--- Not obligatory, but suggest a fix or reason for the bug -->\r\n\r\n## Steps to Reproduce\r\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\r\n<!--- reproduce this bug include code to reproduce, if relevant -->\r\n1. The given example does not work for me, followed the same steps\r\n\r\n## Context\r\n<!--- How has this bug affected you? What were you trying to accomplish? -->\r\n\r\n## Debug logs\r\n<!-- Relevant parts from printAndroidLogs or printIosLogs.\r\nMore info in README.md section Debugging.\r\nIf you're reporting app crash also provide output of \"adb logcat\" -->\r\n\r\n04-13 18:38:22.412  4260   775 I Authzen : [DeviceStateSyncManager] The server is in sync with current state. Nothing to do\r\n04-13 18:38:22.629  1124  1124 I DeviceIdleController: updateChargingLocked: charging=true\r\n04-13 18:38:22.629  1124  1124 I DeviceIdleController: becomeActiveLocked, reason = charging\r\n04-13 18:38:22.636 11583 11583 D AbstractProcessor: onBatteryChange Percent:76 State:2 \r\n04-13 18:38:22.784  3800  4078 D NetworkController.MobileSignalController(3): onSignalStrengthsChanged signalStrength=SignalStrength: 99 0 -120 -160 -120 -1 -1 16 -111 -10 80 2147483647 2147483647 2 2 gsm|lte level=2 voicelevel=2 datalevel=2\r\n04-13 18:38:22.834  7402  7402 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.\r\n04-13 18:38:23.039  7402  7402 W Settings: Setting preferred_network_mode has moved from android.provider.Settings.Secure to android.provider.Settings.Global.\r\n04-13 18:38:23.457  4063  4063 D wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'\r\n04-13 18:38:23.462  4063  4063 D wpa_supplicant: CTRL-DEBUG: global_ctrl_sock-sendto: sock=11 sndbuf=212992 outq=0 send_len=48\r\n04-13 18:38:24.461   352   352 W auditd  : type=1400 \"ipacm\"\"/dev/socket/ipacm_log_file\"\r\n04-13 18:38:24.461   352   352 W auditd  : type=1400 \"ipacm\"\"/dev/socket/ipacm_log_file\"\r\n04-13 18:38:24.461   352   352 W auditd  : type=1400 \"ipacm\"\"/dev/socket/ipacm_log_file\"\r\n04-13 18:38:24.462   352   352 W auditd  : type=1400 \"ipacm\"\"/dev/socket/ipacm_log_file\"\r\n04-13 18:38:24.549  7402  7402 W Settings: Setting preferred_network_mode has moved from android.provider.Settings.Secure to android.provider.Settings.Global.\r\n04-13 18:38:24.550  7402  7402 W Settings: Setting preferred_network_mode has moved from android.provider.Settings.Secure to android.provider.Settings.Global.\r\n04-13 18:38:24.551  7402  7402 W Settings: Setting preferred_network_mode has moved from android.provider.Settings.Secure to android.provider.Settings.Global.\r\n04-13 18:38:25.035 29487 29487 D SystemWebChromeClient: file:///android_asset/www/js/angular/controllers/map-controller.js: Line 10 : 5ad08553a5172c2e88b2e8e3\r\n04-13 18:38:25.035 29487 29487 I chromium: [INFO:CONSOLE(10)] \"5ad08553a5172c2e88b2e8e3\", source: file:///android_asset/www/js/angular/controllers/map-controller.js (10)\r\n04-13 18:38:25.036 29487 29487 D SystemWebChromeClient: file:///android_asset/www/js/angular/controllers/bus-routes-controller.js: Line 61 : app.map\r\n04-13 18:38:25.036 29487 29487 I chromium: [INFO:CONSOLE(61)] \"app.map\", source: file:///android_asset/www/js/angular/controllers/bus-routes-controller.js (61)\r\n04-13 18:38:25.036 29487 29487 D SystemWebChromeClient: file:///android_asset/www/js/angular/controllers/bus-routes-controller.js: Line 62 : app.busroutes\r\n04-13 18:38:25.036 29487 29487 I chromium: [INFO:CONSOLE(62)] \"app.busroutes\", source: file:///android_asset/www/js/angular/controllers/bus-routes-controller.js (62)\r\n04-13 18:38:25.063 29487   811 D com.marianhello.bgloc.data.sqlite.SQLiteConfigurationDAO: Configuration persisted with rowId = 1\r\n04-13 18:38:25.064 29487   811 D com.marianhello.bgloc.BackgroundGeolocationFacade: Service configured with: Config[distanceFilter=50 stationaryRadius=50.0 desiredAccuracy=0 interval=10000 fastestInterval=5000 activitiesInterval=10000 isDebugging=true stopOnTerminate=true stopOnStillActivity=true startOnBoot=false startForeground=true locationProvider=0 nTitle=Background tracking nText=Enabled for Vehicle Tracking nIconLarge= nIconSmall= nIconColor= url=http://192.168.1.5:3500/service/gps/saveLocationForDriver?routeId=5ad08553a5172c2e88b2e8e3 syncUrl= syncThreshold=100 httpHeaders={authorization=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiI1YWQwODRmYWE1MTcyYzJlODhiMmU4ZTIiLCJyb2xlIjoiRFJJVkVSIiwiaWF0IjoxNTIzNjE1MDk0fQ.-vXyPccTqSCS0NTVT5iepCUfFfPcDaiNByuiqOjwL5k} maxLocations=10000 postTemplate={\"bear\":\"@bearing\",\"lon\":\"@longitude\",\"lat\":\"@latitude\"}]\r\n04-13 18:38:25.075 29487 29487 D SystemWebChromeClient: file:///android_asset/www/js/angular/controllers/map-controller.js: Line 109 : is location enabled\r\n04-13 18:38:25.075 29487 29487 I chromium: [INFO:CONSOLE(109)] \"is location enabled\", source: file:///android_asset/www/js/angular/controllers/map-controller.js (109)\r\n04-13 18:38:25.076 29487   812 D com.marianhello.bgloc.BackgroundGeolocationFacade: Starting service\r\n04-13 18:38:25.116 29487   812 I com.marianhello.bgloc.BackgroundGeolocationFacade: Starting bg service\r\n04-13 18:38:25.134  3800  4078 D NetworkController.MobileSignalController(3): onSignalStrengthsChanged signalStrength=SignalStrength: 99 0 -120 -160 -120 -1 -1 15 -113 -9 68 2147483647 2147483647 2 2 gsm|lte level=2 voicelevel=2 datalevel=2\r\n04-13 18:38:25.143 29487 29487 I com.marianhello.bgloc.LocationService: Creating LocationService\r\n04-13 18:38:25.146  3800  4078 D NetworkController.MobileSignalController(4): onSignalStrengthsChanged signalStrength=SignalStrength: 22 0 -120 -160 -120 -1 -1 99 2147483647 2147483647 2147483647 2147483647 2147483647 4 4 gsm|lte level=4 voicelevel=4 datalevel=4\r\n04-13 18:38:25.156 29487 29487 D AndroidRuntime: Shutting down VM\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: FATAL EXCEPTION: main\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: Process: com.followclass.driver, PID: 29487\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: java.lang.RuntimeException: Unable to create service com.marianhello.bgloc.LocationService: java.lang.SecurityException: uid 10571 cannot explicitly add accounts of type: com.followclass.driver.account\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat android.app.ActivityThread.handleCreateService(ActivityThread.java:2951)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat android.app.ActivityThread.access$1900(ActivityThread.java:155)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1463)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat android.os.Looper.loop(Looper.java:152)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat android.app.ActivityThread.main(ActivityThread.java:5497)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat java.lang.reflect.Method.invoke(Native Method)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: Caused by: java.lang.SecurityException: uid 10571 cannot explicitly add accounts of type: com.followclass.driver.account\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat android.os.Parcel.readException(Parcel.java:1620)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat android.os.Parcel.readException(Parcel.java:1573)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat android.accounts.IAccountManager$Stub$Proxy.addAccountExplicitly(IAccountManager.java:890)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat android.accounts.AccountManager.addAccountExplicitly(AccountManager.java:718)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat com.marianhello.bgloc.sync.AccountHelper.CreateSyncAccount(AccountHelper.java:23)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat com.marianhello.bgloc.LocationService.onCreate(LocationService.java:192)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \tat android.app.ActivityThread.handleCreateService(ActivityThread.java:2941)\r\n04-13 18:38:25.156 29487 29487 E AndroidRuntime: \t... 8 more\r\n04-13 18:38:25.158 29487 29487 D AppTracker: App Event: crash\r\n04-13 18:38:25.162  1124  4364 W ActivityManager:   Force finishing activity com.followclass.driver/.MainActivity\r\n04-13 18:38:25.166  3800  3800 I StatusBarIconController:  appTransitionPending\r\n04-13 18:38:25.168  7402  7402 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.\r\n04-13 18:38:25.178  1124  4364 I ActivityManager_Thumbnails: Setting thumbnail of ActivityRecord{1832d97 u0 com.followclass.driver/.MainActivity t2846 f} to android.graphics.Bitmap@d2e3f00\r\n04-13 18:38:25.183  1124   834 D DropBoxManagerService: file :: /data/system/dropbox/data_app_crash@1523624905172.txt\r\n04-13 18:38:25.191  1124  1152 W ActivityManager:  Dismiss app error dialog : com.followclass.driver\r\n04-13 18:38:25.191  1124  1152 W AppOps  : Finishing op nesting under-run: uid 1000 pkg android code 24 time=1464854877792 duration=9102 nesting=0\r\n04-13 18:38:25.194 29487 29487 I Process : Sending signal. PID: 29487 SIG: 9\r\n04-13 18:38:25.195  3800  3800 D PhoneStatusBar: setSystemUiVisibility vis=8000 mask=ffffffff oldVal=8600 newVal=8000 diff=600\r\n04-13 18:38:25.222  1124  4362 I ActivityManager: Process com.followclass.driver (pid 29487) has died\r\n04-13 18:38:25.222  1124  4294 I WindowState: WIN DEATH: Window{b7d2a6f u0 com.followclass.driver/com.followclass.driver.MainActivity}\r\n04-13 18:38:25.222  1124  4362 D ActivityManager: cleanUpApplicationRecord -- 29487\r\n04-13 18:38:25.222  1124  3831 D ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ id=360, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ], android.os.BinderProxy@dbc2e56)\r\n04-13 18:38:25.223  1124  4390 D GraphicsStats: Buffer count: 8\r\n04-13 18:38:25.223  1124  4362 W ActivityManager: Scheduling restart of crashed service com.followclass.driver/com.marianhello.bgloc.LocationService in 1000ms\r\n04-13 18:38:25.223  1124  1138 D ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ id=359, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ], android.os.BinderProxy@bc21ed7)\r\n04-13 18:38:25.223  1124  3724 D ConnectivityService: releasing NetworkRequest NetworkRequest [ id=360, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]\r\n04-13 18:38:25.223  1124  1150 V ActivityManager: killProcessGroupAsync took 0 ms for PID 29487 on thread 14\r\n04-13 18:38:25.224  1124  3724 D ConnectivityService: sending notification RELEASED for NetworkRequest [ id=360, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]\r\n04-13 18:38:25.224  1124  3724 E ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=360, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]\r\n04-13 18:38:25.224  1124  3724 D ConnectivityService: releasing NetworkRequest NetworkRequest [ id=359, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]\r\n04-13 18:38:25.225  1124  3724 D ConnectivityService: sending notification RELEASED for NetworkRequest [ id=359, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]\r\n04-13 18:38:25.225  1124  3724 E ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=359, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]\r\n04-13 18:38:25.227  3800  3800 I StatusBarIconController:  appTransitionPending\r\n"},"comment":{"url":"https://api.github.com/repos/mauron85/cordova-plugin-background-geolocation/issues/comments/381206321","html_url":"https://github.com/mauron85/cordova-plugin-background-geolocation/issues/404#issuecomment-381206321","issue_url":"https://api.github.com/repos/mauron85/cordova-plugin-background-geolocation/issues/404","id":381206321,"user":{"login":"mauron85","id":359450,"avatar_url":"https://avatars0.githubusercontent.com/u/359450?v=4","gravatar_id":"","url":"https://api.github.com/users/mauron85","html_url":"https://github.com/mauron85","followers_url":"https://api.github.com/users/mauron85/followers","following_url":"https://api.github.com/users/mauron85/following{/other_user}","gists_url":"https://api.github.com/users/mauron85/gists{/gist_id}","starred_url":"https://api.github.com/users/mauron85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauron85/subscriptions","organizations_url":"https://api.github.com/users/mauron85/orgs","repos_url":"https://api.github.com/users/mauron85/repos","events_url":"https://api.github.com/users/mauron85/events{/privacy}","received_events_url":"https://api.github.com/users/mauron85/received_events","type":"User","site_admin":false},"created_at":"2018-04-13T17:28:50Z","updated_at":"2018-04-13T17:28:50Z","author_association":"OWNER","body":"So check if in `platforms/android/AndroidManifest.xml` `package` matches `content_authority` in `platforms/android/res/values/strings.xml`.  "}}
{"actor":{"display_login":"mauron85"}}