Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PACKAGE_NAME wrong in browser.json #94

Open
kluns opened this issue Apr 27, 2020 · 1 comment
Open

PACKAGE_NAME wrong in browser.json #94

kluns opened this issue Apr 27, 2020 · 1 comment

Comments

@kluns
Copy link

kluns commented Apr 27, 2020

Bug Report

Problem

If a project uses android platform and browser platform, and the android-versionCode attribute is set in config.xml, when a plugin is added the value for PACKAGE_NAME is set wrong in browser.json.

What is expected to happen?

PACKAGE_NAME should be set to the widget id attribute value from config.xml

What does actually happen?

PACKAGE_NAME is set to 'io.cordova.hellocordova'

Information

In browser_handler.js the regular expression in widget_id_regex does not work if config.xml has an attribute between the "<widget" tag name and the "id=" attribute.

The current regular expression works for:

<widget id="com.myorg.myapp"

but not for:

<widget android-versionCode="01020304" id="com.myorg.myapp"

Command or Code

The regular expression in browser_handler.js needs to be changed to something like /(?:<widget\b.+\bid=['"])(\S+)(?:['"])/ to properly find the id attribute.

Environment, Platform, Device

browser platform

Version information

6.0.0

Checklist

  • [x ] I searched for existing GitHub issues
  • [x ] I updated all Cordova tooling to most recent version
  • [ x] I included all the necessary information above
@dotarjun
Copy link

I'd like to work on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants