On our aws mac host, xcodebuild fails to launch our app on the ios simulator. Here is the command:
xcodebuild ONLY_ACTIVE_ARCH=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ENABLE_TESTABILITY=YES -sdk iphonesimulator -destination ‘platform=iOS Simulator,name=iPhone 14,OS=16.0’ -workspace XXXXX.xcworkspace -scheme Stage -configuration Debug test -verbose
and here is the error message:
iOSSimulator: F9291ED3-BEA6-4772-AF51-DBE1322E857B: Failed to launch app with identifier: XXXXX and options: {
"activate_suspended" = 0;
arguments = (
);
environment = {
"CA_ASSERT_MAIN_THREAD_TRANSACTIONS" = 0;
"CA_DEBUG_TRANSACTIONS" = 0;
"DYLD_FRAMEWORK_PATH" = "/Users/ec2-user/Library/Developer/Xcode/DerivedData/XXXXX-clanoahlzfruqucjqmwowignexic/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks";
"DYLD_INSERT_LIBRARIES" = "/Users/ec2-user/Library/Developer/Xcode/DerivedData/XXXXX-clanoahlzfruqucjqmwowignexic/Build/Products/Debug-iphonesimulator/Stage.app/Frameworks/libXCTestBundleInject.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib";
"DYLD_LIBRARY_PATH" = "/Users/ec2-user/Library/Developer/Xcode/DerivedData/XXXXX-clanoahlzfruqucjqmwowignexic/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/lib";
"LLVM_PROFILE_FILE" = "/var/folders/sz/hvcsl7r53m3_n5l152_210c80000gn/T/com.XXXXX.pm-stage/5B3CB5FD-748E-4FAF-B84D-C47CE86F09B9-35456-0000112C6005E8EB/773D2FD5-5D40-4A63-8E37-F3C33A6FB45B-%p%c.profraw";
"MTC_CRASH_ON_REPORT" = 1;
NSApplicationQuitWithoutSuddenTermination = YES;
NSUnbufferedIO = YES;
NSZombieEnabled = YES;
"OS_ACTIVITY_DT_MODE" = YES;
"OS_ACTIVITY_MODE" = disable;
"RUN_DESTINATION_DEVICE_NAME" = "iPhone 14";
"RUN_DESTINATION_DEVICE_PLATFORM_IDENTIFIER" = "com.apple.platform.iphonesimulator";
"RUN_DESTINATION_DEVICE_UDID" = "F9291ED3-BEA6-4772-AF51-DBE1322E857B";
"SQLITE_ENABLE_THREAD_ASSERTIONS" = 1;
XCInjectBundleInto = unused;
XCTestBundlePath = "PlugIns/UnitTests.xctest";
XCTestConfigurationFilePath = "";
XCTestSessionIdentifier = "590D832A-0830-4798-A990-1555B39E090B";
"__XCODE_BUILT_PRODUCTS_DIR_PATHS" = "/Users/ec2-user/Library/Developer/Xcode/DerivedData/XXXXX-clanoahlzfruqucjqmwowignexic/Build/Products/Debug-iphonesimulator";
"__XPC_DYLD_FRAMEWORK_PATH" = "/Users/ec2-user/Library/Developer/Xcode/DerivedData/XXXXX-clanoahlzfruqucjqmwowignexic/Build/Products/Debug-iphonesimulator";
"__XPC_DYLD_LIBRARY_PATH" = "/Users/ec2-user/Library/Developer/Xcode/DerivedData/XXXXX-clanoahlzfruqucjqmwowignexic/Build/Products/Debug-iphonesimulator";
"__XPC_LLVM_PROFILE_FILE" = "/var/folders/sz/hvcsl7r53m3_n5l152_210c80000gn/T/com.XXXXX.pm-stage/5B3CB5FD-748E-4FAF-B84D-C47CE86F09B9-35456-0000112C6005E8EB/773D2FD5-5D40-4A63-8E37-F3C33A6FB45B-%p%c.profraw";
};
stderr = "/dev/ttys003";
stdout = "/dev/ttys003";
"terminate_running_process" = 1;
"wait_for_debugger" = 0;
} (error = Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={NSLocalizedDescription=Application launch for 'com.XXXXX.pm-stage' did not return a valid pid nor a launch error.})
2022-10-27 00:15:47.875 xcodebuild[35456:2529897] IDETestOperationsObserverDebug: Failure collecting logarchive: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.testmanagerd.control was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.testmanagerd.control was invalidated: failed at lookup with error 3 - No such process.}
2022-10-27 00:16:04.141 xcodebuild[35456:2529810] [MT] IDETestOperationsObserverDebug: 35.913 elapsed -- Testing started completed.
2022-10-27 00:16:04.141 xcodebuild[35456:2529810] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2022-10-27 00:16:04.141 xcodebuild[35456:2529810] [MT] IDETestOperationsObserverDebug: 35.913 sec, +35.913 sec -- end
Testing failed:
Application launch for 'com.XXXXX.pm-stage' did not return a valid pid nor a launch error.
Stage encountered an error (Failed to install or launch the test runner. If you believe this error represents a bug, please attach the result bundle at /Users/ec2-user/Library/Developer/Xcode/DerivedData/XXXXX-clanoahlzfruqucjqmwowignexic/Logs/Test/Test-Stage-2022.10.27_00-14-24-+0000.xcresult. (Underlying Error: Application launch for 'com.XXXXX.pm-stage' did not return a valid pid nor a launch error. No such process))
** TEST FAILED **
anything like this happened to anyone before? Any idea what could be the issue?
2
Answers
Connected to the host via GUI. Launched Xcode for the first time, it asked me to install rosetta. After installing rosetta everything works fine.
It would be really helpful if you could list some of the things that you tried yourself to solve the problem. That would help us narrow the problem down.
Just from reading the error message, I would guess that this is most likely an issue with authorization.
I do not know whole lot about using AWS, but have you tried running: