cordova-plugin-iosrtc
cordova-plugin-iosrtc copied to clipboard
Bug: Can't install plugin on latest cordova/xcode
YOU MUST read first!
Please use Community Forum for general technical discussions and questions.
- [X ] I have used Google with the error message or bug in association with the library and Cordova words to make sure the issue I'm reporting is only related to iOSRTC.
- [ X] I have provided steps to reproduce (e.g. using sample app code https://github.com/cordova-rtc/cordova-plugin-iosrtc-sample or updated
extra/renderer-and-libwebrtc-tests.jsfile). - [ X] I have provided versions of third party library name, ios, Xcode and plugin version and adapter.js version if used.
Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed, removing this checkbox will result in automatic closed issue.
Versions affected
- Cordova version (e.g 7.1.0): 12.0.0 ([email protected])
- Cordova iOS version (e.g 5.1.0): 7.0.0
- Plugin version (e.g 6.0.12): 8.0.4
- iOS version (e.g 10.2): N/A
- Xcode version (e.g 11.1 - 11A1027): 14.0.1 (14A400)
- Xcode command line tools com.apple.pkg.CLTools_Executables version: 14.2.0.0.1.1668646533
- WebRTC-adapter version (e.g. 7.4.0): N/A
- WebRTC Framework version (e.g. JSSip 3.1.2): N/A
Description
I have updated nodejs, npm, cordova, cordova-ios, xcode, xcode command line tools, and everything else to the latest version. It's impossible to install the plugin any more. I have tried to install it on Windows OS and Mac OS, and the error is the same.
Steps to reproduce
Can be reproduced from an empty project, from Mac os command line, if cordova and xcode and xcode cmd line tools are updated to the latest version, for example with this script:
npm update -g cordova create cordovabugiosrtc com.example.hello HelloWorld cd cordovabugiosrtc sudo cordova platform add ios sudo cordova plugin add cordova-plugin-iosrtc
Expected results
installed
Actual results
$> sudo cordova plugin add cordova-plugin-iosrtc
Installing "cordova-plugin-iosrtc" for ios Error during processing of action! Attempting to revert... Failed to install 'cordova-plugin-iosrtc': TypeError [ERR_INVALID_ARG_TYPE]: Uh oh! The "path" argument must be of type string. Received undefined at new NodeError (node:internal/errors:399:5) at validateString (node:internal/validators:163:11) at Object.basename (node:path:1309:5) at new pbxFile (/Volumes/dev/cordovabugiosrtc/node_modules/xcode/lib/pbxFile.js:189:26) at pbxProject.addBuildPhase (/Volumes/dev/cordovabugiosrtc/node_modules/xcode/lib/pbxProject.js:921:26) at install (/Volumes/dev/cordovabugiosrtc/node_modules/cordova-ios/lib/plugman/pluginHandlers.js:124:31) at ActionStack.process (/Volumes/dev/cordovabugiosrtc/node_modules/cordova-common/src/ActionStack.js:55:25) at PluginManager.doOperation (/Volumes/dev/cordovabugiosrtc/node_modules/cordova-common/src/PluginManager.js:111:24) at PluginManager.addPlugin (/Volumes/dev/cordovabugiosrtc/node_modules/cordova-common/src/PluginManager.js:141:21) at Api.addPlugin (/Volumes/dev/cordovabugiosrtc/node_modules/cordova-ios/lib/Api.js:258:14) Uh oh! The "path" argument must be of type string. Received undefined
A precision
I have tried to install an older version of cordova-cli, and it doesn't fix the error. So i conclude the plugin add error could be related to the version of xcode command line tools or xcode. This is what the last step of the stack trace suggests.
So I have added the version of the Xcode command line tools in the versions block above, obtained with the command pkgutil --pkg-info=com.apple.pkg.CLTools_Executables. Maybe having at least this version installed helps reproducing the error?
Try using cordova 10 then 11
Also no sudo
@bonjourjoel look at this solution I think you have the same issue: https://github.com/cordova-rtc/cordova-plugin-iosrtc/issues/776#issuecomment-1703918816