Closed alexfoxy closed 7 years ago
Ugh. I can't repro this on my system but I think I know where these happen. If you have the error stacktrace that would help.
Here's the full stack:
Error: TypeError: Cannot read property 'replace' of undefined
at remove (/Users/alexfox/amplify/krft/platforms/ios/cordova/node_modules/ios-sim/src/lib.js:282:70)
at Array.forEach (native)
at Object.lib.getdevicetypes (/Users/alexfox/amplify/krft/platforms/ios/cordova/node_modules/ios-sim/src/lib.js:292:22)
at Object.listEmulatorImages [as run] (/Users/alexfox/amplify/krft/platforms/ios/cordova/lib/list-emulator-images:36:29)
at deployToSim (/Users/alexfox/amplify/krft/platforms/ios/cordova/lib/run.js:146:50)
at /Users/alexfox/amplify/krft/platforms/ios/cordova/lib/run.js:88:20
at _fulfilled (/Users/alexfox/amplify/krft/platforms/ios/cordova/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/Users/alexfox/amplify/krft/platforms/ios/cordova/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/Users/alexfox/amplify/krft/platforms/ios/cordova/node_modules/q/q.js:796:13)
at /Users/alexfox/amplify/krft/platforms/ios/cordova/node_modules/q/q.js:604:44
One last thing, node --version
?
v6.1.0
Published 5.0.13 - https://github.com/phonegap/ios-sim/releases/tag/5.0.13
Thanks!
Thanks!
+1
I am getting same error
Can any one explain, how to resolve this issue ?
I just want to send my .app
file to facebook review and this command is not working !
I am getting same error when rung any command
Facing the same issue
TypeError: Cannot read property 'devicetypes' of undefined at fixSimCtlList (~/.nvm/versions/node/v12.14.1/lib/node_modules/ios-sim/src/helpers.js:12:38) at getDeviceTypes (~/.nvm/versions/node/v12.14.1/lib/node_modules/ios-sim/src/helpers.js:30:10) at ShowDeviceTypesCommand.run (~/.nvm/versions/node/v12.14.1/lib/node_modules/ios-sim/src/commands/showdevicetypes.js:7:25)
Has this been resolved yet ?
Set command line tool version from your Xcode preferences. It worked for me
You might need to print-path
and make sure Xcode
is being used and NOT Command Line Tools
.
$ xcode-select --print-path
/Library/Developer/CommandLineTools
$ sudo xcode-select -s /Applications
Now do print-path
again and you would see
$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
I'm having problems running the command "ios-sim showdevicetypes" from the terminal. The problem points to simctl.list() throwing an error however if I run simctl stand alone in a node shell it returns a reasonable list of device simulators: https://gist.github.com/alexfoxy/998ad605cf42734bdc5c40231e3cadce
I discovered this issue whilst running cordova run ios.
System Specs
[x] 1. sw_vers -productVersion 10.12.1
[x] 2. ios-sim --version 5.0.12
[x] 3. xcodebuild -version Xcode 8.1 - Build version 8T61a
[x] 4. xcode-select --print-path /Applications/Xcode.app/Contents/Developer
[x] 5. gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1 Apple LLVM version 8.0.0 (clang-800.0.42.1) Target: x86_64-apple-darwin16.1.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin