question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NullPointerException: onTaskRemoved (LocationService.java:199)

See original GitHub issue

Exception reported on google play. No feedback from the user unfortunately. If I manage to reproduce it or get more info I’ll update the issue.

Your Environment

  • Plugin version: 2.2.5
  • Platform: Android
  • OS version: 5.0.2
  • Device manufacturer and model: Sony C6916
  • Cordova version (cordova -v): 6.4.0
  • Cordova platform version (cordova platform ls): 6.0.0
  • Plugin configuration options:
  • Link to your project:

Debug logs

Exception java.lang.RuntimeException: Unable to start service com.marianhello.bgloc.LocationService@3fef4865 with Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 }: java.lang.NullPointerException: Attempt to invoke virtual method ‘java.lang.Boolean com.marianhello.bgloc.Config.getStopOnTerminate()’ on a null object reference

Caused by java.lang.NullPointerException: Attempt to invoke virtual method ‘java.lang.Boolean com.marianhello.bgloc.Config.getStopOnTerminate()’ on a null object reference com.marianhello.bgloc.LocationService.onTaskRemoved (LocationService.java:199) android.app.ActivityThread.handleServiceArgs (ActivityThread.java:2920) android.app.ActivityThread.access$2100 (ActivityThread.java:149) android.app.ActivityThread$H.handleMessage (ActivityThread.java:1422) android.os.Handler.dispatchMessage (Handler.java:102) android.os.Looper.loop (Looper.java:211) android.app.ActivityThread.main (ActivityThread.java:5317) java.lang.reflect.Method.invoke (Method.java) java.lang.reflect.Method.invoke (Method.java:372) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1016) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:811)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:26 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
mauron85commented, Mar 10, 2018

ok. can you please try cordova-plugin-mauron85-background-geolocation@3.0.0-alpha.17?

1reaction
mauron85commented, Nov 21, 2017

Notice: this issue has been closed because it has been reported for branch 2.x or later. It could be already fixed in v3 or is not relevant anymore. You may reopen this issue if it has been closed in error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build fails · Issue #380 · mauron85/cordova-plugin ... - GitHub
NullPointerException : onTaskRemoved (LocationService.java:199) #276. Closed. @mauron85 mauron85 added bug waiting for input investigating ...
Read more >
Service onStartCommand throwing NullPointerException
I am using a portion of the code linked within the answer provided here by blackcj to run a location service in the...
Read more >
Service | Android Developers
public void onTaskRemoved (Intent rootIntent). This is called if the service is currently running and the user has removed a task that comes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found