Jenny Gee created CB-7108:
-----------------------------
Summary: Having a * in the wrong spot in config.xml will cause
cordova to choke
Key: CB-7108
URL: https://issues.apache.org/jira/browse/CB-7108
Project: Apache Cordova
Issue Type: Bug
Components: CordovaJS
Affects Versions: 3.5.0
Reporter: Jenny Gee
Priority: Trivial
I had entered in the following into my config.xml:
<access origin="*://jgeeMac*" subdomains="true"/>
(syntax is part of cordova 3.1 and no longer supported - I didn't know I was
looking at the wrong version of docs). The next part shows the crash output but
we really need some better error handling and a better error message.
jgeemac:test_app jgee$ cordova build
Running command:
/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/build
[INFO] Populating application source
[INFO] Parsing config.xml
/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/lib/logger.js:28
console.error("[ERROR] " + msg.replace(/error: /i, ""));
^
TypeError: Object Error: Invalid URI attribute in the access element - protocol
required(*://jgeeMac*) has no method 'replace'
at Object.module.exports.error
(/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/lib/logger.js:28:42)
at Object.module.exports.start
(/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/lib/packager.js:69:24)
at build
(/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/lib/build.js:121:39)
at
/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/node_modules/async/lib/async.js:548:21
at
/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/node_modules/async/lib/async.js:224:13
at iterate
(/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/node_modules/async/lib/async.js:131:13)
at
/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/node_modules/async/lib/async.js:142:25
at
/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/node_modules/async/lib/async.js:226:17
at
/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/node_modules/async/lib/async.js:553:34
at
/Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/lib/build.js:103:64
Error: /Users/jgee/noWhitelist/test_app/platforms/blackberry10/cordova/build:
Command failed with exit code 8
at ChildProcess.whenDone
(/Users/jgee/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Process.ChildProcess._handle.onexit (child_process.js:802:5)
--
This message was sent by Atlassian JIRA
(v6.2#6252)