{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/3950","labels_url":"https://api.github.com/repos/meteor/meteor/issues/3950/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/3950/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/3950/events","html_url":"https://github.com/meteor/meteor/issues/3950","id":62535585,"number":3950,"title":"Cordova error \"App id contains a reserved word, or is not a valid identifier\" related to hyphens in app name","user":{"login":"jatsrt","id":635242,"avatar_url":"https://avatars.githubusercontent.com/u/635242?v=3","gravatar_id":"","url":"https://api.github.com/users/jatsrt","html_url":"https://github.com/jatsrt","followers_url":"https://api.github.com/users/jatsrt/followers","following_url":"https://api.github.com/users/jatsrt/following{/other_user}","gists_url":"https://api.github.com/users/jatsrt/gists{/gist_id}","starred_url":"https://api.github.com/users/jatsrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jatsrt/subscriptions","organizations_url":"https://api.github.com/users/jatsrt/orgs","repos_url":"https://api.github.com/users/jatsrt/repos","events_url":"https://api.github.com/users/jatsrt/events{/privacy}","received_events_url":"https://api.github.com/users/jatsrt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Mobile","name":"Project:Mobile","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-03-17T22:38:16Z","updated_at":"2015-03-20T17:53:37Z","closed_at":null,"body":"New build 1.0.4\r\n\r\nI've completely remove ~/.meteor and <project>/.meteor/loca\r\n\r\nRunning:\r\nmeteor run ios\r\n\r\nGet:\r\n\r\nError creating Cordova prject: Error running /Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/cordova-scripts/cordova.sh\r\nApp id contains a reserved word, or is not a valid identifier.\r\n\r\n\r\nError: Error running /Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/cordova-scripts/cordova.sh\r\nApp id contains a reserved word, or is not a valid identifier.\r\n\r\n\r\n    at execFileSyncOrThrow (/Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/commands-cordova.js:272:11)\r\n    at ensureCordovaProject (/Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/commands-cordova.js:376:22)\r\n    at /Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/commands-cordova.js:781:5\r\n    at /Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/buildmessage.js:327:18\r\n    at [object Object]._.extend.withValue (/Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/fiber-helpers.js:115:14)\r\n    at /Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/buildmessage.js:326:36\r\n    at [object Object]._.extend.withValue (/Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/fiber-helpers.js:115:14)\r\n    at Object.enterJob (/Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/buildmessage.js:317:26)\r\n    at buildCordova (/Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/commands-cordova.js:766:16)\r\n    at Object.cordova.buildTargets (/Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/commands-cordova.js:137:3)\r\n    at Command.doRunCommand [as func] (/Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/commands.js:320:15)\r\n    at /Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/main.js:1345:23\r\nError while running for mobile platforms: Error running /Users/jake/.meteor/packages/meteor-tool/.1.0.42.1o2guy5++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/cordova-scripts/cordova.sh\r\nCurrent working directory is not a Cordova-based project.\r\n\r\n "},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/84087930","html_url":"https://github.com/meteor/meteor/issues/3950#issuecomment-84087930","issue_url":"https://api.github.com/repos/meteor/meteor/issues/3950","id":84087930,"user":{"login":"glasser","id":16724,"avatar_url":"https://avatars.githubusercontent.com/u/16724?v=3","gravatar_id":"","url":"https://api.github.com/users/glasser","html_url":"https://github.com/glasser","followers_url":"https://api.github.com/users/glasser/followers","following_url":"https://api.github.com/users/glasser/following{/other_user}","gists_url":"https://api.github.com/users/glasser/gists{/gist_id}","starred_url":"https://api.github.com/users/glasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasser/subscriptions","organizations_url":"https://api.github.com/users/glasser/orgs","repos_url":"https://api.github.com/users/glasser/repos","events_url":"https://api.github.com/users/glasser/events{/privacy}","received_events_url":"https://api.github.com/users/glasser/received_events","type":"User","site_admin":false},"created_at":"2015-03-20T17:53:37Z","updated_at":"2015-03-20T17:53:37Z","body":"And it's specifically from the app ID (`com.meteor.` + appName) in `ensureCordovaProject`, which hits this check added in cordova-lib 4.2.0: https://github.com/apache/cordova-lib/commit/894d476799465e6e6a320912c2b7c987ffbd6ffb#diff-816eb0deb4190b411703bd428f40cdeeR55 and which is only actually checked at create time (though one could imagine that it ends up being important if the app ID is used for some java thing later).  (I mention Java based on the description at https://www.npmjs.com/package/valid-identifier)\r\n\r\nMy suggestion, following [this stack overflow question about Java namespace](http://stackoverflow.com/questions/3678520/hyphenated-company-name-in-java-packages) is that we convert dashes to underscores in ensureCordovaProject.  Of course there might be other reasons it won't work, but this is the most common."}}