{"action":"created","issue":{"url":"https://api.github.com/repos/transistorsoft/nativescript-background-geolocation-lt/issues/121","repository_url":"https://api.github.com/repos/transistorsoft/nativescript-background-geolocation-lt","labels_url":"https://api.github.com/repos/transistorsoft/nativescript-background-geolocation-lt/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/transistorsoft/nativescript-background-geolocation-lt/issues/121/comments","events_url":"https://api.github.com/repos/transistorsoft/nativescript-background-geolocation-lt/issues/121/events","html_url":"https://github.com/transistorsoft/nativescript-background-geolocation-lt/issues/121","id":344712383,"node_id":"MDU6SXNzdWUzNDQ3MTIzODM=","number":121,"title":"Context.startForegroundService() did not then call Service.startForeground() on Android 8.1","user":{"login":"FranciZ","id":2536035,"node_id":"MDQ6VXNlcjI1MzYwMzU=","avatar_url":"https://avatars2.githubusercontent.com/u/2536035?v=4","gravatar_id":"","url":"https://api.github.com/users/FranciZ","html_url":"https://github.com/FranciZ","followers_url":"https://api.github.com/users/FranciZ/followers","following_url":"https://api.github.com/users/FranciZ/following{/other_user}","gists_url":"https://api.github.com/users/FranciZ/gists{/gist_id}","starred_url":"https://api.github.com/users/FranciZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FranciZ/subscriptions","organizations_url":"https://api.github.com/users/FranciZ/orgs","repos_url":"https://api.github.com/users/FranciZ/repos","events_url":"https://api.github.com/users/FranciZ/events{/privacy}","received_events_url":"https://api.github.com/users/FranciZ/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2018-07-26T06:33:13Z","updated_at":"2018-08-04T14:48:45Z","closed_at":null,"author_association":"NONE","body":"<!--\r\n*****************************************************************\r\n* WARNING:  If you ignore this template, your issue will be too.\r\n*****************************************************************\r\n-->\r\n\r\n<!--\r\n  Provide a general summary of the issue in the Title above \r\n-->\r\n## Your Environment\r\n* Plugin version:1.8.0\r\n* Platform: Android\r\n* OS version: 8.1.0\r\n* Device manufacturer / model: Pixel XL 2\r\n* Nativescript version (`tns info`): 4.1.2\r\n* Plugin config\r\n```\r\n{\r\n            debug: false,\r\n            desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,\r\n            stationaryRadius: 10,\r\n            distanceFilter: 5,\r\n            activityRecognitionInterval: 5000,\r\n            notificationText: 'Loco service activated',\r\n            notificationIcon: 'drawable/ic_notification'\r\n}\r\n```\r\n\r\n## Expected Behavior\r\nApp shouldn't crash.\r\n\r\n## Actual Behavior\r\nApp crashes throwing `Context.startForegroundService() did not then call Service.startForeground()` error. \r\n\r\nThis library is the only background service I'm using in the app so I'm assuming there's an issue here.\r\n\r\n## Steps to Reproduce\r\nIt's random, it happens every once in a while when putting the app to background and back to foreground.\r\n\r\n## Context\r\nNothing particular.\r\n\r\n## Debug logs\r\n```\r\nFatal Exception: android.app.RemoteServiceException\r\nContext.startForegroundService() did not then call Service.startForeground()\r\nandroid.app.ActivityThread$H.handleMessage (ActivityThread.java:2101)\r\nandroid.os.Handler.dispatchMessage (Handler.java:108)\r\nandroid.os.Looper.loop (Looper.java:166)\r\n```"},"comment":{"url":"https://api.github.com/repos/transistorsoft/nativescript-background-geolocation-lt/issues/comments/410454683","html_url":"https://github.com/transistorsoft/nativescript-background-geolocation-lt/issues/121#issuecomment-410454683","issue_url":"https://api.github.com/repos/transistorsoft/nativescript-background-geolocation-lt/issues/121","id":410454683,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDQ1NDY4Mw==","user":{"login":"FranciZ","id":2536035,"node_id":"MDQ6VXNlcjI1MzYwMzU=","avatar_url":"https://avatars2.githubusercontent.com/u/2536035?v=4","gravatar_id":"","url":"https://api.github.com/users/FranciZ","html_url":"https://github.com/FranciZ","followers_url":"https://api.github.com/users/FranciZ/followers","following_url":"https://api.github.com/users/FranciZ/following{/other_user}","gists_url":"https://api.github.com/users/FranciZ/gists{/gist_id}","starred_url":"https://api.github.com/users/FranciZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FranciZ/subscriptions","organizations_url":"https://api.github.com/users/FranciZ/orgs","repos_url":"https://api.github.com/users/FranciZ/repos","events_url":"https://api.github.com/users/FranciZ/events{/privacy}","received_events_url":"https://api.github.com/users/FranciZ/received_events","type":"User","site_admin":false},"created_at":"2018-08-04T14:48:45Z","updated_at":"2018-08-04T14:48:45Z","author_association":"NONE","body":"It works with `$ tns run android` though. Silently fails just with the release build.\r\n\r\n```\r\n✔ Getting NativeScript components versions information...\r\n✔ Component nativescript has 4.1.2 version and is up to date.\r\n✔ Component tns-core-modules has 4.2.0-2018-07-23-02 version and is up to date.\r\n✔ Component tns-android has 4.1.3 version and is up to date.\r\n✔ Component tns-ios has 4.1.0 version and is up to date.\r\n```"}}
{"actor":{"display_login":"FranciZ"}}