Post

Replies

Boosts

Views

Activity

simctl clone fails - failed to clone the device data path
We're trying to use simctl clone on CI machines for our testing needs. The current flow is: invoke simctl create and then simctl boot to boot the simulator to prepare its state then invoke simctl shutdown to make it finally clonable After this, we try to use simctl clone to create simulators on demand and then boot them after that in order to achieve better perf. However, on some machines clone invocation fails. CoreSimulator.log contains the following log statements: Sep 6 14:24:18 build-machine01 CoreSimulatorService[25622] <Error>: Failed to clone the device data path from /Users/_emcee/Library/Developer/CoreSimulator/Devices/4DFD3185-EAE5-4FB0-8C7D-648B7350B1A1/data to /Users/_emcee/Library/Developer/CoreSimulator/Devices/CEB8D8B8-5FE4-43B2-90C2-22769AFAB387/data, error = Error Domain=NSCocoaErrorDomain Code=260 "The file “data” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/_emcee/Library/Developer/CoreSimulator/Devices/4DFD3185-EAE5-4FB0-8C7D-648B7350B1A1/data, NSUnderlyingError=0x600003bd5fb0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} Sep 6 14:24:18 build-machine01 CoreSimulatorService[25622] <Error>: Failed to re-create device that was encountered in the creation state (Emcee Sim Clone of 4DFD3185-EAE5-4FB0-8C7D-648B7350B1A1 iPhone_12 iOS_14_1 (CEB8D8B8-5FE4-43B2-90C2-22769AFAB387, iOS 14.1, Creating)): Error Domain=NSCocoaErrorDomain Code=260 "The file “data” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/_emcee/Library/Developer/CoreSimulator/Devices/4DFD3185-EAE5-4FB0-8C7D-648B7350B1A1/data, NSUnderlyingError=0x600003bd5fb0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} Sep 6 14:24:18 build-machine01 CoreSimulatorService[25622] <Error>: New device is stuck in creation state, deleting: Emcee Sim Clone of 4DFD3185-EAE5-4FB0-8C7D-648B7350B1A1 iPhone_12 iOS_14_1 (CEB8D8B8-5FE4-43B2-90C2-22769AFAB387, iOS 14.1, Creating) Sep 6 14:24:18 build-machine01 CoreSimulatorService[25622] <Error>: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.} Sep 6 14:24:18 build-machine01 CoreSimulatorService[25622] <Error>: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.} Sep 6 14:24:18 build-machine01 com.apple.CoreSimulator.simctl[24528] <Error>: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.} This happens on Xcode 13.4, macOS 12.3-12.5. We use separate standard user for testing purposes (_emcee in logs above). This is flaky: on the same machine clone may fail as well as succeed. The flow (create-boot-shutdown-clone) is the same for all runtimes, however. It is not clear why failures occur and why it can't read data folder from the simulator being cloned. Please suggest what might be wrong or how to investigate further?
0
0
613
Sep ’22