Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'application does not support the x86_64 Simulator architecture' error on an automation test start on iOS simulator on MBP M1 Pro (arm) #2489

Closed
iTemich opened this issue Nov 6, 2024 · 15 comments

Comments

@iTemich
Copy link

iTemich commented Nov 6, 2024

I receive org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: The com.some_app.ios application does not support the x86_64 Simulator architecture: error on test start on iOS simulator after update to XCUITest driver version 7.28.3

Environment:
Appium - 2.12.1
XCUITest - 7.28.3
MacOS - 15.1 (24B83) Sequoia
Xcode - 16.1 (16B40)
Simulator - iPhone 15 Pro iOS 17.5 (21F79)
Machine - MacBook Pro M1 Pro

This error reproducing, in my case, starts from xcuitest driver version 6.0.2 - https://github.com/appium/appium-xcuitest-driver/releases/tag/v6.0.2, in version 6.0.1, this issue doesn't reproduce (tested locally).

Info:
lipo -info <path to app>APP_NAME.app/APP_NAME terminal command result on the machine - Non-fat file: <path to app>APP_NAME.app/APP_NAME is architecture: arm64

uname -m terminal command result on the machine - arm64

Appium log:

Starting appium server...
[Appium] Welcome to Appium v2.12.1
[Appium] Non-default server args:
[Appium] { address: '127.0.0.1',
  port: 18722,
  relaxedSecurityEnabled: true,
  sessionOverride: true }
[Appium] The autodetected Appium home path: /Users/artembilous/.appium
[Appium] Attempting to load driver uiautomator2...
[Appium] Attempting to load driver espresso...
[Appium] Attempting to load driver xcuitest...
[Appium] Requiring driver at /Users/artembilous/.appium/node_modules/appium-uiautomator2-driver/build/index.js
[Appium] Requiring driver at /Users/artembilous/.appium/node_modules/appium-espresso-driver/build/index.js
[Appium] Requiring driver at /Users/artembilous/.appium/node_modules/appium-xcuitest-driver/build/index.js
[Appium] AndroidUiautomator2Driver has been successfully loaded in 1.491s
[Appium] XCUITestDriver has been successfully loaded in 2.578s
[Appium] EspressoDriver has been successfully loaded in 3.492s
[Appium] Appium REST http interface listener started on http://127.0.0.1:18722
[Appium] Available drivers:
[Appium]   - uiautomator2@2.45.1 (automationName 'UiAutomator2')
[Appium]   - espresso@2.40.0 (automationName 'Espresso')
[Appium]   - xcuitest@7.28.3 (automationName 'XCUITest')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[HTTP] --> GET /status {}
[AppiumDriver@ea76] Calling AppiumDriver.getStatus() with args: []
[AppiumDriver@ea76] Responding to client with driver.getStatus() result: {"ready":true,"message":"The server is ready to accept new connections","build":{"version":"2.12.1"}}
[HTTP] <-- GET /status 200 4 ms - 111 
Appium server started on: http://127.0.0.1:18722/
[HTTP] Request idempotency key: 19a844de-7d1b-409f-a159-37238d8b8a3c
[HTTP] --> POST /session {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:udid":"C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA","appium:processArguments":"{\"env\":{\"NOTIFICATION_SHOW_TIME\":\"6\"}}","platformName":"IOS","appium:mjpegServerPort":9822,"appium:newCommandTimeout":1200,"appium:isHeadless":false,"appium:automationName":"XCUITest","appium:deviceName":"iPhone 15 Pro","appium:wdaLocalPort":8822,"appium:waitForIdleTimeout":1,"appium:locale":"en_US","appium:language":"en","appium:derivedDataPath":"~/wdaAgentBuildFolder/C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA/","appium:settings[respectSystemAlerts]":true,"appium:platformVersion":"17.5","appium:app":"apps/APP_NAME.app"}}}
[AppiumDriver@ea76] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"appium:udid":"C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA","appium:processArguments":"{\"env\":{\"NOTIFICATION_SHOW_TIME\":\"6\"}}","platformName":"IOS","appium:mjpegServerPort":9822,"appium:newCommandTimeout":1200,"appium:isHeadless":false,"appium:automationName":"XCUITest","appium:deviceName":"iPhone 15 Pro","appium:wdaLocalPort":8822,"appium:waitForIdleTimeout":1,"appium:locale":"en_US","appium:language":"en","appium:derivedDataPath":"~/wdaAgentBuildFolder/C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA/","appium:settings[respectSystemAlerts]":true,"appium:platformVersion":"17.5","appium:app":"apps/APP_NAME.app"}}]
[AppiumDriver@ea76] Event 'newSessionRequested' logged at 1730906558171 (17:22:38 GMT+0200 (Eastern European Standard Time))
[Appium] Attempting to find matching driver for automationName 'XCUITest' and platformName 'IOS'
[Appium] The 'xcuitest' driver was installed and matched caps.
[Appium] Will require it at /Users/artembilous/.appium/node_modules/appium-xcuitest-driver
[Appium] Requiring driver at /Users/artembilous/.appium/node_modules/appium-xcuitest-driver/build/index.js
[AppiumDriver@ea76] Appium v2.12.1 creating new XCUITestDriver (v7.28.3) session
[AppiumDriver@ea76] Checking BaseDriver versions for Appium and XCUITestDriver
[AppiumDriver@ea76] Appium's BaseDriver version is 9.12.1
[AppiumDriver@ea76] XCUITestDriver's BaseDriver version is 9.12.1
[AppiumDriver@ea76] There are no active sessions for cleanup
[AppiumDriver@ea76] Applying relaxed security to 'XCUITestDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[XCUITestDriver@483a] 
[XCUITestDriver@483a] Creating session with W3C capabilities: {
  "alwaysMatch": {
    "platformName": "IOS",
    "appium:udid": "C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA",
    "appium:processArguments": "{\"env\":{\"NOTIFICATION_SHOW_TIME\":\"6\"}}",
    "appium:mjpegServerPort": 9822,
    "appium:newCommandTimeout": 1200,
    "appium:isHeadless": false,
    "appium:automationName": "XCUITest",
    "appium:deviceName": "iPhone 15 Pro",
    "appium:wdaLocalPort": 8822,
    "appium:waitForIdleTimeout": 1,
    "appium:locale": "en_US",
    "appium:language": "en",
    "appium:derivedDataPath": "~/wdaAgentBuildFolder/C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA/",
    "appium:platformVersion": "17.5",
    "appium:app": "apps/APP_NAME.app"
  },
  "firstMatch": [
    {}
  ]
}
[899d79ea][XCUITestDriver@483a] Session created with session id: 899d79ea-2352-4957-9cc5-40645b023c2c
[899d79ea][XCUITest] Current user: 'artembilous'
[899d79ea][XCUITestDriver@483a] Available real devices: 00008110-001A08AC0261401E
[899d79ea][XCUITestDriver@483a] Constructing iOS simulator for Xcode version 16.1 with udid 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA'
[899d79ea][XCUITestDriver@483a] Determining device to run tests on: udid: 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA', real device: false
[899d79ea][XCUITestDriver@483a] Event 'xcodeDetailsRetrieved' logged at 1730906559281 (17:22:39 GMT+0200 (Eastern European Standard Time))
[899d79ea][BaseDriver] The current application path 'apps/APP_NAME.app' is not absolute and has been rewritten to '/Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app'. Consider using absolute paths rather than relative
[899d79ea][BaseDriver] Using local app '/Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app'
[899d79ea][XCUITestDriver@483a] Caching the manifest for com.APP_NAME.ios app from a file source using the key '00ba1ef55668dc693f60938cb4c3df86b2a5cb42'
[899d79ea][XCUITestDriver@483a] Event 'appConfigured' logged at 1730906559289 (17:22:39 GMT+0200 (Eastern European Standard Time))
[899d79ea][XCUITest] Checking whether app '/Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app' is actually present on file system
[899d79ea][XCUITest] App is present
[899d79ea][XCUITestDriver@483a] CFBundleIdentifier: "com.APP_NAME.ios"
[899d79ea][XCUITestDriver@483a] Event 'resetStarted' logged at 1730906559290 (17:22:39 GMT+0200 (Eastern European Standard Time))
[899d79ea][simctl] Error running 'terminate': An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Simulator device failed to terminate com.APP_NAME.ios.
found nothing to terminate
Underlying error (domain=NSPOSIXErrorDomain, code=3):
	The request to terminate "com.APP_NAME.ios" failed. found nothing to terminate
	found nothing to terminate
