{"action":"created","issue":{"url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/783","repository_url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt","labels_url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/783/labels{/name}","comments_url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/783/comments","events_url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/783/events","html_url":"https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/783","id":358150734,"node_id":"MDU6SXNzdWUzNTgxNTA3MzQ=","number":783,"title":"App crashes when built in release mode, ok in debug","user":{"login":"locsim","id":14050942,"node_id":"MDQ6VXNlcjE0MDUwOTQy","avatar_url":"https://avatars3.githubusercontent.com/u/14050942?v=4","gravatar_id":"","url":"https://api.github.com/users/locsim","html_url":"https://github.com/locsim","followers_url":"https://api.github.com/users/locsim/followers","following_url":"https://api.github.com/users/locsim/following{/other_user}","gists_url":"https://api.github.com/users/locsim/gists{/gist_id}","starred_url":"https://api.github.com/users/locsim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locsim/subscriptions","organizations_url":"https://api.github.com/users/locsim/orgs","repos_url":"https://api.github.com/users/locsim/repos","events_url":"https://api.github.com/users/locsim/events{/privacy}","received_events_url":"https://api.github.com/users/locsim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-07T17:30:22Z","updated_at":"2018-09-10T14:28:48Z","closed_at":null,"author_association":"NONE","body":"<My App crashes immediately after start. The same app build in debug mode runs ok.>\r\n\r\n## Your Environment\r\n* Plugin version: 2.13.1\r\n* Platform: Android\r\n* OS version: 8.1.0\r\n* Device manufacturer / model: Oneplus 5T\r\n* Cordova version (`cordova -v`): 8.0.0\r\n* Cordova platform version (`cordova platform ls`): android 7.0.0\r\n* Plugin config\r\n\r\n{\r\n    \"activityRecognitionInterval\": 1000,\r\n    \"allowIdenticalLocations\": false,\r\n    \"autoSync\": true,\r\n    \"autoSyncThreshold\": 0,\r\n    \"batchSync\": false,\r\n    \"debug\": true,\r\n    \"deferTime\": 0,\r\n    \"desiredAccuracy\": 0,\r\n    \"desiredOdometerAccuracy\": 100,\r\n    \"disableElasticity\": false,\r\n    \"disableStopDetection\": false,\r\n    \"distanceFilter\": 30,\r\n    \"elasticityMultiplier\": 1,\r\n    \"enableHeadless\": false,\r\n    \"extras\": {},\r\n    \"fastestLocationUpdateInterval\": 1000,\r\n    \"forceReloadOnBoot\": false,\r\n    \"forceReloadOnGeofence\": false,\r\n    \"forceReloadOnHeartbeat\": false,\r\n    \"forceReloadOnLocationChange\": false,\r\n    \"forceReloadOnMotionChange\": false,\r\n    \"forceReloadOnSchedule\": false,\r\n    \"foregroundService\": true,\r\n    \"geofenceInitialTriggerEntry\": false,\r\n    \"geofenceProximityRadius\": 1000,\r\n    \"geofenceTemplate\": \"\",\r\n    \"headers\": {},\r\n    \"headlessJobService\": \"com.transistorsoft.cordova.bggeo.HeadlessJobService\",\r\n    \"heartbeatInterval\": 60,\r\n    \"httpRootProperty\": \"location\",\r\n    \"httpTimeout\": 60000,\r\n    \"isMoving\": false,\r\n    \"locationTemplate\": \"\",\r\n    \"locationTimeout\": 60,\r\n    \"locationUpdateInterval\": 30000,\r\n    \"locationsOrderDirection\": \"ASC\",\r\n    \"logLevel\": 5,\r\n    \"logMaxDays\": 3,\r\n    \"maxBatchSize\": -1,\r\n    \"maxDaysToPersist\": 1,\r\n    \"maxRecordsToPersist\": -1,\r\n    \"method\": \"POST\",\r\n    \"minimumActivityRecognitionConfidence\": 50,\r\n    \"notificationColor\": \"\",\r\n    \"notificationLargeIcon\": \"\",\r\n    \"notificationPriority\": 0,\r\n    \"notificationSmallIcon\": \"\",\r\n    \"notificationText\": \"en service\",\r\n    \"notificationTitle\": \"Ootigo\",\r\n    \"params\": {\r\n        \"code_emetteur\": \"XXXXXX\",\r\n        \"app_version\": \"2.6.5\"\r\n    },\r\n    \"persist\": true,\r\n    \"schedule\": [],\r\n    \"startOnBoot\": false,\r\n    \"stationaryRadius\": 25,\r\n    \"stopAfterElapsedMinutes\": 0,\r\n    \"stopOnStationary\": false,\r\n    \"stopOnTerminate\": true,\r\n    \"stopTimeout\": 0,\r\n    \"triggerActivities\": \"in_vehicle, on_bicycle, on_foot, running, walking\",\r\n    \"url\": \"https:xxxxxxxxxxxxxxx.php\",\r\n    \"enabled\": false,\r\n    \"schedulerEnabled\": false,\r\n    \"trackingMode\": 1,\r\n    \"odometer\": 0,\r\n    \"isFirstBoot\": true\r\n}\r\n\r\n\r\n## Expected Behavior\r\nApp behave in release build the same way as in debug build.\r\n\r\n## Actual Behavior\r\nApp crashes every time it is launched.\r\n\r\n## Steps to Reproduce\r\n<!--- reproduce this issue; include code to reproduce, if relevant -->\r\n1.\r\n2.\r\n3.\r\n4.\r\n\r\n## Context\r\n<!--- What were you trying to do? -->\r\n\r\n## Debug logs\r\n- Android: $ adb logcat\r\n09-07 19:20:54.419 19948 19948 D AndroidRuntime: Shutting down VM\r\n09-07 19:20:54.419 19948 19948 E AndroidRuntime: FATAL EXCEPTION: main\r\n09-07 19:20:54.419 19948 19948 E AndroidRuntime: Process: com.locsim.ootigo2, PID: 19948\r\n09-07 19:20:54.419 19948 19948 E AndroidRuntime: android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground()\r\n09-07 19:20:54.419 19948 19948 E AndroidRuntime: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1867)\r\n09-07 19:20:54.419 19948 19948 E AndroidRuntime: \tat android.os.Handler.dispatchMessage(Handler.java:106)\r\n09-07 19:20:54.419 19948 19948 E AndroidRuntime: \tat android.os.Looper.loop(Looper.java:164)\r\n09-07 19:20:54.419 19948 19948 E AndroidRuntime: \tat android.app.ActivityThread.main(ActivityThread.java:6753)\r\n09-07 19:20:54.419 19948 19948 E AndroidRuntime: \tat java.lang.reflect.Method.invoke(Native Method)\r\n09-07 19:20:54.419 19948 19948 E AndroidRuntime: \tat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:482)\r\n09-07 19:20:54.419 19948 19948 E AndroidRuntime: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)\r\n-->\r\n\r\nApp wont crash when bgGeo is not started in the ready method."},"comment":{"url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/comments/419933240","html_url":"https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/783#issuecomment-419933240","issue_url":"https://api.github.com/repos/transistorsoft/cordova-background-geolocation-lt/issues/783","id":419933240,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTkzMzI0MA==","user":{"login":"christocracy","id":14999,"node_id":"MDQ6VXNlcjE0OTk5","avatar_url":"https://avatars1.githubusercontent.com/u/14999?v=4","gravatar_id":"","url":"https://api.github.com/users/christocracy","html_url":"https://github.com/christocracy","followers_url":"https://api.github.com/users/christocracy/followers","following_url":"https://api.github.com/users/christocracy/following{/other_user}","gists_url":"https://api.github.com/users/christocracy/gists{/gist_id}","starred_url":"https://api.github.com/users/christocracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christocracy/subscriptions","organizations_url":"https://api.github.com/users/christocracy/orgs","repos_url":"https://api.github.com/users/christocracy/repos","events_url":"https://api.github.com/users/christocracy/events{/privacy}","received_events_url":"https://api.github.com/users/christocracy/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T14:28:48Z","updated_at":"2018-09-10T14:28:48Z","author_association":"MEMBER","body":"you create that situation when you do this:\r\n```\r\n$ cordova plugin remove cordova-background-geolocation\r\n```\r\n\r\nIf you want to avoid this situation, append `--nosave` when you remove the plugin.\r\n"}}
{"actor":{"display_login":"christocracy"}}