You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/02/11 10:14:37 UTC
[GitHub] [cordova-common] WuglyakBolgoink opened a new issue #156: doc.find is not a function
WuglyakBolgoink opened a new issue #156:
URL: https://github.com/apache/cordova-common/issues/156
# 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
```
doc.find is not a function
TypeError: doc.find is not a function
at Object.resolveParent (/Users/.../.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/util/xml-helpers.js:131:51)
```
the problem is on this code block

## Information
<!-- Include all relevant information that might help understand and reproduce the problem -->
The `/cordova_v10_staging/platforms/ios/ios.json` file contain only two permission descriptions in `config_munge.files.*-Info.plist` section:

should contain all permissions
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
I use simple bash script for cleaning, install and upgrade plugins and platforms. In this case I just use clean function
```bash
function clean_cordova_project_folder() {
cd "$1" || exit
echo "clean_cordova_project_folder -> $1"
# rm -rf node_modules
rm -rf platforms
rm -rf plugins
rm -rf ul_web_hooks
rm -rf package-lock.json
npm install
cordova prepare --verbose --debug
cd ..
}
APP_FOLDER_STAGE="<yout_cordova_project_folder>"
# 1. clean folders and install packages
clean_cordova_project_folder "$APP_FOLDER_STAGE"
```
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you experiencing the issue? -->
- macos Catalina (10.15.7 (19H512))
### Version information
<!--
What are relevant versions you are using?
For example:
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
Other Frameworks: Ionic Framework and CLI version
Operating System, Android Studio, Xcode etc.
-->
- cordova@10.0.0
- cordova-ios@6.2.0
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-common] WuglyakBolgoink commented on issue #156: doc.find is not a function
Posted by GitBox <gi...@apache.org>.
WuglyakBolgoink commented on issue #156:
URL: https://github.com/apache/cordova-common/issues/156#issuecomment-777824462
@raphinesse
What I have:
- cordova - v10.0.0
- node - 14.15.5
- npm - 6.14.11
----
1. create cordova project
```bash
cordova create test157 com.example.test157 test157
```
2. open folder
```bash
cd test157
```
3. install ios platform
```bash
cordova platform add ios@6.2.0
```
4. Do prepare -> this should be OK
```bash
cordova prepare --verbose --debug
```
5. Add this two commented edit-config's into ios section
```xml
<!-- <edit-config file="*-Info.plist" mode="merge" target="NSContactsUsageDescription">-->
<!-- <string>NSContactsUsageDescription test</string>-->
<!-- </edit-config>-->
<!-- <edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">-->
<!-- <string>NSPhotoLibraryUsageDescription test</string>-->
<!-- </edit-config>-->
```
6. Do prepare -> this should be OK
```bash
cordova prepare --verbose --debug
```
7. Uncomment first config
```xml
<edit-config file="*-Info.plist" mode="merge" target="NSContactsUsageDescription">
<string>NSContactsUsageDescription test</string>
</edit-config>
```
8. Do prepare -> this should be OK
```bash
cordova prepare --verbose --debug
```
9. Uncomment second config
```xml
<edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
<string>NSPhotoLibraryUsageDescription test</string>
</edit-config>
```
10. this should throw an error
```bash
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)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-common] raphinesse closed issue #156: doc.find is not a function
Posted by GitBox <gi...@apache.org>.
raphinesse closed issue #156:
URL: https://github.com/apache/cordova-common/issues/156
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-common] WuglyakBolgoink commented on issue #156: doc.find is not a function
Posted by GitBox <gi...@apache.org>.
WuglyakBolgoink commented on issue #156:
URL: https://github.com/apache/cordova-common/issues/156#issuecomment-777795043
@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)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-common] raphinesse commented on issue #156: doc.find is not a function
Posted by GitBox <gi...@apache.org>.
raphinesse commented on issue #156:
URL: https://github.com/apache/cordova-common/issues/156#issuecomment-787501728
I just created a PR to fix this issue. It would be great if you could test if it resolves your problem.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-common] raphinesse commented on issue #156: doc.find is not a function
Posted by GitBox <gi...@apache.org>.
raphinesse commented on issue #156:
URL: https://github.com/apache/cordova-common/issues/156#issuecomment-778052066
Thanks for the quick response. I'll try to take a look at this soon.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-common] WuglyakBolgoink commented on issue #156: doc.find is not a function
Posted by GitBox <gi...@apache.org>.
WuglyakBolgoink commented on issue #156:
URL: https://github.com/apache/cordova-common/issues/156#issuecomment-787983853
Thank you @raphinesse !
I will check it on this week
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-common] raphinesse commented on issue #156: doc.find is not a function
Posted by GitBox <gi...@apache.org>.
raphinesse commented on issue #156:
URL: https://github.com/apache/cordova-common/issues/156#issuecomment-778128074
I can confirm the error occurs on my machine too.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
[GitHub] [cordova-common] raphinesse commented on issue #156: doc.find is not a function
Posted by GitBox <gi...@apache.org>.
raphinesse commented on issue #156:
URL: https://github.com/apache/cordova-common/issues/156#issuecomment-777751318
Thanks for your bug report. Could you please:
- provide a test case (either a minimal app or a unit test case) that triggers this behavior
- provide the stack trace for the error you describe
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org