[899d79ea][XCUITestDriver@483a] Reset: failed to terminate Simulator application with id "com.APP_NAME.ios"
[899d79ea][XCUITestDriver@483a] Not scrubbing third party app in anticipation of uninstall
[899d79ea][XCUITestDriver@483a] Event 'resetComplete' logged at 1730906559593 (17:22:39 GMT+0200 (Eastern European Standard Time))
[899d79ea][XCUITestDriver@483a] Using WDA path: '/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent'
[899d79ea][XCUITestDriver@483a] Using WDA agent: '/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'
[899d79ea][XCUITestDriver@483a] Starting log capture for iOS Simulator with udid 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA' via simctl using the following arguments 'log stream --style compact'
[899d79ea][XCUITestDriver@483a] Event 'logCaptureStarted' logged at 1730906560449 (17:22:40 GMT+0200 (Eastern European Standard Time))
[899d79ea][XCUITestDriver@483a] Setting up simulator
[899d79ea][XCUITestDriver@483a] Setting preferences of C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA Simulator to {"ConnectHardwareKeyboard":false}
[899d79ea][XCUITestDriver@483a] Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"StartLastDeviceOnLaunch":false,"DetachOnWindowClose":false,"AttachBootedOnStart":true,"ConnectHardwareKeyboard":false,"PasteboardAutomaticSync":false}
[899d79ea][XCUITestDriver@483a] Updated C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA Simulator preferences at '/Users/artembilous/Library/Preferences/com.apple.iphonesimulator.plist' with {"RotateWindowWhenSignaledByGuest":true,"StartLastDeviceOnLaunch":false,"DetachOnWindowClose":false,"AttachBootedOnStart":true,"ConnectHardwareKeyboard":false,"PasteboardAutomaticSync":false,"DevicePreferences":{"C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA":{"SimulatorExternalDisplay":2114,"ConnectHardwareKeyboard":false,"SimulatorWindowRotationAngle":0,"SimulatorWindowOrientation":"Portrait","SimulatorWindowGeometry":{"111DD011-E286-4BAE-85C1-F8C079222FAC":{"WindowCenter":"{69, 1931.5}","WindowScale":0.5844594594594594}},"ChromeTint":""}}}
[899d79ea][XCUITestDriver@483a] Simulator 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA' is booted while its UI is not visible. Trying to restart it with the Simulator window visible
[899d79ea][XCUITestDriver@483a] Starting Simulator UI: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
[899d79ea][XCUITestDriver@483a] Simulator with UDID C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA booted in 8.751s
[899d79ea][XCUITestDriver@483a] About to update localization preferences: {"language":{"name":"en"},"locale":{"name":"en_US"}}
[899d79ea][XCUITestDriver@483a] Will restart the following services in order to sync UI dialogs translation: com.apple.SpringBoard,com.apple.locationd,com.apple.tccd,com.apple.akd. This might have unexpected side effects, see https://github.com/appium/appium/issues/19440 for more details
[899d79ea][XCUITestDriver@483a] Localization preferences have been updated
[899d79ea][XCUITestDriver@483a] Event 'simStarted' logged at 1730906570311 (17:22:50 GMT+0200 (Eastern European Standard Time))
[899d79ea][XCUITestDriver@483a] Verifying application platform
[899d79ea][XCUITestDriver@483a] CFBundleSupportedPlatforms: ["iPhoneSimulator"]
[899d79ea][XCUITestDriver@483a] CFBundleExecutable: "APP_NAME"
[899d79ea][XCUITestDriver@483a] Non-fat file: /Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app/APP_NAME is architecture: arm64
[899d79ea][XCUITestDriver@483a] {}
[899d79ea][DevCon Factory] Releasing connections for C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA device on any port number
[899d79ea][DevCon Factory] No cached connections have been found
[899d79ea][XCUITestDriver@483a] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[899d79ea][AppiumDriver@ea76] Event 'newSessionStarted' logged at 1730906570388 (17:22:50 GMT+0200 (Eastern European Standard Time))
[899d79ea][AppiumDriver@ea76] Encountered internal error running command: Error: The com.APP_NAME.ios application does not support the x86_64 Simulator architecture:
Non-fat file: /Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app/APP_NAME is architecture: arm64

