react-native-background-geolocation: Cannot read property 'addEventListener' of undefined (with proper setup)
Your Environment
- Plugin version: 3.2.0
- Platform: Android
- OS version: 9
- Device manufacturer / model: Simulator (Pixel 2 API 28)
- React Native version (
react-native -v
): 0.60.5 - Plugin config
reset: true,
// Geolocation Config
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
distanceFilter: 10,
// Activity Recognition
stopTimeout: 1,
// Application config
debug: true,
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
stopOnTerminate: false,
startOnBoot: true,
// HTTP
url: Config.TRACKING_URL(Firebase.uid()),
batchSync: false,
autoSync: true,
headers: {
Authorization: 'Bearer ' + Firebase.authToken(),
},
Expected Behavior
Tracking and everything working fine on iOS and should build on Android the same (with proper package setup)
Actual Behavior
Similar to #777
We have triple checked the setup process and confirmed each step is correct however we are still receiving the error: Cannot read property 'addEventListener' of undefined
on Android - almost certainly a setup issue error.
The last time we set this package up was almost 2 years ago and the setup process was much different then, it looks like the “auto linking” process may be at fault here?
What other areas should I be checking to ensure a proper setup (MainApplication.java for instance). I’m almost certain something in the auto-linking process was unsuccessful.
Steps to Reproduce
- Follow setup steps
- Run android app on API 28, Android v.9
- Error received
Context
Compile App
Debug logs
Logs
LOGCAT:
2019-09-12 17:33:45.415 30054-30054/com.bolt.carrier.staging E/TSLocationManager:
╔═════════════════════════════════════════════
║ LICENSE VALIDATION FAILURE: com.XXXXXXXXXX
╠═════════════════════════════════════════════
╟─ Invalid license key: XXXXXXXXXXXXXXXXXXXXXXXXXX
╟─ BackgroundGeolocation is fully functional in DEBUG builds without a license.
╚═════════════════════════════════════════════


About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (12 by maintainers)
@christocracy you are completely right, this actually works just fine. Thanks as always!
Why are you scared to try this, and fixing RN auto-linking?