Repository navigation
Description
I have Ipad 2024 M4 11 inch running Ipad os 18 and I have linux machine, I managed to get the wdio ipa signed by personal account and I successfully installed it on my Ipad device using go-ios
The wdio is successfully installed and I have trusted my personal account to be able to have the apps running, I tried on different apps same signing way and installation way and it's working fine on the same device.
I have followed the documentation here for integrating with pre installed WDA using third party:
Regarding Appium I have it installed on my linux (ubuntu) machine and I have a very simple wdio project as following:
Wdio config.js file
const { config } = require('@wdio/cli');
exports.config = {
runner: "local",
specs: ["./test/**/*.test.js"],
maxInstances: 1,
capabilities: [
{
platformName: "iOS",
"appium:automationName": "XCUITest",
"appium:deviceName": "iPad",
"appium:platformVersion": "18.3.2",
"appium:udid": process.env.DEVICE_UDID,
"appium:bundleId": "com.apple.mobilesafari",
"appium:noReset": true,
"appium:newCommandTimeout": 300,
"appium:useNativeCaching": false,
"appium:skipXcodeInstall": true,
"appium:usePreinstalledWDA": true,
"appium:updatedWDABundleId": "com.tarek.WebDriverAgentRunner",
"appium:webDriverAgentUrl": "http://localhost:8100",
},
],
logLevel: "info",
baseUrl: "http://localhost",
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
framework: "mocha",
reporters: ["spec"],
protocol: "http",
hostname: "localhost",
port: 4723,
path: "/",
services: [],
connectionRetryCount: 5,
mochaOpts: {
ui: "bdd",
timeout: 60000,
},
};This one is using the webdriver agent url because it's pre installed and it I launch it using go-ios library.
And I have this testing file
launch.test.js
describe("Safari Browser Test", () => {
it("should launch Safari and verify page", async () => {
// Launch Safari directly through bundle ID
await driver.launchApp();
// Navigate to test page
await driver.navigateTo("https://example.com");
// Wait for page to load
await driver.waitUntil(
async () => (await driver.getTitle()) === "Example Domain",
{ timeout: 10000 }
);
// Verify elements
const heading = await driver.$("h1");
await expect(heading).toHaveText("Example Domain");
});
});First I launch wdio using go-ios. I tried also different libraries to do the same and all of them are working fine with other apps, except wda. Then I start using forward to forward localhost:8100 to the device tcp port 8100 and forwarding is working fine.
Then I run appium server using this command
npx appium --port 4723Then I run wdio using this command
npx wdio run wdio.conf.jsbut when the wdio script executes I am getting this error from appium server:
fcdc61][XCUITestDriver@528c] Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'
[2efcdc61][XCUITestDriver@528c] Trying to start WebDriverAgent once since at least one of webDriverAgentUrl,usePreinstalledWDA capabilities is provided
[2efcdc61][XCUITestDriver@528c] Event 'wdaStartAttempted' logged at 1744902471750 (19:07:51 GMT+0400 (Gulf Standard Time))
[2efcdc61][XCUITestDriver@528c] The executable name for the bundle id 'com.tarek.WebDriverAgentRunner.xctrunner' was 'WebDriverAgentRunner-Runner'
[2efcdc61][XCUITestDriver@528c] Calling devicectl to kill the process
[2efcdc61][XCUITestDriver@528c] Executing xcrun devicectl device info processes --device 00008132-001A69DA2169001C --quiet --json-output -
[2efcdc61][XCUITestDriver@528c] Failed to kill 'com.tarek.WebDriverAgentRunner.xctrunner'. Original error: 'xcrun devicectl device info processes --device 00008132-001A69DA2169001C --quiet --json-output -' failed. Original error: 'xcrun' executable is not found neither in the process working folder (/media/tarek/B1/enbd/device-farm/wdio-test) nor in any folders specified in the PATH environment variable (/home/tarek/.npm/_npx/87826a530ba940cc/node_modules/.bin:/media/tarek/B1/enbd/device-farm/wdio-test/node_modules/.bin:/media/tarek/B1/enbd/device-farm/node_modules/.bin:/media/tarek/B1/enbd/node_modules/.bin:/media/tarek/B1/node_modules/.bin:/media/tarek/node_modules/.bin:/media/node_modules/.bin:/node_modules/.bin:/home/tarek/.nvm/versions/node/v20.18.3/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/tarek/.cargo/bin:/home/tarek/.gvm/pkgsets/go1.18/global/bin:/home/tarek/.gvm/gos/go1.18/bin:/home/tarek/.gvm/pkgsets/go1.18/global/overlay/bin:/home/tarek/.gvm/bin:/home/tarek/.cargo/bin:/home/tarek/.nvm/versions/node/v20.18.3/bin:/home/tarek/.local/bin:/home/tarek/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin)
[2efcdc61][XCUITestDriver@528c] Using provided WebdriverAgent at 'http://localhost:8100'
[2efcdc61][XCUITestDriver@528c] JWProxy options: {"server":"localhost","port":8100,"base":"","timeout":240000,"keepAlive":true,"scheme":"http","reqBasePath":"","sessionId":null}
[2efcdc61][XCUITestDriver@528c] NoSessionProxy options: {"server":"localhost","port":8100,"base":"","timeout":240000,"keepAlive":true,"scheme":"http","reqBasePath":"","sessionId":null}
[2efcdc61][WD Proxy] NoSessionProxy options: {"server":"localhost","port":"8100","base":"","timeout":3000,"scheme":"http","reqBasePath":"","sessionId":null}
[2efcdc61][WD Proxy] Matched '/status' to command name 'getStatus'
[2efcdc61][WD Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[2efcdc61][WD Proxy] read ECONNRESET
[2efcdc61][XCUITestDriver@528c] WDA is not listening at 'http://localhost:8100/'. Original error:: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: read ECONNRESET
Multiple questions please I have:
- Why I am getting this error in appium
2efcdc61][XCUITestDriver@528c] Executing xcrun devicectl device info processes --device 00008132-001A69DA2169001C --quiet --json-output -
[2efcdc61][XCUITestDriver@528c] Failed to kill 'com.tarek.WebDriverAgentRunner.xctrunner'. Original error: 'xcrun devicectl device info processes --device 00008132-001A69DA2169001C --quiet --json-output -' failed. Original error: 'xcrun' executable is not found neither in the process working folder
Why it uses xcrun to run the wdio however I mentioned in the config to skipXCodeInstall, I am running on linux so no need for this command no? especially when using the webDriverAgentUrl capability
Second Question: What is wrong in my setup and implementation? did I miss anything?
Third Question: I tried to use the prebuiltWDAPath capability to let appium itself install the WDA and I give it the path for the WebDriverAgentRunner-Runner.app like this:
capabilities: [
{
platformName: "iOS",
"appium:automationName": "XCUITest",
"appium:deviceName": "iPad",
"appium:platformVersion": "18.3.2",
"appium:udid": process.env.DEVICE_UDID,
"appium:bundleId": "com.apple.mobilesafari",
"appium:noReset": true,
"appium:newCommandTimeout": 300,
"appium:useNativeCaching": false,
"appium:skipXcodeInstall": true,
"appium:usePreinstalledWDA": true,
"appium:updatedWDABundleId": "com.tarek.WebDriverAgentRunner",
"appium:prebuiltWDAPath": "/home/tarek/Downloads/WebDriverAgent/WebDriverAgentRunner-Runner.app",
"appium:usePrebuiltWDA": true,
},
]it succeeds to install WDA on my device and I can see it installed, but after that also fails with
failed. Original error: 'xcrun' executable is not found neither in the process working folder
Anyone please can help, I have more than week struggling with this issue, Thanks.