Please rebuild your application to support the x86_64 platform.
    at XCUITestDriver.verifyApplicationPlatform (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/app-utils.js:74:11)
    at XCUITestDriver.installAUT (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:1581:5)
    at XCUITestDriver.start (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:621:5)
    at XCUITestDriver.createSession (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:426:7)
    at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:739:35)
[899d79ea][HTTP] <-- POST /session 500 12271 ms - 970 
[HTTP] Request idempotency key: e081764d-613c-41c3-8d0f-640a28512953
[HTTP] --> POST /session {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:udid":"C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA","appium:processArguments":"{\"env\":{\"NOTIFICATION_SHOW_TIME\":\"6\"}}","platformName":"IOS","appium:mjpegServerPort":9822,"appium:newCommandTimeout":1200,"appium:isHeadless":false,"appium:automationName":"XCUITest","appium:deviceName":"iPhone 15 Pro","appium:wdaLocalPort":8822,"appium:waitForIdleTimeout":1,"appium:locale":"en_US","appium:language":"en","appium:derivedDataPath":"~/wdaAgentBuildFolder/C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA/","appium:settings[respectSystemAlerts]":true,"appium:platformVersion":"17.5","appium:app":"apps/APP_NAME.app"}}}
[AppiumDriver@ea76] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"appium:udid":"C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA","appium:processArguments":"{\"env\":{\"NOTIFICATION_SHOW_TIME\":\"6\"}}","platformName":"IOS","appium:mjpegServerPort":9822,"appium:newCommandTimeout":1200,"appium:isHeadless":false,"appium:automationName":"XCUITest","appium:deviceName":"iPhone 15 Pro","appium:wdaLocalPort":8822,"appium:waitForIdleTimeout":1,"appium:locale":"en_US","appium:language":"en","appium:derivedDataPath":"~/wdaAgentBuildFolder/C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA/","appium:settings[respectSystemAlerts]":true,"appium:platformVersion":"17.5","appium:app":"apps/APP_NAME.app"}}]
[AppiumDriver@ea76] Event 'newSessionRequested' logged at 1730906571897 (17:22:51 GMT+0200 (Eastern European Standard Time))
[Appium] Attempting to find matching driver for automationName 'XCUITest' and platformName 'IOS'
[Appium] The 'xcuitest' driver was installed and matched caps.
[Appium] Will require it at /Users/artembilous/.appium/node_modules/appium-xcuitest-driver
[Appium] Requiring driver at /Users/artembilous/.appium/node_modules/appium-xcuitest-driver/build/index.js
[AppiumDriver@ea76] Appium v2.12.1 creating new XCUITestDriver (v7.28.3) session
[AppiumDriver@ea76] Checking BaseDriver versions for Appium and XCUITestDriver
[AppiumDriver@ea76] Appium's BaseDriver version is 9.12.1
[AppiumDriver@ea76] XCUITestDriver's BaseDriver version is 9.12.1
[AppiumDriver@ea76] There are no active sessions for cleanup
[AppiumDriver@ea76] Applying relaxed security to 'XCUITestDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[XCUITestDriver@5e42] 
[XCUITestDriver@5e42] Creating session with W3C capabilities: {
  "alwaysMatch": {
    "platformName": "IOS",
    "appium:udid": "C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA",
    "appium:processArguments": "{\"env\":{\"NOTIFICATION_SHOW_TIME\":\"6\"}}",
    "appium:mjpegServerPort": 9822,
    "appium:newCommandTimeout": 1200,
    "appium:isHeadless": false,
    "appium:automationName": "XCUITest",
    "appium:deviceName": "iPhone 15 Pro",
    "appium:wdaLocalPort": 8822,
    "appium:waitForIdleTimeout": 1,
    "appium:locale": "en_US",
    "appium:language": "en",
    "appium:derivedDataPath": "~/wdaAgentBuildFolder/C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA/",
    "appium:platformVersion": "17.5",
    "appium:app": "apps/APP_NAME.app"
  },
  "firstMatch": [
    {}
  ]
}
[bd9ea8b5][XCUITestDriver@5e42] Session created with session id: bd9ea8b5-791c-4473-8ac3-6734ce181114
[bd9ea8b5][XCUITest] Current user: 'artembilous'
[bd9ea8b5][XCUITestDriver@5e42] Available real devices: 00008110-001A08AC0261401E
[bd9ea8b5][XCUITestDriver@5e42] Constructing iOS simulator for Xcode version 16.1 with udid 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA'
[bd9ea8b5][XCUITestDriver@5e42] Determining device to run tests on: udid: 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA', real device: false
[bd9ea8b5][XCUITestDriver@5e42] Event 'xcodeDetailsRetrieved' logged at 1730906572273 (17:22:52 GMT+0200 (Eastern European Standard Time))
[bd9ea8b5][BaseDriver] The current application path 'apps/APP_NAME.app' is not absolute and has been rewritten to '/Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app'. Consider using absolute paths rather than relative
[bd9ea8b5][BaseDriver] Using local app '/Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app'
[bd9ea8b5][XCUITestDriver@5e42] Event 'appConfigured' logged at 1730906572277 (17:22:52 GMT+0200 (Eastern European Standard Time))
[bd9ea8b5][XCUITest] Checking whether app '/Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app' is actually present on file system
[bd9ea8b5][XCUITest] App is present
[bd9ea8b5][XCUITestDriver@5e42] CFBundleIdentifier: "com.APP_NAME.ios"
[bd9ea8b5][XCUITestDriver@5e42] Event 'resetStarted' logged at 1730906572278 (17:22:52 GMT+0200 (Eastern European Standard Time))
[bd9ea8b5][simctl] Error running 'terminate': An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Simulator device failed to terminate com.APP_NAME.ios.
found nothing to terminate
Underlying error (domain=NSPOSIXErrorDomain, code=3):
	The request to terminate "com.APP_NAME.ios" failed. found nothing to terminate
	found nothing to terminate
