Closed WuglyakBolgoink closed 3 years ago
Thanks for your bug report. Could you please:
@raphinesse I try to find a 100% reproducible case...
But now only stacktrace:
Prepared iOS project successfully
doc.find is not a function
TypeError: doc.find is not a function
at Object.resolveParent (/Users/xxxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/util/xml-helpers.js:132:24)
at /Users/xxxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:315:59
at Array.forEach (<anonymous>)
at PlatformMunger._is_conflicting (/Users/xxxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:307:21)
at PlatformMunger.add_config_changes (/Users/xxxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:176:44)
at /Users/xxxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare/platforms.js:66:24
at async Promise.all (index 0)
@raphinesse
What I have:
cordova create test157 com.example.test157 test157
cd test157
cordova platform add ios@6.2.0
cordova prepare --verbose --debug
6. Do prepare -> this should be OK
```bash
cordova prepare --verbose --debug
<edit-config file="*-Info.plist" mode="merge" target="NSContactsUsageDescription">
<string>NSContactsUsageDescription test</string>
</edit-config>
cordova prepare --verbose --debug
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
<string>NSPhotoLibraryUsageDescription test</string>
</edit-config>
cordova prepare --verbose --debug
Prepared iOS project successfully
doc.find is not a function
TypeError: doc.find is not a function
at Object.resolveParent (/Users/xxxUSERxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/util/xml-helpers.js:132:24)
at /Users/xxxUSERxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:315:59
at Array.forEach (<anonymous>)
at PlatformMunger._is_conflicting (/Users/xxxUSERxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:307:21)
at PlatformMunger.add_config_changes (/Users/xxxUSERxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:176:44)
at /Users/xxxUSERxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare/platforms.js:66:24
at async Promise.all (index 0)
Thanks for the quick response. I'll try to take a look at this soon.
I can confirm the error occurs on my machine too.
I just created a PR to fix this issue. It would be great if you could test if it resolves your problem.
Thank you @raphinesse !
I will check it on this week
Bug Report
Problem
What is expected to happen?
cordova prepare should be finished successful
What does actually happen?
ios prepare finished with doc.find is not a function
the problem is on this code block
Information
The
/cordova_v10_staging/platforms/ios/ios.json
file contain only two permission descriptions inconfig_munge.files.*-Info.plist
section:should contain all permissions
my ios config:
Command or Code
I use simple bash script for cleaning, install and upgrade plugins and platforms. In this case I just use clean function
Environment, Platform, Device
Version information
Checklist