[jira] [Commented] (CB-13564) Multiple edit-config items for Info.plist causing error
[ https://issues.apache.org/jira/browse/CB-13564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16592894#comment-16592894 ] Jan Piotrowski (Sujan) commented on CB-13564: - [~bytenik] I am unfortunately not an real Cordova developer - I better leave the actual coding to people that can. But my suggestion: If you want to push this forward you a) create a PR with the suggested changes, just mention that it has to be understood better and investigated before mergin and b) best create a Github repo with a reproduction (maybe 2 because from the previous comment it seems a plugin is needed as well). But that both existing, enough people should be able to reproduce, understand and dissect it so that this should move forward. > Multiple edit-config items for Info.plist causing error > --- > > Key: CB-13564 > URL: https://issues.apache.org/jira/browse/CB-13564 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-cli >Affects Versions: 7.1.0 >Reporter: Tom Bell >Priority: Major > > I've updated `cordova-ios` to 4.5.3 and `cordova-plugin-contacts` to 3.0.0, > I've got the following > working: > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > {code} > However when I decided to move some stuff from an `after_prepare` hook > script, to use edit-config, it fails with an error `doc.find is not a > function` > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > > UIStatusBarStyleLightContent > > {code} > If I take out the additional `` everything works. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13564) Multiple edit-config items for Info.plist causing error
[ https://issues.apache.org/jira/browse/CB-13564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16592886#comment-16592886 ] David Pfeffer commented on CB-13564: [~Sujan12] Can you provide some guidance here? Even if we wanted to help submit a pull request, I have no idea the answer to the above question about what that code is doing. > Multiple edit-config items for Info.plist causing error > --- > > Key: CB-13564 > URL: https://issues.apache.org/jira/browse/CB-13564 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-cli >Affects Versions: 7.1.0 >Reporter: Tom Bell >Priority: Major > > I've updated `cordova-ios` to 4.5.3 and `cordova-plugin-contacts` to 3.0.0, > I've got the following > working: > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > {code} > However when I decided to move some stuff from an `after_prepare` hook > script, to use edit-config, it fails with an error `doc.find is not a > function` > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > > UIStatusBarStyleLightContent > > {code} > If I take out the additional `` everything works. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13564) Multiple edit-config items for Info.plist causing error
[ https://issues.apache.org/jira/browse/CB-13564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16535215#comment-16535215 ] Anibal Sanchez commented on CB-13564: - Same issue here, and it is not resolved. Please, also check CB-12070. Trying to use cordova-plugin-appavailability plugin. {{}} {{ }} {{ fb}} {{ twitter}} {{ }} {{}} macOS 10.13.5 Xcode 9.4.1 Cordova 8.0.0 Cordova iOS 4.5.4 {{(node:9134) UnhandledPromiseRejectionWarning: TypeError: doc.find is not a function}} {{ at Object.resolveParent (/usr/local/lib/node_modules/cordova/node_modules/cordova-common/src/util/xml-helpers.js:207:26)}} {{ at /usr/local/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:347:53}} {{ at Array.forEach ()}} {{ at is_conflicting (/usr/local/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:339:17)}} {{ at PlatformMunger.add_config_changes (/usr/local/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:190:33)}} {{ }} > Multiple edit-config items for Info.plist causing error > --- > > Key: CB-13564 > URL: https://issues.apache.org/jira/browse/CB-13564 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-cli >Affects Versions: 7.1.0 >Reporter: Tom Bell >Priority: Major > > I've updated `cordova-ios` to 4.5.3 and `cordova-plugin-contacts` to 3.0.0, > I've got the following > working: > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > {code} > However when I decided to move some stuff from an `after_prepare` hook > script, to use edit-config, it fails with an error `doc.find is not a > function` > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > > UIStatusBarStyleLightContent > > {code} > If I take out the additional `` everything works. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13564) Multiple edit-config items for Info.plist causing error
[ https://issues.apache.org/jira/browse/CB-13564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388264#comment-16388264 ] Jacob Weber commented on CB-13564: -- I think this needs the attention of a Cordova developerthe code is pretty complex, and I don't want to submit a patch without fully understanding it. The error consistently happens when you try to modify Info.plist in both a plugin and config.xml. Here's how to reproduce it. First create a plugin that does an edit-config on Info.plist: {code:java} # /sample-plugin/plugin.xml http://cordova.apache.org/ns/plugins/1.0; id="sample-plugin" version="1.0.0"> Sample foo {code} {code:java} # /sample-plugin/package.json { "name": "sample-plugin", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" }{code} Then try the following: {code:java} $ node --version v8.9.4 $ cordova --version 8.0.0 $ cordova create CordovaTest com.sample.cordovatest CordovaTest $ cd CordovaTest $ cordova platform add ios@4.5.4 $ cordova plugin add /sample-plugin/ $ rm -rf platforms/ node_modules/ plugins/ package-lock.json{code} Then edit {{config.xml}} and add another edit-config for Info.plist: {code:java} bar {code} Then run: {code:java} $ cordova prepare --verbose{code} The output will end in: {code:java} (node:43598) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: doc.find is not a function (node:43598) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.{code} > Multiple edit-config items for Info.plist causing error > --- > > Key: CB-13564 > URL: https://issues.apache.org/jira/browse/CB-13564 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-cli >Reporter: Tom Bell >Priority: Major > > I am on 7.1.0 of `cordova-cli`, there was no `7.1.0` in the "Affects > Versions" dropdown. > I've updated `cordova-ios` to 4.5.3 and `cordova-plugin-contacts` to 3..0.0, > I've got the following > working: > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > {code} > However when I decided to move some stuff from an `after_prepare` hook > script, to use edit-config, it fails with an error `doc.find is not a > function` > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > > UIStatusBarStyleLightContent > > {code} > If I take out the additional `` everything works. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13564) Multiple edit-config items for Info.plist causing error
[ https://issues.apache.org/jira/browse/CB-13564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16290991#comment-16290991 ] Jan Piotrowski (Sujan) commented on CB-13564: - There is no PR that could be merged, feel free to create one and refer to this issue if you think this code solves the problem and should be included. > Multiple edit-config items for Info.plist causing error > --- > > Key: CB-13564 > URL: https://issues.apache.org/jira/browse/CB-13564 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-cli >Reporter: Tom Bell > > I am on 7.1.0 of `cordova-cli`, there was no `7.1.0` in the "Affects > Versions" dropdown. > I've updated `cordova-ios` to 4.5.3 and `cordova-plugin-contacts` to 3..0.0, > I've got the following > working: > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > {code} > However when I decided to move some stuff from an `after_prepare` hook > script, to use edit-config, it fails with an error `doc.find is not a > function` > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > > UIStatusBarStyleLightContent > > {code} > If I take out the additional `` everything works. -- 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-13564) Multiple edit-config items for Info.plist causing error
[ https://issues.apache.org/jira/browse/CB-13564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16290860#comment-16290860 ] David Pfeffer commented on CB-13564: Any chance of the above fix being included in a release soon? > Multiple edit-config items for Info.plist causing error > --- > > Key: CB-13564 > URL: https://issues.apache.org/jira/browse/CB-13564 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-cli >Reporter: Tom Bell > > I am on 7.1.0 of `cordova-cli`, there was no `7.1.0` in the "Affects > Versions" dropdown. > I've updated `cordova-ios` to 4.5.3 and `cordova-plugin-contacts` to 3..0.0, > I've got the following > working: > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > {code} > However when I decided to move some stuff from an `after_prepare` hook > script, to use edit-config, it fails with an error `doc.find is not a > function` > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > > UIStatusBarStyleLightContent > > {code} > If I take out the additional `` everything works. -- 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-13564) Multiple edit-config items for Info.plist causing error
[ https://issues.apache.org/jira/browse/CB-13564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16260039#comment-16260039 ] Ryan Murphy commented on CB-13564: -- I encountered the same after following the docs for cordova-plugin-camera. I was able to patch it on my machine at `cordova/node_modules/cordova-common` in `ConfigChanges.js`. *From* {code:javascript} var file_xml = self.config_keeper.get(self.project_dir, self.platform, editchange.file).data; var resolveEditTarget = xml_helpers.resolveParent(file_xml, editchange.target); // etc... {code} *To:* {code:javascript} var file = self.config_keeper.get(self.project_dir, self.platform, editchange.file); if (file.type === 'xml') { var file_xml = file.data; var resolveEditTarget = xml_helpers.resolveParent(file_xml, editchange.target); // etc... } // else?? {code} I'm not sure what the logic is actually doing, so I'm not sure if there should be an else for non-xml. Also I'm making a huge assumption that file.type === 'xml' if it's not plist. The only type I encountered in my own usage was plist. > Multiple edit-config items for Info.plist causing error > --- > > Key: CB-13564 > URL: https://issues.apache.org/jira/browse/CB-13564 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-cli >Reporter: Tom Bell > > I am on 7.1.0 of `cordova-cli`, there was no `7.1.0` in the "Affects > Versions" dropdown. > I've updated `cordova-ios` to 4.5.3 and `cordova-plugin-contacts` to 3..0.0, > I've got the following > working: > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > {code} > However when I decided to move some stuff from an `after_prepare` hook > script, to use edit-config, it fails with an error `doc.find is not a > function` > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > > UIStatusBarStyleLightContent > > {code} > If I take out the additional `` everything works. -- 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-13564) Multiple edit-config items for Info.plist causing error
[ https://issues.apache.org/jira/browse/CB-13564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16254226#comment-16254226 ] Jacob Weber commented on CB-13564: -- Having the same issue with cordova-cli 7.1.0 and cordova-plugin-camera 3.0.0, when I add two edit-config entries for NSCameraUsageDescription and NSPhotoLibraryUsageDescription. > Multiple edit-config items for Info.plist causing error > --- > > Key: CB-13564 > URL: https://issues.apache.org/jira/browse/CB-13564 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-cli >Reporter: Tom Bell > > I am on 7.1.0 of `cordova-cli`, there was no `7.1.0` in the "Affects > Versions" dropdown. > I've updated `cordova-ios` to 4.5.3 and `cordova-plugin-contacts` to 3..0.0, > I've got the following > working: > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > {code} > However when I decided to move some stuff from an `after_prepare` hook > script, to use edit-config, it fails with an error `doc.find is not a > function` > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > > UIStatusBarStyleLightContent > > {code} > If I take out the additional `` everything works. -- 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-13564) Multiple edit-config items for Info.plist causing error
[ https://issues.apache.org/jira/browse/CB-13564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249794#comment-16249794 ] Tom Bell commented on CB-13564: --- It seems that the entry for this inside `platforms/ios/ios.json` is not created during a prepare, and only when you add a platform, so if you add new `edit-config` it fails until you remove/add a platform, which seems overkill. {code:diff} diff --git a/platforms/ios/ios.json b/platforms/ios/ios.json index 8194271b..3e5b7ec9 100644 --- a/platforms/ios/ios.json +++ b/platforms/ios/ios.json @@ -31,6 +31,14 @@ "id": "config.xml" } ], + "UIStatusBarStyle": [ +{ + "xml": "UIViewControllerBasedStatusBarAppearance", + "count": 1, + "mode": "merge", + "id": "config.xml" +} + ], "CFBundleURLTypes": [ { "xml": "CFBundleURLSchemescapsulemobile", {code} > Multiple edit-config items for Info.plist causing error > --- > > Key: CB-13564 > URL: https://issues.apache.org/jira/browse/CB-13564 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-cli >Reporter: Tom Bell > > I am on 7.1.0 of `cordova-cli`, there was no `7.1.0` in the "Affects > Versions" dropdown. > I've updated `cordova-ios` to 4.5.3 and `cordova-plugin-contacts` to 3..0.0, > I've got the following > working: > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > {code} > However when I decided to move some stuff from an `after_prepare` hook > script, to use edit-config, it fails with an error `doc.find is not a > function` > {code:xml} > target="NSContactsUsageDescription"> > We require permission to access your contacts so you can import > contacts into [redacted] > > > UIStatusBarStyleLightContent > > {code} > If I take out the additional `` everything works. -- 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