Could not attach to pid
+1
this is connected with M1 and the project run from Xcode with Rosetta. I have the issue described every time I run UI test.
If I run the project without Rosetta, the issue does not appear and XCUITest works as expected
attach failed ((os/kern) invalid argument)
If you turn off "Debug Executable" in the Test action of the scheme, are you able to run your UI tests successfully? You may receive a slightly different but more descriptive error if you run your tests with the debugger turned off, or the tests may run successfully.
Either way, please file a Feedback Assistant for this issue. If you could attach the xcresult bundle that is produced from running your tests, as well as a sysdiagnose, that will help us investigate the issue.
- To access the xcresult bundle, click on the Report Navigator, then right-click on the Test node and select "Show in Finder".
- To capture a sysdiagnose, run
sudo sysdiagnose
from the command-line.
I've turned off "Debug Executable" and get this error:
2021-06-09 08:25:58.021518+0200 twtwweUITests-Runner[92048:714265] Running tests...
2021-06-09 08:25:58.029173+0200 twtwweUITests-Runner[92048:714265] The bundle “twtwweUITests” couldn’t be loaded because it doesn’t contain a version for the current architecture. Try installing a universal version of the bundle.
2021-06-09 08:25:58.029222+0200 twtwweUITests-Runner[92048:714265] (dlopen_preflight(/Users/***/Library/Developer/Xcode/DerivedData/twtwwe-ckdyjdpdhylzbvgjdttvzwllrvov/Build/Products/Debug-iphonesimulator/twtwweUITests-Runner.app/PlugIns/twtwweUITests.xctest/twtwweUITests): no suitable image found. Did find:
/Users/***/Library/Developer/Xcode/DerivedData/twtwwe-ckdyjdpdhylzbvgjdttvzwllrvov/Build/Products/Debug-iphonesimulator/twtwweUITests-Runner.app/PlugIns/twtwweUITests.xctest/twtwweUITests: mach-o, but wrong architecture)
That is from the template app with autogenerated UITests