[bd9ea8b5][XCUITestDriver@5e42] Reset: failed to terminate Simulator application with id "com.APP_NAME.ios"
[bd9ea8b5][XCUITestDriver@5e42] Not scrubbing third party app in anticipation of uninstall
[bd9ea8b5][XCUITestDriver@5e42] Event 'resetComplete' logged at 1730906573031 (17:22:53 GMT+0200 (Eastern European Standard Time))
[bd9ea8b5][XCUITestDriver@5e42] Using WDA path: '/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent'
[bd9ea8b5][XCUITestDriver@5e42] Using WDA agent: '/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'
[bd9ea8b5][XCUITestDriver@5e42] Starting log capture for iOS Simulator with udid 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA' via simctl using the following arguments 'log stream --style compact'
[bd9ea8b5][XCUITestDriver@5e42] Event 'logCaptureStarted' logged at 1730906574053 (17:22:54 GMT+0200 (Eastern European Standard Time))
[bd9ea8b5][XCUITestDriver@5e42] Setting up simulator
[bd9ea8b5][XCUITestDriver@5e42] Setting preferences of C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA Simulator to {"ConnectHardwareKeyboard":false}
[bd9ea8b5][XCUITestDriver@5e42] Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"StartLastDeviceOnLaunch":false,"DetachOnWindowClose":false,"AttachBootedOnStart":true,"ConnectHardwareKeyboard":false,"PasteboardAutomaticSync":false}
[bd9ea8b5][XCUITestDriver@5e42] Updated C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA Simulator preferences at '/Users/artembilous/Library/Preferences/com.apple.iphonesimulator.plist' with {"RotateWindowWhenSignaledByGuest":true,"StartLastDeviceOnLaunch":false,"DetachOnWindowClose":false,"AttachBootedOnStart":true,"ConnectHardwareKeyboard":false,"PasteboardAutomaticSync":false,"DevicePreferences":{"C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA":{"SimulatorExternalDisplay":2114,"ConnectHardwareKeyboard":false,"SimulatorWindowRotationAngle":0,"SimulatorWindowGeometry":{"111DD011-E286-4BAE-85C1-F8C079222FAC":{"WindowCenter":"{69, 1931.5}","WindowScale":0.5844594594594594}},"SimulatorWindowOrientation":"Portrait","ChromeTint":""}}}
[bd9ea8b5][XCUITestDriver@5e42] Got Simulator UI client PID: 79422
[bd9ea8b5][XCUITestDriver@5e42] Both Simulator with UDID 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA' and the UI client are currently running
[bd9ea8b5][XCUITestDriver@5e42] About to update localization preferences: {"language":{"name":"en"},"locale":{"name":"en_US"}}
[bd9ea8b5][XCUITestDriver@5e42] The 'AppleLanguages' preference is already set to 'en'. Skipping services reset
[bd9ea8b5][XCUITestDriver@5e42] Localization preferences have been updated
[bd9ea8b5][XCUITestDriver@5e42] Event 'simStarted' logged at 1730906574950 (17:22:54 GMT+0200 (Eastern European Standard Time))
[bd9ea8b5][XCUITestDriver@5e42] Verifying application platform
[bd9ea8b5][XCUITestDriver@5e42] CFBundleSupportedPlatforms: ["iPhoneSimulator"]
[bd9ea8b5][XCUITestDriver@5e42] CFBundleExecutable: "APP_NAME"
[bd9ea8b5][XCUITestDriver@5e42] Non-fat file: /Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app/APP_NAME is architecture: arm64
[bd9ea8b5][XCUITestDriver@5e42] {}
[bd9ea8b5][DevCon Factory] Releasing connections for C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA device on any port number
[bd9ea8b5][DevCon Factory] No cached connections have been found
[bd9ea8b5][XCUITestDriver@5e42] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[bd9ea8b5][XCUITestDriver@5e42] Stopping iOS log capture
[bd9ea8b5][AppiumDriver@ea76] Event 'newSessionStarted' logged at 1730906575026 (17:22:55 GMT+0200 (Eastern European Standard Time))
[bd9ea8b5][AppiumDriver@ea76] Encountered internal error running command: Error: The com.APP_NAME.ios application does not support the x86_64 Simulator architecture:
Non-fat file: /Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app/APP_NAME is architecture: arm64

