0

I have @mauron85/cordova-plugin-background-geolocation plugin installed in my ionic 4 app. app is working fine. but when i call the plugin it throw error to my console.

I tried some stack overflow and git answers. But still the problem occurs. also i tried remove zone.js. and installing it. still problem is there.

Anyones help ,explanation or guidance much appreciated.Thank you

core.js:15724 ERROR Error: Uncaught (in promise): cordova_not_available
    at resolvePromise (zone.js:836)
    at resolvePromise (zone.js:795)
    at zone.js:897
    at ZoneDelegate.invokeTask (zone.js:431)
    at Object.onInvokeTask (core.js:17290)
    at ZoneDelegate.invokeTask (zone.js:430)
    at Zone.runTask (zone.js:198)
    at drainMicroTaskQueue (zone.js:611)
    at ZoneTask.invokeTask (zone.js:517)
    at ZoneTask.invoke (zone.js:502)
No One
  • 109
  • 10

1 Answers1

0

looks like you are running your app in the browser. Now build your app with this command:

ionic cordova build android

Or connect USB and turn on debug mode from developer options then run this cmd:

ionic cordova run android

If you will run your app with USB, so with USB you can inspect your device app in chrome by running this URL:

chrome://inspect/#devices

Hope this helps you...

user9088454
  • 1,076
  • 1
  • 15
  • 45
  • 1
    Thanks for reply. The app work on mobile after the build. but this console error is confusing. I want to find why error occur instead of cordova not available warning – No One Aug 21 '19 at 05:10
  • Have you found the origin of that error? I have the same using Ionic 5, and that error prevents me from running unit testing with the command npm test – Pierre May 03 '20 at 02:52