-
Notifications
You must be signed in to change notification settings - Fork 564
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 com.marianhello.bgloc.LocationService.configure(com.marianhello.bgloc.Config)' on a null object reference #201
Comments
Please send me some plugin logs?
|
Also few more questions for you.
|
Added next lines: componentDidMount() {
if (__DEV__) {
console.log('App.componentDidMount');
}
this.addEvents();
this.initializeBackgroundGeolocation();
}
addEvents() {
BackgroundGeolocation.on('stationary', () => console.log('BackgroundGeolocation Stationary'));
BackgroundGeolocation.on('activity', (activity) => console.log('BackgroundGeolocation Activity', JSON.stringify(activity)));
BackgroundGeolocation.on('start', () => console.log('BackgroundGeolocation Start'));
BackgroundGeolocation.on('stop', () => console.log('BackgroundGeolocation Stop'));
BackgroundGeolocation.on('background', () => console.log('BackgroundGeolocation Background'));
BackgroundGeolocation.on('foreground', () => console.log('BackgroundGeolocation Foreground'));
BackgroundGeolocation.on('authorization', (status) => console.log('BackgroundGeolocation Authorization', JSON.stringify(status)));
BackgroundGeolocation.on('error', (error) => console.log('BackgroundGeolocation Error', JSON.stringify(error)));
BackgroundGeolocation.on('location', () => console.log('BackgroundGeolocation Location'));
}
initializeBackgroundGeolocation() {
if (__DEV__ || true) {
console.log('App.initializeBackgroundGeolocation Call');
}
const options = { . . . };
try {
BackgroundGeolocation.configure(options);
} catch (e) {
Sentry.captureException(e);
if (__DEV__ || true) {
console.error('BackgroundGeolocation Configuration Error');
console.error(e);
}
}
BackgroundGeolocation.checkStatus(status => {
if (__DEV__ || true) {
console.log('BackgroundGeolocation Status', JSON.stringify(status));
}
// . . . . .
});
} Will send the logs, when it crash. Is this enough? Uhh. Last time it crashed in android emulator after reload (RR). On my phone (Galaxy S8), as I remember, crashed when started from launcher. But will test it in different situations. |
Here is the first.
|
Thanks. That is what I though. If app is started from notification, configure is called from main thread instead of special react-native thread and there is apparently race condition in this case. I think I already found it. So wait for fix. |
any schedule to fix this error? I face same error. I need to use this library ASAP. |
@gabrieljo you may consider that this is an open source project, if you really need to usit ASAP, then make your pull request, work harder, or better hire some developer that can make work that you can't. the time that @mauron85 is wasting here, i think he never got any money from here, just saying... |
It is a bit annoying bug, but I have no idea where, and how to fix it. I am just in dev phase, so I wait patiently... |
I am also running into this bug after upgrading to Gradle 4 and using the alpha 34 branch. It happens for me when running |
fixed in 0.5.0-alpha.36 |
Your Environment
Actual Behavior
Sometimes the plugin crashes, randomly.
Steps to Reproduce
Start the app, many times, and randomly once will crash.
The plugin is not started, just configured.
Debug logs
Only the error message in issue title.
The text was updated successfully, but these errors were encountered: