apache / apache/cordova-browser

PACKAGE_NAME wrong in browser.json

Open
#94 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
174
Forks
86
Avg merge
8h 15m
Merged PRs (30d)
6

Description

# 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 "
The regular expression in browser_handler.js needs to be changed to something like /(?:
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

Contributor guide

Open the contributing guide

Research direction

Start in browser_handler.js and inspect the widget_id_regex used to read config.xml. Reproduce the case where android-versionCode appears before the widget id, then verify that PACKAGE_NAME in browser.json matches the widget id value rather than the default name.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.