Cordova_not_available when running on android device


#1
[20:22:16]  console.warn: Native: tried calling HTTP.get, but Cordova is not available. Make sure to include cordova.js
            or run in a device/simulator
[20:22:16]  console.error: erreur : cordova_not_available
[20:22:18]  console.error: Error loading deploy information. No Plugin Available

I am getting this error when I run

ionic cordova run android -c -l

It happens only with the -l or -c options.
Here is the list of cordova plugins in package.json:

"cordova": {
    "plugins": {
      "cordova-plugin-advanced-http": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-ionic": {}
    }

#2

This happens when you use with console option (-c). You need remove this option and use debug methods to validate your code.


#3

This happens also with -l option. Does this mean that I can’t use the livereload?


#4

Use the Ionic Pro service to track errors or live view. You can do that in free version.


#5

I also had an issue using Ionic Pro: https://stackoverflow.com/questions/49498154/ionic-view-http-get-works-on-ios-but-not-on-android?noredirect=1#comment86007991_49498154.


#6

@kamal95, if that error is the only information you have, my sugestion is you talk to support of your Pro account about this error. I say this because the error dont tell us anything.


#7

Still @kamal95 is right, we can’t seem to use cordova with the live reload flag. And tracking errors or live view are not the same thing. Or did I misunderstand something?


#8

Yes @gilcatre, you understood well.


#9

Any progress on this?

I am seeing the same issue. I am using ionic native storage and I deploy to my android device via ionic cordova run android -l and get the cordova_not_available error.

Not sure how to debug on my android device without the livereload support.