You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/04/27 23:06:03 UTC

[GitHub] [cordova-browser] kluns opened a new issue #94: PACKAGE_NAME wrong in browser.json

kluns opened a new issue #94:
URL: https://github.com/apache/cordova-browser/issues/94


   # 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
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   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
   <!-- What command or code is needed to reproduce the problem? -->
   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
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   browser platform
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   6.0.0
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [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
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org