-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to invoke virtual method 'void executeProviderCommand(int, int)' on a null object reference #280
Comments
I hit the same error yesterday.
|
@mauron85 Could you help us? |
Is this happening also on latest alpha? |
@mauron85 I will update to latest version on this week and will test on the production. I will write to you later |
I'm also running into this issue. One of the virtual devices doesn't experience it but the other and my real device does. However, it's strange because the AVD that crashes is running Android 5.0.2, my real device is running 8.1, but the AVD that doesn't crash is running 6.0. Enviornment:
|
It would be helpful if you can write down steps how to replicate, or at least some preconditions leading to crash (eg. app terminated but running in bg, ...). The more info, the better. |
@mauron85 We have updated and publish new public version of our application. We will try to get more information |
The application was crashing on startup, I believe as the native components were being loaded by the React Native bridge. I was able to find a temporary fix, but I'm not sure what kind of effect it will have on the system overall. In
Technically, this change needs to be in the |
@fhassanpur thanks for good lead. After some investigation I think the crash is caused when service is not yet connected/created and app is moving to background. So that null check is perfect fix and just workaround. |
I'm going to pull this PR which will also fix this. |
Origin-PR: mauron85/background-geolocation-android#17 Contributed-By: @ivosabev Fixes: #257, #280
Should be fixed in alpha.42. Closing for now. Please feel free to reopen when necessary. |
Your Environment
Context
We use our application on production with more than 100+ users per week. About 30% users on android has problem with
Unable to pause activity {com.shopper_app/com.reactnativenavigation.controllers.NavigationActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.marianhello.bgloc.LocationService.executeProviderCommand(int, int)' on a null object reference
.We use
react-native-background-geolocation
lib for getting user localization on background and for this task we usegetCurrentLocation(success, fail, options)
method.Expected Behavior
We can get localization and application won't be crashed
Actual Behavior
We can't get localizationa and get fatal error on sentry system bug report
Possible Fix
Steps to Reproduce
Context
About 30% android users are getting this error and crush, it's big problem for us
Debug logs
Unable to pause activity {com.shopper_app/com.reactnativenavigation.controllers.NavigationActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.marianhello.bgloc.LocationService.executeProviderCommand(int, int)' on a null object reference
The text was updated successfully, but these errors were encountered: