native-run: Cannot run app in iOS simulator with "ERR_UNKNOWN: Unable to retrieve simulator list" error
Description: I run “ionic cordova emulate ios” in Terminal and got “ERR_UNKNOWN: Unable to retrieve simulator list” error. It worked fine with CLI v4.12.0
Output:
** BUILD SUCCEEDED **
Command finished with error code 0: xcodebuild -workspace,PARK Mobile.xcworkspace,-scheme,PARK Mobile,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone Xʀ,build,CONFIGURATION_BUILD_DIR=/Volumes/Storage/Developer/projects/PARK_mobile/mobile/ionic4/park-mobile/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Volumes/Storage/Developer/projects/PARK_mobile/mobile/ionic4/park-mobile/platforms/ios/build/sharedpch No scripts found for hook “after_compile”. No scripts found for hook “after_build”.
native-run ios --app “platforms/ios/build/emulator/PARK Mobile.app” --verbose 2019-06-05T20:19:12.870Z client:usbmuxd connectUsbmuxdSocket 2019-06-05T20:19:12.872Z client:usbmuxd getDevices 2019-06-05T20:19:12.872Z protocol:usbmux socket write: {“messageType”:“ListDevices”} 2019-06-05T20:19:13.130Z native-run Caught fatal error: { Error: Unable to retrieve simulator list at Object.getSimulators (/usr/local/lib/node_modules/native-run/dist/ios/utils/simulator.js:26:15) at Object.run (/usr/local/lib/node_modules/native-run/dist/ios/run.js:36:25) code: undefined, exitCode: 1, data: undefined } ERR_UNKNOWN: Unable to retrieve simulator list 2019-06-05T20:19:13.136Z protocol:usbmux Response: {“DeviceList”:[]} [ERROR] An error occurred while running subprocess native-run.
native-run ios --app "platforms/ios/build/emulator/PARK Mobile.app" --verbose exited with exit code 1. Re-running this command with the --verbose flag may provide more information.
ionic:utils-process onBeforeExit handler: ‘process.exit’ received +0ms ionic:utils-process onBeforeExit handler: running 3 functions +0ms ionic:utils-process processExit: exiting (exit code: 1) +24ms
My ionic info
:
Ionic:
Ionic CLI : 5.0.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.3.0
@angular-devkit/build-angular : 0.13.7
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.7
@ionic/angular-toolkit : 1.4.1
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 7.0.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 13 other plugins)
Utility:
cordova-res : 0.3.0
native-run : 0.2.2
System:
ios-deploy : 1.9.4
ios-sim : 8.0.1
NodeJS : v10.16.0 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 15 (5 by maintainers)
I had the same problem. Was using Ionic CLI v5.0.0 and had to downgrade it to v4.12.0 to get it working again =/
For those of you still getting
Unable to retrieve simulator list: Cannot read property 'filter' of undefined
on the latest version ofnative-run
, can you please run the following commands and attach their output?xcodebuild -version
xcrun simctl list devices --json
If you can provide any details about having multiple versions of Xcode, or when you upgraded and from which version, that would also be very helpful.
I’ve gotten at least one report that someone is seeing the old
simctl
device format (ex:iOS 12.1
) using Xcode 10+ and I am unable to reproduce the issue (switching to Xcode 10+ changes the device format to the identifier format12.1
->com.apple.CoreSimulator.SimRuntime.iOS-12-1
)Thanks!
Can you guys update to the latest version (
npm install -g native-run
) and post your output please? There have been a few fixes and there should be better output for simulator errors, thanks!@tlancina turned out my npm install was corrupted and my update attempt didn’t work. I was on 0.2.2 native-run, sorry for wasting your time and thanks for the answer 👍
@tlancina 0.2.6 fixed my problem, thanks again! 🎉