cordova-ios icon indicating copy to clipboard operation
cordova-ios copied to clipboard

Show [ios-sim] Simulator already running error if simulator is already running when execute cordova run ios

Open EzioLi01 opened this issue 2 years ago • 5 comments

Hey experts,

Please check this if it's a bug or the expected behavior. Thanks!

  1. Create sample app and add iOS platform
  2. Open simulator
  3. Execute cordova run ios in this target simulator
  4. Build successfully
  5. Show error [ios-sim] Simulator already running
  6. App cannot auto-open in simulator

EzioLi01 avatar Aug 10 '23 08:08 EzioLi01

Hi ! Same problem here with latest cordova tooling, and no matter the ios simulator used

cordova emulate ios
[.. bunch of output]
** BUILD SUCCEEDED **

Deploying to simulator
No target specified for emulator. Deploying to "iPhone-SE-3rd-generation, 17.0" simulator.
[ios-sim] device.name: iPhone SE (3rd generation)

[ios-sim] device.runtime: iOS 17.0

[ios-sim] device.id: 5B995DC7-5578-438D-AB4E-EE4248886DBC

Error: Unhandled error. ('[ios-sim] Simulator already running.\n')

cgimenez avatar Oct 10 '23 13:10 cgimenez

Same. I have to first close the simulator before running that command, which is not convenient as the simulator takes quite some time to launch and be ready.

Heshyo avatar Jan 23 '24 06:01 Heshyo

Well ... no. Closing the simulator still does not work. The sample cordova app does not get deployed and the simulator does not open. I just started with cordova so im using the latest version and trying out creating a sample app.

What i did for now to deploy it is to open the .xcodeproj in xcode. if you encounter unable to unlock, just set read/write permissions to the whole folder.

chitgoks avatar Feb 13 '24 08:02 chitgoks

A potential workaround is to simply launch the "Simulator" application.

Apple has 2 applications, a simctl application which is responsible for booting and managing simulators, and a Simulator app which acts as the "frontend" GUI application into all booted simulators. So it sounds like the simctl is being used, but the Simulator app isn't being launched.

breautek avatar Mar 11 '24 12:03 breautek

@breautek I tried to start the Simulator app first and then did cordova run ios, but the same error occurred. This problem is slowing down the development on iOS and annoying.

GitToTheHub avatar Aug 19 '24 08:08 GitToTheHub