[jira] [Commented] (CB-13112) should not create a new file reference on each "cordova prepare"
[ https://issues.apache.org/jira/browse/CB-13112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16122266#comment-16122266 ] ASF subversion and git services commented on CB-13112: -- Commit 7de12c84607355cdf68f4825dc6603351747158a in cordova-ios's branch refs/heads/master from [~shazron] [ https://gitbox.apache.org/repos/asf?p=cordova-ios.git;h=7de12c8 ] CB-13112 - should not create a new file reference on each "cordova prepare" (#329) Added new ios-config-xml project fixture based off cordova-ios@4.4.0 template. The old one doesn't reflect current project structure. prepare.spec.js Added failing test for multiple adds of the same tag Fixed failing test in prepare.js pluginHandlers.spec.js Fix failing test due to new ios-config-xml project template in addPlugin Don't need to prefix 'Resources' and 'Plugins' to the files that are from those groups. The file reference 'sourceTree' relies on its parent group, in the new template structure. > should not create a new file reference on each "cordova > prepare" > > > Key: CB-13112 > URL: https://issues.apache.org/jira/browse/CB-13112 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Reporter: Shazron Abdullah >Assignee: Shazron Abdullah > > See > https://github.com/phonegap/phonegap-plugin-push/issues/1826#issuecomment-317750559 > Race condition is the result of multiple file references, which results in a > CopyPlistFile error. > Only create one file reference, not multiples. > {code} > cordova create foo > cd foo > cordova plugin add phonegap-plugin-push@2.0.0-rc4 > touch GoogleService-Info.plist > nano config.xml (add GoogleService-Info.plist file, see > https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#installation-requirements) > cordova platform add ios > cordova build ios > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13112) should not create a new file reference on each "cordova prepare"
[ https://issues.apache.org/jira/browse/CB-13112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16117954#comment-16117954 ] Shazron Abdullah commented on CB-13112: --- [~piero.alberto] I haven't fixed it yet. The unit tests are for cordova-ios repo, and are not for the end user. When it is done, it will be in the new cordova-ios. I *may* provide instructions for a hot-fix. > should not create a new file reference on each "cordova > prepare" > > > Key: CB-13112 > URL: https://issues.apache.org/jira/browse/CB-13112 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Reporter: Shazron Abdullah >Assignee: Shazron Abdullah > > See > https://github.com/phonegap/phonegap-plugin-push/issues/1826#issuecomment-317750559 > Race condition is the result of multiple file references, which results in a > CopyPlistFile error. > Only create one file reference, not multiples. > {code} > cordova create foo > cd foo > cordova plugin add phonegap-plugin-push@2.0.0-rc4 > nano config.xml (add GoogleService-Info.plist file, see > https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#installation-requirements) > cordova platform add ios > cordova build ios > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13112) should not create a new file reference on each "cordova prepare"
[ https://issues.apache.org/jira/browse/CB-13112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16117953#comment-16117953 ] Shazron Abdullah commented on CB-13112: --- An aside (but related), these two functions shouldn't be part of a generic node-xcode pbxProj parser: https://github.com/alunny/node-xcode/blob/078625f16c102372965cc5a4f6a8f7a5145d36aa/lib/pbxProject.js#L85-L110 (these are highly Cordova specific, and should be a mixin/extension). This leads to code like this: https://github.com/alunny/node-xcode/blob/078625f16c102372965cc5a4f6a8f7a5145d36aa/lib/pbxProject.js#L229-L232 > should not create a new file reference on each "cordova > prepare" > > > Key: CB-13112 > URL: https://issues.apache.org/jira/browse/CB-13112 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Reporter: Shazron Abdullah >Assignee: Shazron Abdullah > > See > https://github.com/phonegap/phonegap-plugin-push/issues/1826#issuecomment-317750559 > Race condition is the result of multiple file references, which results in a > CopyPlistFile error. > Only create one file reference, not multiples. > {code} > cordova create foo > cd foo > cordova plugin add phonegap-plugin-push@2.0.0-rc4 > nano config.xml (add GoogleService-Info.plist file, see > https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#installation-requirements) > cordova platform add ios > cordova build ios > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13112) should not create a new file reference on each "cordova prepare"
[ https://issues.apache.org/jira/browse/CB-13112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16117889#comment-16117889 ] Piero Alberto commented on CB-13112: Good job! I don't have unit tests, my problem is when I build the template, the iOS template isn't built. Can I just retry again or have I to wait a fix in phonegap? > should not create a new file reference on each "cordova > prepare" > > > Key: CB-13112 > URL: https://issues.apache.org/jira/browse/CB-13112 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Reporter: Shazron Abdullah >Assignee: Shazron Abdullah > > See > https://github.com/phonegap/phonegap-plugin-push/issues/1826#issuecomment-317750559 > Race condition is the result of multiple file references, which results in a > CopyPlistFile error. > Only create one file reference, not multiples. > {code} > cordova create foo > cd foo > cordova plugin add phonegap-plugin-push@2.0.0-rc4 > nano config.xml (add GoogleService-Info.plist file, see > https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#installation-requirements) > cordova platform add ios > cordova build ios > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13112) should not create a new file reference on each "cordova prepare"
[ https://issues.apache.org/jira/browse/CB-13112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16117720#comment-16117720 ] Shazron Abdullah commented on CB-13112: --- Found the culprit. The project test fixture in the tests folder is really old and uses an older template with an older structure. When it is saved in the test fixture in the older structure, it is saved as it was specified "Resources/GoogleService-Info.plist". In the cordova-ios@4.4.0 pbxproj structure, it is stored as "GoogleServices-Info.plist", note that the prefix is lost. Why is this important? When saving a file reference to the project, it goes through {{node-xcode/pbxProject.js/hasFile}}, which returns true in the unit test with the older template structure (so no dupes) but it returns false in the cordova-ios@4.4.0 pbxproj structure, thus it will dupe. This is definitely not the problem of "hasFile" (the code is sound), but it's through {{node-xcode/pbxProject.js/addFileResource}} which strips off the {{Resource}} prefix in {{node-xcode/pbxProject.js/correctForResourcesPath}}. ... and it turns out it is this: https://github.com/alunny/node-xcode/blob/59506f1cf9c74c180a1f830d5b9189a3cbba612e/lib/pbxProject.js#L1586 ... where the old template structure's {{Resource}} group had no {{path}} at all. Thus, the fix is to: 1. Update the unit test to use the new project structure (this may cause side effects to other unit tests, which we will have to fix) 2. Re-test the addFileResource tests, try to add duplicates 3. Fix the failing tests > should not create a new file reference on each "cordova > prepare" > > > Key: CB-13112 > URL: https://issues.apache.org/jira/browse/CB-13112 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Reporter: Shazron Abdullah >Assignee: Shazron Abdullah > > See > https://github.com/phonegap/phonegap-plugin-push/issues/1826#issuecomment-317750559 > Race condition is the result of multiple file references, which results in a > CopyPlistFile error. > Only create one file reference, not multiples. > {code} > cordova create foo > cd foo > cordova plugin add phonegap-plugin-push@2.0.0-rc4 > nano config.xml (add GoogleService-Info.plist file, see > https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#installation-requirements) > cordova platform add ios > cordova build ios > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13112) should not create a new file reference on each "cordova prepare"
[ https://issues.apache.org/jira/browse/CB-13112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16117554#comment-16117554 ] Shazron Abdullah commented on CB-13112: --- Good news -- I managed to fix it in prepare.js by modifying the code an installed platform in a Cordova project. Bad news -- I can't get a failing unit test using the same function, not sure why... > should not create a new file reference on each "cordova > prepare" > > > Key: CB-13112 > URL: https://issues.apache.org/jira/browse/CB-13112 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Reporter: Shazron Abdullah >Assignee: Shazron Abdullah > > See > https://github.com/phonegap/phonegap-plugin-push/issues/1826#issuecomment-317750559 > Race condition is the result of multiple file references, which results in a > CopyPlistFile error. > Only create one file reference, not multiples. > {code} > cordova create foo > cd foo > cordova plugin add phonegap-plugin-push@2.0.0-rc4 > nano config.xml (add GoogleService-Info.plist file, see > https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#installation-requirements) > cordova platform add ios > cordova build ios > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13112) should not create a new file reference on each "cordova prepare"
[ https://issues.apache.org/jira/browse/CB-13112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16117485#comment-16117485 ] Shazron Abdullah commented on CB-13112: --- For reference, here is the existing test: https://github.com/apache/cordova-ios/blob/8edd13aaee16d6996a4560a74d17798437b42c6f/tests/spec/unit/prepare.spec.js#L1538-L1563 My attempt at a failing test is calling this line multiple times in the test (even tried 1000 times, just in case): https://github.com/apache/cordova-ios/blob/8edd13aaee16d6996a4560a74d17798437b42c6f/tests/spec/unit/prepare.spec.js#L1548 > should not create a new file reference on each "cordova > prepare" > > > Key: CB-13112 > URL: https://issues.apache.org/jira/browse/CB-13112 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Reporter: Shazron Abdullah >Assignee: Shazron Abdullah > > See > https://github.com/phonegap/phonegap-plugin-push/issues/1826#issuecomment-317750559 > Race condition is the result of multiple file references, which results in a > CopyPlistFile error. > Only create one file reference, not multiples. > {code} > cordova create foo > cd foo > cordova plugin add phonegap-plugin-push@2.0.0-rc4 > nano config.xml (add GoogleService-Info.plist file, see > https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#installation-requirements) > cordova build ios > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13112) should not create a new file reference on each "cordova prepare"
[ https://issues.apache.org/jira/browse/CB-13112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16117474#comment-16117474 ] Shazron Abdullah commented on CB-13112: --- Applied my attempt at a failing test to cordova-ios@4.4.0, it doesn't fail, so the failure occurs somewhere else up/down the chain? Not sure yet. > should not create a new file reference on each "cordova > prepare" > > > Key: CB-13112 > URL: https://issues.apache.org/jira/browse/CB-13112 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Reporter: Shazron Abdullah >Assignee: Shazron Abdullah > > See > https://github.com/phonegap/phonegap-plugin-push/issues/1826#issuecomment-317750559 > Race condition is the result of multiple file references, which results in a > CopyPlistFile error. > Only create one file reference, not multiples. > {code} > cordova create foo > cd foo > cordova plugin add phonegap-plugin-push@2.0.0-rc4 > nano config.xml (add GoogleService-Info.plist file, see > https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#installation-requirements) > cordova build ios > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13112) should not create a new file reference on each "cordova prepare"
[ https://issues.apache.org/jira/browse/CB-13112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16117456#comment-16117456 ] Shazron Abdullah commented on CB-13112: --- Wrote what I thought was a failing unit test in the master code, I can't get it to fail. I'll fork off cordova-ios@4.4.0 and will try to get it to fail in that. If it fails there, then that means the fix is already in master. > should not create a new file reference on each "cordova > prepare" > > > Key: CB-13112 > URL: https://issues.apache.org/jira/browse/CB-13112 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Reporter: Shazron Abdullah >Assignee: Shazron Abdullah > > See > https://github.com/phonegap/phonegap-plugin-push/issues/1826#issuecomment-317750559 > Race condition is the result of multiple file references, which results in a > CopyPlistFile error. > Only create one file reference, not multiples. > {code} > cordova create foo > cd foo > cordova plugin add phonegap-plugin-push@2.0.0-rc4 > nano config.xml (add GoogleService-Info.plist file, see > https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#installation-requirements) > cordova build ios > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13112) should not create a new file reference on each "cordova prepare"
[ https://issues.apache.org/jira/browse/CB-13112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16116185#comment-16116185 ] Piero Alberto commented on CB-13112: Waiting for the fix, maybe it will solve my problem! > should not create a new file reference on each "cordova > prepare" > > > Key: CB-13112 > URL: https://issues.apache.org/jira/browse/CB-13112 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Reporter: Shazron Abdullah >Assignee: Shazron Abdullah > > See > https://github.com/phonegap/phonegap-plugin-push/issues/1826#issuecomment-317750559 > Race condition is the result of multiple file references, which results in a > CopyPlistFile error. > Only create one file reference, not multiples. > {code} > cordova create foo > cd foo > cordova plugin add phonegap-plugin-push@2.0.0-rc4 > nano config.xml (add GoogleService-Info.plist file, see > https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#installation-requirements) > cordova build ios > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org