Please rebuild your application to support the x86_64 platform.
    at XCUITestDriver.verifyApplicationPlatform (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/app-utils.js:74:11)
    at XCUITestDriver.installAUT (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:1581:5)
    at XCUITestDriver.start (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:621:5)
    at XCUITestDriver.createSession (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:426:7)
    at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:739:35)
[bd9ea8b5][HTTP] <-- POST /session 500 3135 ms - 970 

[HTTP] Request idempotency key: d5acc62b-9db0-493d-b03d-866e07a026f3
[HTTP] --> POST /session {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:udid":"C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA","appium:processArguments":"{\"env\":{\"NOTIFICATION_SHOW_TIME\":\"6\"}}","platformName":"IOS","appium:mjpegServerPort":9822,"appium:newCommandTimeout":1200,"appium:isHeadless":false,"appium:automationName":"XCUITest","appium:deviceName":"iPhone 15 Pro","appium:wdaLocalPort":8822,"appium:waitForIdleTimeout":1,"appium:locale":"en_US","appium:language":"en","appium:derivedDataPath":"~/wdaAgentBuildFolder/C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA/","appium:settings[respectSystemAlerts]":true,"appium:platformVersion":"17.5","appium:app":"apps/APP_NAME.app"}}}
[AppiumDriver@ea76] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"appium:udid":"C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA","appium:processArguments":"{\"env\":{\"NOTIFICATION_SHOW_TIME\":\"6\"}}","platformName":"IOS","appium:mjpegServerPort":9822,"appium:newCommandTimeout":1200,"appium:isHeadless":false,"appium:automationName":"XCUITest","appium:deviceName":"iPhone 15 Pro","appium:wdaLocalPort":8822,"appium:waitForIdleTimeout":1,"appium:locale":"en_US","appium:language":"en","appium:derivedDataPath":"~/wdaAgentBuildFolder/C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA/","appium:settings[respectSystemAlerts]":true,"appium:platformVersion":"17.5","appium:app":"apps/APP_NAME.app"}}]
[AppiumDriver@ea76] Event 'newSessionRequested' logged at 1730906575911 (17:22:55 GMT+0200 (Eastern European Standard Time))
[Appium] Attempting to find matching driver for automationName 'XCUITest' and platformName 'IOS'
[Appium] The 'xcuitest' driver was installed and matched caps.
[Appium] Will require it at /Users/artembilous/.appium/node_modules/appium-xcuitest-driver
[Appium] Requiring driver at /Users/artembilous/.appium/node_modules/appium-xcuitest-driver/build/index.js
[AppiumDriver@ea76] Appium v2.12.1 creating new XCUITestDriver (v7.28.3) session
[AppiumDriver@ea76] Checking BaseDriver versions for Appium and XCUITestDriver
[AppiumDriver@ea76] Appium's BaseDriver version is 9.12.1
[AppiumDriver@ea76] XCUITestDriver's BaseDriver version is 9.12.1
[AppiumDriver@ea76] There are no active sessions for cleanup
[AppiumDriver@ea76] Applying relaxed security to 'XCUITestDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[XCUITestDriver@0f72] 
[XCUITestDriver@0f72] Creating session with W3C capabilities: {
  "alwaysMatch": {
    "platformName": "IOS",
    "appium:udid": "C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA",
    "appium:processArguments": "{\"env\":{\"NOTIFICATION_SHOW_TIME\":\"6\"}}",
    "appium:mjpegServerPort": 9822,
    "appium:newCommandTimeout": 1200,
    "appium:isHeadless": false,
    "appium:automationName": "XCUITest",
    "appium:deviceName": "iPhone 15 Pro",
    "appium:wdaLocalPort": 8822,
    "appium:waitForIdleTimeout": 1,
    "appium:locale": "en_US",
    "appium:language": "en",
    "appium:derivedDataPath": "~/wdaAgentBuildFolder/C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA/",
    "appium:platformVersion": "17.5",
    "appium:app": "apps/APP_NAME.app"
  },
  "firstMatch": [
    {}
  ]
}
[b521f6b9][XCUITestDriver@0f72] Session created with session id: b521f6b9-708d-4af8-a62a-2a1f1e9a52ce
[b521f6b9][XCUITest] Current user: 'artembilous'
[b521f6b9][XCUITestDriver@0f72] Available real devices: 00008110-001A08AC0261401E
[b521f6b9][XCUITestDriver@0f72] Constructing iOS simulator for Xcode version 16.1 with udid 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA'
[b521f6b9][XCUITestDriver@0f72] Determining device to run tests on: udid: 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA', real device: false
[b521f6b9][XCUITestDriver@0f72] Event 'xcodeDetailsRetrieved' logged at 1730906576302 (17:22:56 GMT+0200 (Eastern European Standard Time))
[b521f6b9][BaseDriver] The current application path 'apps/APP_NAME.app' is not absolute and has been rewritten to '/Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app'. Consider using absolute paths rather than relative
[b521f6b9][BaseDriver] Using local app '/Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app'
[b521f6b9][XCUITestDriver@0f72] Event 'appConfigured' logged at 1730906576303 (17:22:56 GMT+0200 (Eastern European Standard Time))
[b521f6b9][XCUITest] Checking whether app '/Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app' is actually present on file system
[b521f6b9][XCUITest] App is present
[b521f6b9][XCUITestDriver@0f72] CFBundleIdentifier: "com.APP_NAME.ios"
[b521f6b9][XCUITestDriver@0f72] Event 'resetStarted' logged at 1730906576304 (17:22:56 GMT+0200 (Eastern European Standard Time))
[b521f6b9][simctl] Error running 'terminate': An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Simulator device failed to terminate com.APP_NAME.ios.
found nothing to terminate
Underlying error (domain=NSPOSIXErrorDomain, code=3):
	The request to terminate "com.APP_NAME.ios" failed. found nothing to terminate
	found nothing to terminate
[b521f6b9][XCUITestDriver@0f72] Reset: failed to terminate Simulator application with id "com.APP_NAME.ios"
[b521f6b9][XCUITestDriver@0f72] Not scrubbing third party app in anticipation of uninstall
[b521f6b9][XCUITestDriver@0f72] Event 'resetComplete' logged at 1730906576566 (17:22:56 GMT+0200 (Eastern European Standard Time))
[b521f6b9][XCUITestDriver@0f72] Using WDA path: '/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent'
[b521f6b9][XCUITestDriver@0f72] Using WDA agent: '/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'
[b521f6b9][XCUITestDriver@0f72] Starting log capture for iOS Simulator with udid 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA' via simctl using the following arguments 'log stream --style compact'
[b521f6b9][XCUITestDriver@0f72] Event 'logCaptureStarted' logged at 1730906577392 (17:22:57 GMT+0200 (Eastern European Standard Time))
[b521f6b9][XCUITestDriver@0f72] Setting up simulator
[b521f6b9][XCUITestDriver@0f72] Setting preferences of C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA Simulator to {"ConnectHardwareKeyboard":false}
[b521f6b9][XCUITestDriver@0f72] Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"StartLastDeviceOnLaunch":false,"DetachOnWindowClose":false,"AttachBootedOnStart":true,"ConnectHardwareKeyboard":false,"PasteboardAutomaticSync":false}
[b521f6b9][XCUITestDriver@0f72] Updated C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA Simulator preferences at '/Users/artembilous/Library/Preferences/com.apple.iphonesimulator.plist' with {"RotateWindowWhenSignaledByGuest":true,"StartLastDeviceOnLaunch":false,"DetachOnWindowClose":false,"AttachBootedOnStart":true,"ConnectHardwareKeyboard":false,"PasteboardAutomaticSync":false,"DevicePreferences":{"C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA":{"SimulatorExternalDisplay":2114,"ConnectHardwareKeyboard":false,"ChromeTint":"","SimulatorWindowGeometry":{"111DD011-E286-4BAE-85C1-F8C079222FAC":{"WindowCenter":"{69, 1931.5}","WindowScale":0.5844594594594594}},"SimulatorWindowOrientation":"Portrait","SimulatorWindowRotationAngle":0}}}
[b521f6b9][XCUITestDriver@0f72] Got Simulator UI client PID: 79422
[b521f6b9][XCUITestDriver@0f72] Both Simulator with UDID 'C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA' and the UI client are currently running
[b521f6b9][XCUITestDriver@0f72] About to update localization preferences: {"language":{"name":"en"},"locale":{"name":"en_US"}}
[b521f6b9][XCUITestDriver@0f72] The 'AppleLanguages' preference is already set to 'en'. Skipping services reset
[b521f6b9][XCUITestDriver@0f72] Localization preferences have been updated
[b521f6b9][XCUITestDriver@0f72] Event 'simStarted' logged at 1730906578073 (17:22:58 GMT+0200 (Eastern European Standard Time))
[b521f6b9][XCUITestDriver@0f72] Verifying application platform
[b521f6b9][XCUITestDriver@0f72] CFBundleSupportedPlatforms: ["iPhoneSimulator"]
[b521f6b9][XCUITestDriver@0f72] CFBundleExecutable: "APP_NAME"
[b521f6b9][XCUITestDriver@0f72] Non-fat file: /Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app/APP_NAME is architecture: arm64
[b521f6b9][XCUITestDriver@0f72] {}
[b521f6b9][DevCon Factory] Releasing connections for C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA device on any port number
[b521f6b9][DevCon Factory] No cached connections have been found
[b521f6b9][XCUITestDriver@0f72] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[b521f6b9][XCUITestDriver@0f72] Stopping iOS log capture
[b521f6b9][AppiumDriver@ea76] Event 'newSessionStarted' logged at 1730906578132 (17:22:58 GMT+0200 (Eastern European Standard Time))
[b521f6b9][AppiumDriver@ea76] Encountered internal error running command: Error: The com.APP_NAME.ios application does not support the x86_64 Simulator architecture:
Non-fat file: /Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app/APP_NAME is architecture: arm64

