{"action":"created","issue":{"url":"https://api.github.com/repos/dpa99c/cordova-diagnostic-plugin/issues/80","repository_url":"https://api.github.com/repos/dpa99c/cordova-diagnostic-plugin","labels_url":"https://api.github.com/repos/dpa99c/cordova-diagnostic-plugin/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/dpa99c/cordova-diagnostic-plugin/issues/80/comments","events_url":"https://api.github.com/repos/dpa99c/cordova-diagnostic-plugin/issues/80/events","html_url":"https://github.com/dpa99c/cordova-diagnostic-plugin/issues/80","id":158572106,"number":80,"title":"Android RuntimeException with LocationProviderChangedReceiver","user":{"login":"sebastien-roch","id":486748,"avatar_url":"https://avatars.githubusercontent.com/u/486748?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastien-roch","html_url":"https://github.com/sebastien-roch","followers_url":"https://api.github.com/users/sebastien-roch/followers","following_url":"https://api.github.com/users/sebastien-roch/following{/other_user}","gists_url":"https://api.github.com/users/sebastien-roch/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastien-roch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastien-roch/subscriptions","organizations_url":"https://api.github.com/users/sebastien-roch/orgs","repos_url":"https://api.github.com/users/sebastien-roch/repos","events_url":"https://api.github.com/users/sebastien-roch/events{/privacy}","received_events_url":"https://api.github.com/users/sebastien-roch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-06-05T20:14:40Z","updated_at":"2016-06-11T08:17:32Z","closed_at":"2016-06-10T09:39:06Z","body":"Hi,\r\nthanks for the nice plugin. Unfortunately it crashes on my device with the following error and stacktrace:\r\n```\r\njava.lang.RuntimeException: Unable to start receiver cordova.plugins.Diagnostic$LocationProviderChangedReceiver: java.lang.NullPointerException: Attempt to invoke virtual method 'void cordova.plugins.Diagnostic.notifyLocationStateChange()' on a null object reference\r\nE/AndroidRuntime(21471): \tat android.app.ActivityThread.handleReceiver(ActivityThread.java:2591)\r\nE/AndroidRuntime(21471): \tat android.app.ActivityThread.access$1700(ActivityThread.java:148)\r\nE/AndroidRuntime(21471): \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1360)\r\netc...\r\n```\r\nIt seems that on line 837, `instance` is null. Don't know if it's always null or only sometimes.\r\nI think the thing is fixable by registering the BroadcastReceiver in-line (and not through the manifest) so that we can keep a reference of the CordovaPlugin. But the question is more: why am I the only one encountering this bug?\r\n\r\nAny idea? thanks\r\nAndroid version 5.0, Cordova 6.2, plugin freshly installed.\r\n"},"comment":{"url":"https://api.github.com/repos/dpa99c/cordova-diagnostic-plugin/issues/comments/225343932","html_url":"https://github.com/dpa99c/cordova-diagnostic-plugin/issues/80#issuecomment-225343932","issue_url":"https://api.github.com/repos/dpa99c/cordova-diagnostic-plugin/issues/80","id":225343932,"user":{"login":"dpa99c","id":2345062,"avatar_url":"https://avatars.githubusercontent.com/u/2345062?v=3","gravatar_id":"","url":"https://api.github.com/users/dpa99c","html_url":"https://github.com/dpa99c","followers_url":"https://api.github.com/users/dpa99c/followers","following_url":"https://api.github.com/users/dpa99c/following{/other_user}","gists_url":"https://api.github.com/users/dpa99c/gists{/gist_id}","starred_url":"https://api.github.com/users/dpa99c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpa99c/subscriptions","organizations_url":"https://api.github.com/users/dpa99c/orgs","repos_url":"https://api.github.com/users/dpa99c/repos","events_url":"https://api.github.com/users/dpa99c/events{/privacy}","received_events_url":"https://api.github.com/users/dpa99c/received_events","type":"User","site_admin":false},"created_at":"2016-06-11T08:17:32Z","updated_at":"2016-06-11T08:17:32Z","body":"Note that `cordova.plugins.diagnostic@3.0.4` supersedes this to fix #85. "}}
{"actor":{"display_login":"dpa99c"}}