Activity
[-]Appium is not working with third party tools like go-ios[/-][+]Appium WDA is not working with third party tools like go-ios[/+]mykola-mokhnach commentedon Apr 17, 2025
Unfortunately we do not either officially support nor test a possibility to run this driver on non-macos machines.
tareksalem commentedon Apr 17, 2025
is there a plan to support this?, I can contribute if this is allowed?
tareksalem commentedon Apr 17, 2025
And in the documentation, it's clearly stated that it's possible to run the automation on real ios devices without xcode, why macos needed if there is no xcode?
KazuCocoa commentedon Apr 18, 2025
Not sure where
skipXCodeInstallcame from, but Appium xcuitest driver never has the capability, btw.Do you mean without
xcodebuildto install WDA? As can install the WebDriverAgent package., https://appium.github.io/appium-xcuitest-driver/latest/guides/run-preinstalled-wda/#using-3rd-party-tools wanted to address installing WDA only. (not launching it) Then, launching such an installed WDA will be managed by the Appium XCUITest driver, so it kills the possible running WDA first, then launches it.I think you'd like to use https://appium.github.io/appium-xcuitest-driver/latest/guides/attach-to-running-wda/. Then, please do not provide
appium:usePreinstalledWDASome commands depend on
xcrun devicectlright now to follow Apple's official tools. I assume such commands are not available in non-macOS hosts. As https://appium.github.io/appium-xcuitest-driver/latest/installation/requirements/, the xcuitest driver requires macOS host. But some commands may work on non-macOS hosts withappium:webDriverAgentUrlhttps://appium.github.io/appium-xcuitest-driver/latest/guides/attach-to-running-wda/No, for now. You could if you'd like to keep maintaining them as well. (We would not have much capacity to do it right now)