Skip to content

Application does not initialize correctly on 10.x nightly/dev master #1217

Description

@breautek

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 where index.html is the host, instead of the path, so when comparing against the https://localhost origin, it returns false.

Screenshot from 2021-04-24 12-36-24

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions