You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Application fails to initialize probably (deviceReady not fired).
Information
This is a regression from a newly added feature #1137
With the default configuration, plugins will fail to initialise because they do not pass the whitelist checks. This occurs when you have at least one plugin installed.
The default <content src="index.html" /> seems to produce a white list pattern where index.html is the host, instead of the path, so when comparing against the https://localhost origin, it returns false.
Command or Code
cordova create test
cd test
cordova platform add android@nightly
cordova plugin add cordova-plugin-file
cordova run android
These steps will produce the hello world cordova app that stays on "connecting" because deviceReady never fires.
Environment, Platform, Device
cordova-android@nightly
And one other plugin
Version information
Workaround
Setting <content src="https://localhost/index.html" /> will correct the problem, but the framework should perhaps figure out this out so that <content src="index.html" /> continues to work properly.
Checklist
I searched for existing GitHub issues
I updated all Cordova tooling to most recent version
I included all the necessary information above
The text was updated successfully, but these errors were encountered:
breautek
changed the title
Application does not initialize correctly on nightly/dev master
Application does not initialize correctly on 10.x nightly/dev master
Apr 25, 2021
It also works if you add <allow-navigation href="https://localhost/*" />, but yeah, it should work without the need of adding it or changing the content url.
I think the proper place to put it is inside the AllowList plugin, once it gets merged #1138
there is the check that allows the content src url
Bug Report
Problem
What is expected to happen?
Application to start correctly
What does actually happen?
Application fails to initialize probably (deviceReady not fired).
Information
This is a regression from a newly added feature #1137
With the default configuration, plugins will fail to initialise because they do not pass the whitelist checks. This occurs when you have at least one plugin installed.
The default
<content src="index.html" />
seems to produce a white list pattern whereindex.html
is thehost
, instead of thepath
, so when comparing against thehttps://localhost
origin, it returns false.Command or Code
These steps will produce the hello world cordova app that stays on "connecting" because
deviceReady
never fires.Environment, Platform, Device
cordova-android@nightly
And one other plugin
Version information
Workaround
Setting
<content src="https://localhost/index.html" />
will correct the problem, but the framework should perhaps figure out this out so that<content src="index.html" />
continues to work properly.Checklist
The text was updated successfully, but these errors were encountered: