Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Cordova.js in or in

$
0
0

@reedrichards wrote:

Since I introduced Sentry I get some reports of weird issue like

Native: tried calling StatusBar.styleDefault, but the StatusBar plugin is not installed.
Install the StatusBar plugin: ‘ionic cordova plugin add cordova-plugin-statusbar’

or

ERROR Error: Uncaught (in promise): TypeError: undefined is not an object (evaluating ‘window.Branch.initSession’)

or

GET ./assets/i18n/en.json [0]
ERROR [object Object]

This happens on very few devices of my users but still, I’ve to find the reason.

I could not reproduce the problem, therefore it’s a bit difficult to know what’s really the problem. Right now I’m betting on the fact that sometimes on few devices, code is executed when cordova isn’t loaded yet even if these part are under platform.ready check.

But, I noticed that I’ve got

 <script src="cordova.js"></script>

in the <body/>, since Ionic 2.RC0, and not in the <head/> as a it is with a brand new fresh dummy app (“ionic start …”).

I guess that may be a weird side effect of this, so just wanted to ask, do you guys load the cordova.js script in the <head/> or <body/> part of your index.html?

Also if someone has got a better idea?

P.S.: For the record I read this to come to this idea https://github.com/ionic-team/ionic-plugin-deploy/issues/136 … doesn’t related at all, but who knows…

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>