Hi, I am here on ionic-cli 3.13.2 and see the following warnings:
...
[14:23:25] console.log: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
[14:23:26] console.warn: Native: tried calling StatusBar.styleDefault, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
[14:23:26] console.warn: Native: tried calling SplashScreen.hide, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
[14:23:29] lint finished in 5.73 s
no wranings
Steps to reproduce:
Which @ionic/app-scripts version are you using?
3.13.2
On a mac os El Capitan the error is still going when ionic serve -l
@mlynch why this issue is closed?
@n0mer - the cordova.js file is only included when you are running natively on a device, not when running in a browser. That is likely why this is closed.
https://stackoverflow.com/questions/43182619/cordova-js-not-available-while-running-in-chrome
ionic cordova run browser will load those native plugins that support browser platform.
anyway, in my case that error was caused by --livereload flag.
When i started w/out -lc (strange, but -c flag triggers -l as well), i got rid of this message, and debug via chrome://inspect#devices
OK, cool. Note that we generally do not suggest using the Cordova browser platform in general and rather suggest working around the fact that you do not have Cordova plugins in the browser by using native web APIs when Cordova is not present as outlined in the "Plugins" section of this document: https://ionicframework.com/docs/developer-resources/desktop-support/
But if using that platform works for you for testing, have at it.
How to fix cordova not available problem in ionic.Suggest me a solution for these...
HI
I just faced this problem when using SQLite but I think is a general error dealing with cordova plugins. I found this and it worked like a charm.
I'm testing on an android device.
@Bala22333
@n0mer you saved my life ;) thanks.
run after attaching device
ionic cordova run android
ionic cordova run browserwill load those native plugins that supportbrowserplatform.
Cool
I removed the SplashScreen and StatusBar code from app.component.ts and app.component.ts (and in the related tests.)
That worked to remove the warnings.
I am on ionic 5.4.1.
I am on ionic,
the warning messages makes the browser very slow.
it might not be the best approach, But I just added a return to the beginning of the cordovaWarn function in common.js. will comment it whenever ready to publish to device.

Most helpful comment
ionic cordova run browserwill load those native plugins that supportbrowserplatform.