Cordova not available - Ionic native plugins not working

In Ionic2 app, I am receiving “cordova_not_available” error when I try to access the ionic native features like camera , barcode in my Android Device (6). (using ionic run android)

cordova.js is available under platform/android/platform_www. I have changed the app permissions for camera in my device. Tried reinstalling cordova and ionic.

Some plugins like vibration and geolocation are working fine. Any suggestions?

Thanks in advance.

1 Like

Try the following:
uninstall all the plugins
uninstall the platform
re-install the platform
re-install the plugins

This has worked for some in the past with plugin issues.

1 Like

Tried this out. Now all the plugins are working. Thank you!

Can you please help us with exact command that can uninstall all plugins and reinstall all…

Thanks,

1 Like

Uninstall -> ionic cordova plugin rm {PLUGIN_NAME}

Install -> ionic cordova plugin add {PLUGIN_NAME}@latest

Check all -> ionic cordova plugin

1 Like

how can i uninstall for all the plugin

hey am getting same Runtime error :
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
vendor.js:3918:9
Native: tried calling StatusBar.styleDefault, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
vendor.js:58616:9
Native: tried calling SplashScreen.hide, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
vendor.js:58616:9
Native: tried calling ImagePicker.getPictures, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
vendor.js:58616:9
ERROR
Error: Uncaught (in promise): cordova_not_available
Stack trace:
c@http://localhost:8100/build/polyfills.js:3:19752
c@http://localhost:8100/build/polyfills.js:3:19461
f/<@http://localhost:8100/build/polyfills.js:3:20233
F</l</t.prototype.invokeTask@http://localhost:8100/build/polyfills.js:3:15649
onInvokeTask@http://localhost:8100/build/vendor.js:4973:24
F</l</t.prototype.invokeTask@http://localhost:8100/build/polyfills.js:3:15562
F</c</r.prototype.runTask@http://localhost:8100/build/polyfills.js:3:10815
o@http://localhost:8100/build/polyfills.js:3:7887
F</h</e.invokeTask@http://localhost:8100/build/polyfills.js:3:16823
p@http://localhost:8100/build/polyfills.js:2:27646
v@http://localhost:8100/build/polyfills.js:2:27893
vendor.js:1703:5
The connection to ws://localhost:35729/livereload was interrupted while the page was loading.
livereload.js:76:20
The connection to ws://localhost:53703/ was interrupted while the page was loading.
ion-dev.js:101:18
Dev server logger closed
ion-dev.js:120:9
Firefox can’t establish a connection to the server at ws://localhost:35729/livereload.
livereload.js:76:20
Source map error: TypeError: NetworkError when attempting to fetch resource.
Resource URL: http://localhost:8100/build/vendor.js
Source Map URL: vendor.js.map

image

please help me to solve above problem

image picker plugin installtion problem in ionic 3 @flycoders_sourav @Vinodhumm

1 Like