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.

BackgroundGeolocation Not Defined Even After successful Build

See original GitHub issue

Error Message

ReferenceError: BackgroundGeolocation is not defined at onDeviceReady (globalCtrl.js:173) at Object.<anonymous> (globalCtrl.js:34) at Object.invoke (angular.min.js:44) at S.instance (angular.min.js:94) at n (angular.min.js:69) at g (angular.min.js:61) at g (angular.min.js:62) at g (angular.min.js:62) at angular.min.js:61 at angular.min.js:22 (anonymous) @ angular.min.js:123

I am using cordova 8.0.0 and has added all the dependeincies to compile this module with my code. i am using Angular 1.6 with cordova to run. On chrome inspection i get the above error message,

Your Environment

  • Plugin version:

  • Platform: Android

  • OS version: using Mac

  • Device manufacturer and model: Moto E6

  • Cordova version (cordova -v): 8.0.0

  • Cordova platform version (cordova platform ls): Installed platforms: android 7.0.0 Available platforms: browser ~5.0.1 ios ~4.5.4 osx ~4.0.1 windows ~5.0.0 www ^3.12.0

  • Plugin configuration options:

  • Link to your project:

Context

Expected Behavior

Should not give error mesage.

Actual Behavior

Possible Fix

None

Steps to Reproduce

Add this to the cordova project and perform build on chrome inspect get the following error ** ReferenceError: BackgroundGeolocation is not defined **

Context

Debug logs

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11

github_iconTop GitHub Comments

2reactions
Tobiasartzcommented, Jun 4, 2018

For the comment above it is:

cordova plugin add cordova-plugin-mauron85-background-geolocation@3.0.0-alpha.36

Side note: it seems the following is the latest:

cordova plugin add cordova-plugin-mauron85-background-geolocation@3.0.0-alpha.37
0reactions
stale[bot]commented, Feb 12, 2019

This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn’t be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it’s important. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bgGeo is undefined · Issue #787 - GitHub
Not getting reference to BackgroundGeolocation and receiving error: TypeError: undefined is not an object (evaluating 'this.bgGeo') ...
Read more >
Success callback not executed in cordova-plugin-mauron85 ...
I need to store device location in firebase database every 30 sec. I am using cordova - 7.0.1 and cordova-android - 6.2.3 and...
Read more >
react-native-mauron85-background-geolocation - npm
A special task that gets executed when the app is terminated, but the plugin was configured to continue running in the background (option ......
Read more >
Using Background Geolocation in Ionic 5 Angular Apps
You might have also seen applications that track your location even when the app is not in the foreground. This is where the...
Read more >
Config | Cordova Background Geolocation - GitHub Pages
Documentation for Cordova Background Geolocation. ... Set to true to enable background-tracking after the device reboots. ... SDK_INT >= Build.
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