Please rebuild your application to support the x86_64 platform.
    at XCUITestDriver.verifyApplicationPlatform (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/app-utils.js:74:11)
    at XCUITestDriver.installAUT (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:1581:5)
    at XCUITestDriver.start (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:621:5)
    at XCUITestDriver.createSession (/Users/artembilous/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:426:7)
    at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:739:35)
[b521f6b9][HTTP] <-- POST /session 500 2222 ms - 970 

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: The com.APP_NAME.ios application does not support the x86_64 Simulator architecture:
Non-fat file: /Users/artembilous/aqa/qa.APP_NAME/apps/APP_NAME.app/APP_NAME is architecture: arm64

Please rebuild your application to support the x86_64 platform. 
Host info: host: 'MacBook-Pro-Bilous.local', ip: '172.25.60.89'
Build info: version: '4.20.0', revision: '866c76ca80'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '15.1', java.version: '17.0.2'
Driver info: io.appium.java_client.ios.IOSDriver
Command: [null, newSession {capabilities=[{appium:udid=C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA, appium:processArguments={"env":{"NOTIFICATION_SHOW_TIME":"6"}}, platformName=IOS, appium:mjpegServerPort=9822, appium:automationName=XCUITest, appium:isHeadless=false, appium:newCommandTimeout=1200, appium:deviceName=iPhone 15 Pro, appium:wdaLocalPort=8822, appium:language=en, appium:locale=en_US, appium:waitForIdleTimeout=1, appium:derivedDataPath=~/wdaAgentBuildFolder/C1F976FB-0B03-42BD-A5BF-7E78EFD2F8AA/, appium:settings[respectSystemAlerts]=true, appium:platformVersion=17.5, appium:app=apps/APP_NAME.app}], desiredCapabilities=Capabilities {appium:app: apps/APP_NAME.app, appium:derivedDataPath: ~/wdaAgentBuildFolder/C1F97..., appium:deviceName: iPhone 15 Pro, appium:mjpegServerPort: 9822, appium:platformVersion: 17.5, appium:processArguments: {"env":{"NOTIFICATION_SHOW_..., appium:settings[respectSystemAlerts]: true, appium:udid: C1F976FB-0B03-42BD-A5BF-7E7..., appium:waitForIdleTimeout: 1, appium:wdaLocalPort: 8822, automationName: XCUITest, isHeadless: false, language: en, locale: en_US, newCommandTimeout: 1200, platformName: IOS}}]
Capabilities {appium:app: apps/APP_NAME.app, appium:derivedDataPath: ~/wdaAgentBuildFolder/C1F97..., appium:deviceName: iPhone 15 Pro, appium:mjpegServerPort: 9822, appium:platformVersion: 17.5, appium:processArguments: {"env":{"NOTIFICATION_SHOW_..., appium:settings[respectSystemAlerts]: true, appium:udid: C1F976FB-0B03-42BD-A5BF-7E7..., appium:waitForIdleTimeout: 1, appium:wdaLocalPort: 8822, automationName: XCUITest, isHeadless: false, language: en, locale: en_US, newCommandTimeout: 1200, platformName: IOS}
@KazuCocoa
Copy link
Member

What numbers is shown when you run fuser /usr/libexec/rosetta/runtime while the appium server is running?
It prints running process ids on rosetta. Then, could you check each process id shown by the command is for what process?

For example the uname command could be x86_64 when it runs on rosetta.

$ uname -m
arm64
$ arch -x86_64 uname -m
x86_64

@iTemich
Copy link
Author

iTemich commented Nov 8, 2024

Here are the results of commands:

$ fuser /usr/libexec/rosetta/runtime
/usr/libexec/rosetta/runtime: 47331 65615

$ ps -p 47331
 PID TTY           TIME CMD
47331 ??         0:10.88 /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home/bin/java -Xmx700m -Djava.awt.headless=true -Djna.boot.library.path=/Applications/IntelliJ IDEA CE.app/Contents/lib/jna/aarch64 -Djna.nosys=true -Djna.noclasspath=true --add-opens jdk.

$ ps -p 65615
PID TTY           TIME CMD
65615 ??         0:00.16 /System/Library/PrivateFrameworks/MacinTalk.framework/Versions/A/PlugIns/WardaSynthesizer_x86_64.appex/Contents/MacOS/WardaSynthesizer_x86_64 -AppleLanguages ("en-US", "fr-US", "de-US", "zh-Hans-US", "zh-Hant-US", "ja-US", "es-US", "it-US", "nl-U

@KazuCocoa
Copy link
Member

KazuCocoa commented Nov 8, 2024

Thanks. Your node process runs out of the InteliJ environment such as a terminal running in InteliJ window, correct?
(Not sure if it could be related, but to isolate situation)

@iTemich
Copy link
Author

iTemich commented Nov 8, 2024

I ran those commands in the system terminal when IntelliJ Idea IDE was open in the background. After the closing of the IDE, I got this result:

$ fuser /usr/libexec/rosetta/runtime
/usr/libexec/rosetta/runtime: 65615

$ ps -p 65615
PID TTY           TIME CMD
65615 ??         0:00.16 /System/Library/PrivateFrameworks/MacinTalk.framework/Versions/A/PlugIns/WardaSynthesizer_x86_64.appex/Contents/MacOS/WardaSynthesizer_x86_64 -AppleLanguages ("en-US", "fr-US", "de-US", "zh-Hans-US", "zh-Hant-US", "ja-US", "es-US", "it-US", "nl-U

Thanks.

@KazuCocoa
Copy link
Member

Then, what the output of:

npx node -e "const c = require('node:child_process');console.log(c.execSync('uname -m').toString().trim())"

on your Appium's running env?

@iTemich
Copy link
Author

iTemich commented Nov 8, 2024

$ % npx node -e "const c = require('node:child_process');console.log(c.execSync('uname -m').toString().trim())"
arm64

@KazuCocoa
Copy link
Member

Then, x86_64 result in your attached log might be weird....
The value comes form uname -m via node process as

const [resFile, resUname] = await B.all([
exec('lipo', ['-info', executablePath]),
exec('uname', ['-m']),
]);
const bundleExecutableInfo = _.trim(resFile.stdout);
this.log.debug(bundleExecutableInfo);
const arch = _.trim(resUname.stdout);
const isAppleSilicon = os.cpus()[0].model.includes('Apple');
// We cannot run Simulator builds compiled for arm64 on Intel machines
// Rosetta allows only to run Intel ones on arm64
if (
!_.includes(bundleExecutableInfo, arch) &&
!(isAppleSilicon && _.includes(bundleExecutableInfo, 'x86_64'))
) {
throw new Error(
`The ${this.opts.bundleId} application does not support the ${arch} Simulator ` +
`architecture:\n${bundleExecutableInfo}\n\n` +
`Please rebuild your application to support the ${arch} platform.`,
);

I haven't seen the x86_64 case on my M1/M3 (non rosetta) env, but your node process for Appium ran on x86_64 env at that time somehow.

Then, perhaps what we could do is... adding a capability to skip https://github.com/appium/appium-xcuitest-driver/blob/master/lib/driver.js#L1581 entirely I guess.

@mykola-mokhnach do you have any idea to check possible reasons why his env runs on x86_64 for Appium node process...?

@mykola-mokhnach
Copy link
Contributor

This exception is only possible if node is running under Rosetta emulation AND os.cpus()[0].model does not include Apple. At first I would make sure the system where the Appium server is executed has native arm64 node installed and does not use the x86 one (usually the latter is located in /usr/local/bin/node while the arm64 one should be in /opt/homebrew/bin/node if installed via homebrew)

@iTemich
Copy link
Author

iTemich commented Nov 8, 2024

I ran these commands in the terminal and gets results:

$ which node
/usr/local/bin/node

$ node -p "process.arch" 
arm64

$ node -e "console.log(require('os').cpus()[0].model)"
Apple M1

I uninstalled node and installed it again by homebrew. Now which node command returns this:

$ which node
/opt/homebrew/bin/node

But still receive the same issue when starting a test.

@mykola-mokhnach
Copy link
Contributor

which command do you use to start the server? have you checked the actual ps aux output for it?

@iTemich
Copy link
Author

iTemich commented Nov 11, 2024

When I start the server manually, not in the autotest, I use the appium command in the terminal.
If I run the server and use the ps aux command, I receive these outputs.

$ ps aux | grep appium
artembilous      20665   0.0  0.0 410723808   1488 s001  S+    1:28PM   0:00.01 grep appium
artembilous      20370   0.0  0.9 420541200 150608 s003  S+    1:27PM   0:01.88 node /opt/homebrew/bin/appium

@iTemich
Copy link
Author

iTemich commented Nov 11, 2024

And here is the output of the ps aux command when autotest is running (before the error).

$ ps aux | grep appium
artembilous      21141   0.9  1.1 420954064 186624   ??  S     1:33PM   0:02.63 /opt/homebrew/Cellar/node/23.1.0_1/bin/node /opt/homebrew/lib/node_modules/appium/build/lib/main.js --port 4452 --address 127.0.0.1 --log /Users/artembilous/aqa/qa.hily/appium-logs.txt --log-level debug --relaxed-security --session-override
artembilous      20890   0.1  2.6 41705740 441916   ??  S     1:32PM   0:38.70 /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home/bin/java -ea -Dallure.results.directory=/Users/artembilous/aqa/qa/allure-results 
....
artembilous      21640   0.0  0.0 410724832   1568 s001  S+    1:34PM   0:00.00 grep appium

@mykola-mokhnach
Copy link
Contributor

Please make sure java is also built for arm64 if you start the Appium server from java code

@iTemich
Copy link
Author

iTemich commented Nov 11, 2024

Yes, the problem was with Java. I used file $(which java) command and received this result:

$ file $(which java)
/Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home/bin/java: Mach-O 64-bit executable x86_64

After reinstalling Java for arm, I used file $(which java) command and received this result:

$ file $(which java)
/usr/bin/java: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/java (for architecture x86_64):	Mach-O 64-bit executable x86_64
/usr/bin/java (for architecture arm64e):	Mach-O 64-bit executable arm64e

And the problem on a test starting doesn't reproduce more.

@mykola-mokhnach @KazuCocoa Thank you very much!

@mykola-mokhnach
Copy link
Contributor

I've created a patch #2492, which should improve the validation for the above case. Nevertheless it is advices to avoid possible emulation and run native binaries for the corresponding architecture to achieve the best performance

@iTemich iTemich closed this as completed Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants