Hi Team,
I am running my tests on Virtual Machine Simulator and I have observed that my app Runner.app is getting installed successfully but WebDriverAgent app is not getting installed properly due to which my appium-webdriverio tests cannot able to start on VM machine though they are running perfectly local on my machine because I think after my app is installed, WebDriverAgent app is also getting installed in my simulator automatically.
Can someone please tell me why this is happening? What I might be missing?
Logs of failure:
Executing tests*
[email protected] ios /Users/builder/clone/integration-tests
PLATFORM_NAME=ios wdio ./config/ios.config.ts
Execution of 1 workers started at 2022-05-31T11:42:09.078Z
2022-05-31T11:42:09.080Z DEBUG @wdio/utils:initialiseServices: initialise service "appium" as NPM package 2022-05-31T11:42:09.118Z INFO @wdio/cli:launcher: Run onPrepare hook 2022-05-31T11:42:09.120Z DEBUG @wdio/appium-service: Will spawn Appium process: node /Users/builder/clone/integration-tests/node_modules/appium/build/lib/main.js --base-path / 2022-05-31T11:42:10.232Z DEBUG @wdio/appium-service: Appium started with ID: 12214 2022-05-31T11:42:10.233Z DEBUG @wdio/cli:utils: Finished to run "onPrepare" hook in 1114ms 2022-05-31T11:42:10.235Z INFO @wdio/cli:launcher: Run onWorkerStart hook 2022-05-31T11:42:10.235Z DEBUG @wdio/cli:utils: Finished to run "onWorkerStart" hook in 0ms 2022-05-31T11:42:10.238Z INFO @wdio/local-runner: Start worker 0-0 with arg: ./config/ios.config.ts [0-0] 2022-05-31T11:42:10.376Z WARN @wdio/utils:shim: You are running tests with @wdio/sync which will be discontinued starting Node.js v16.Read more on https://github.com/webdriverio/webdriverio/discussions/6702 [0-0] 2022-05-31T11:42:10.864Z INFO @wdio/local-runner: Run worker command: run [0-0] 2022-05-31T11:42:11.278Z DEBUG @wdio/config:utils: Found 'ts-node' package, auto-compiling TypeScript files [0-0] 2022-05-31T11:42:11.546Z DEBUG @wdio/local-runner:utils: init remote session [0-0] 2022-05-31T11:42:11.552Z DEBUG @wdio/utils:initialiseServices: initialise service "appium" as NPM package [0-0] RUNNING in /Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app - /test/features/login.feature [0-0] 2022-05-31T11:42:12.283Z DEBUG @wdio/local-runner:utils: init remote session [0-0] 2022-05-31T11:42:12.285Z INFO webdriver: Initiate new session using the WebDriver protocol [0-0] 2022-05-31T11:42:12.346Z INFO webdriver: [POST] http://localhost:4723/session [0-0] 2022-05-31T11:42:12.346Z INFO webdriver: DATA { [0-0] capabilities: { [0-0] alwaysMatch: { [0-0] platformName: 'iOS', [0-0] noReset: false, [0-0] fullReset: true, [0-0] automationName: 'XCUITest', [0-0] deviceName: 'iPhone 13', [0-0] platformVersion: '15.4', [0-0] app: '/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app', [0-0] appWaitDuration: 20000, [0-0] newCommandTimeout: 90000, [0-0] webviewConnectTimeout: 20000, [0-0] fullContextList: true, [0-0] autoAcceptAlerts: true, [0-0] chromedriverExecutable: '', [0-0] chromeOptions: [Object] [0-0] }, [0-0] firstMatch: [ {} ] [0-0] }, [0-0] desiredCapabilities: { [0-0] platformName: 'iOS', [0-0] noReset: false, [0-0] fullReset: true, [0-0] automationName: 'XCUITest', [0-0] deviceName: 'iPhone 13', [0-0] platformVersion: '15.4', [0-0] app: '/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app', [0-0] appWaitDuration: 20000, [0-0] newCommandTimeout: 90000, [0-0] webviewConnectTimeout: 20000, [0-0] fullContextList: true, [0-0] autoAcceptAlerts: true, [0-0] chromedriverExecutable: '', [0-0] chromeOptions: { w3c: false, args: [Array] } [0-0] } [0-0] } [0-0] 2022-05-31T11:44:12.377Z WARN webdriver: Request timed out! Consider increasing the "connectionRetryTimeout" option. [0-0] 2022-05-31T11:44:12.378Z INFO webdriver: Retrying 1/3 [0-0] 2022-05-31T11:44:12.378Z INFO webdriver: [POST] http://localhost:4723/session [0-0] 2022-05-31T11:44:12.378Z INFO webdriver: DATA { [0-0] capabilities: { [0-0] alwaysMatch: { [0-0] platformName: 'iOS', [0-0] noReset: false, [0-0] fullReset: true, [0-0] automationName: 'XCUITest', [0-0] deviceName: 'iPhone 13', [0-0] platformVersion: '15.4', [0-0] app: '/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app', [0-0] appWaitDuration: 20000, [0-0] newCommandTimeout: 90000, [0-0] webviewConnectTimeout: 20000, [0-0] fullContextList: true, [0-0] autoAcceptAlerts: true, [0-0] chromedriverExecutable: '', [0-0] chromeOptions: [Object] [0-0] }, [0-0] firstMatch: [ {} ] [0-0] }, [0-0] desiredCapabilities: { [0-0] platformName: 'iOS', [0-0] noReset: false, [0-0] fullReset: true, [0-0] automationName: 'XCUITest', [0-0] deviceName: 'iPhone 13', [0-0] platformVersion: '15.4', [0-0] app: '/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app', [0-0] appWaitDuration: 20000, [0-0] newCommandTimeout: 90000, [0-0] webviewConnectTimeout: 20000, [0-0] fullContextList: true, [0-0] autoAcceptAlerts: true, [0-0] chromedriverExecutable: '', [0-0] chromeOptions: { w3c: false, args: [Array] } [0-0] } [0-0] } [0-0] 2022-05-31T11:46:12.390Z WARN webdriver: Request timed out! Consider increasing the "connectionRetryTimeout" option. [0-0] 2022-05-31T11:46:12.390Z INFO webdriver: Retrying 2/3 [0-0] 2022-05-31T11:46:12.390Z INFO webdriver: [POST] http://localhost:4723/session [0-0] 2022-05-31T11:46:12.390Z INFO webdriver: DATA { [0-0] capabilities: { [0-0] alwaysMatch: { [0-0] platformName: 'iOS', [0-0] noReset: false, [0-0] fullReset: true, [0-0] automationName: 'XCUITest', [0-0] deviceName: 'iPhone 13', [0-0] platformVersion: '15.4', [0-0] app: '/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app', [0-0] appWaitDuration: 20000, [0-0] newCommandTimeout: 90000, [0-0] webviewConnectTimeout: 20000, [0-0] fullContextList: true, [0-0] autoAcceptAlerts: true, [0-0] chromedriverExecutable: '', [0-0] chromeOptions: [Object] [0-0] }, [0-0] firstMatch: [ {} ] [0-0] }, [0-0] desiredCapabilities: { [0-0] platformName: 'iOS', [0-0] noReset: false, [0-0] fullReset: true, [0-0] automationName: 'XCUITest', [0-0] deviceName: 'iPhone 13', [0-0] platformVersion: '15.4', [0-0] app: '/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app', [0-0] appWaitDuration: 20000, [0-0] newCommandTimeout: 90000, [0-0] webviewConnectTimeout: 20000, [0-0] fullContextList: true, [0-0] autoAcceptAlerts: true, [0-0] chromedriverExecutable: '', [0-0] chromeOptions: { w3c: false, args: [Array] } [0-0] } [0-0] } [0-0] 2022-05-31T11:48:12.397Z WARN webdriver: Request timed out! Consider increasing the "connectionRetryTimeout" option. [0-0] 2022-05-31T11:48:12.397Z INFO webdriver: Retrying 3/3 [0-0] 2022-05-31T11:48:12.397Z INFO webdriver: [POST] http://localhost:4723/session [0-0] 2022-05-31T11:48:12.397Z INFO webdriver: DATA { [0-0] capabilities: { [0-0] alwaysMatch: { [0-0] platformName: 'iOS', [0-0] noReset: false, [0-0] fullReset: true, [0-0] automationName: 'XCUITest', [0-0] deviceName: 'iPhone 13', [0-0] platformVersion: '15.4', [0-0] app: '/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app', [0-0] appWaitDuration: 20000, [0-0] newCommandTimeout: 90000, [0-0] webviewConnectTimeout: 20000, [0-0] fullContextList: true, [0-0] autoAcceptAlerts: true, [0-0] chromedriverExecutable: '', [0-0] chromeOptions: [Object] [0-0] }, [0-0] firstMatch: [ {} ] [0-0] }, [0-0] desiredCapabilities: { [0-0] platformName: 'iOS', [0-0] noReset: false, [0-0] fullReset: true, [0-0] automationName: 'XCUITest', [0-0] deviceName: 'iPhone 13', [0-0] platformVersion: '15.4', [0-0] app: '/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app', [0-0] appWaitDuration: 20000, [0-0] newCommandTimeout: 90000, [0-0] webviewConnectTimeout: 20000, [0-0] fullContextList: true, [0-0] autoAcceptAlerts: true, [0-0] chromedriverExecutable: '', [0-0] chromeOptions: { w3c: false, args: [Array] } [0-0] } [0-0] } [0-0] 2022-05-31T11:50:12.405Z ERROR webdriver: Request failed with status undefined due to TimeoutError: Timeout awaiting 'request' for 120000ms when running "http://localhost:4723/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"platformName":"iOS","noReset":false,"fullReset":true,"automationName":"XCUITest","deviceName":"iPhone 13","platformVersion":"15.4","app":"/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app","appWaitDuration":20000,"newCommandTimeout":90000,"webviewConnectTimeout":20000,"fullContextList":true,"autoAcceptAlerts":true,"chromedriverExecutable":"","chromeOptions":{"w3c":false,"args":["--disable-popup-blocking"]}},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"iOS","noReset":false,"fullReset":true,"automationName":"XCUITest","deviceName":"iPhone 13","platformVersion":"15.4","app":"/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app","appWaitDuration":20000,"newCommandTimeout":90000,"webviewConnectTimeout":20000,"fullContextList":true,"autoAcceptAlerts":true,"chromedriverExecutable":"","chromeOptions":{"w3c":false,"args":["--disable-popup-blocking"]}}}" [0-0] 2022-05-31T11:50:12.405Z ERROR webdriver: TimeoutError: Timeout awaiting 'request' for 120000ms when running "http://localhost:4723/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"platformName":"iOS","noReset":false,"fullReset":true,"automationName":"XCUITest","deviceName":"iPhone 13","platformVersion":"15.4","app":"/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app","appWaitDuration":20000,"newCommandTimeout":90000,"webviewConnectTimeout":20000,"fullContextList":true,"autoAcceptAlerts":true,"chromedriverExecutable":"","chromeOptions":{"w3c":false,"args":["--disable-popup-blocking"]}},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"iOS","noReset":false,"fullReset":true,"automationName":"XCUITest","deviceName":"iPhone 13","platformVersion":"15.4","app":"/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app","appWaitDuration":20000,"newCommandTimeout":90000,"webviewConnectTimeout":20000,"fullContextList":true,"autoAcceptAlerts":true,"chromedriverExecutable":"","chromeOptions":{"w3c":false,"args":["--disable-popup-blocking"]}}}" [0-0] at getTimeoutError (/Users/builder/clone/integration-tests/node_modules/webdriver/build/utils.js:320:24) [0-0] at NodeJSRequest._request (/Users/builder/clone/integration-tests/node_modules/webdriver/build/request/index.js:154:59) [0-0] at processTicksAndRejections (internal/process/task_queues.js:95:5) [0-0] at async startWebDriverSession (/Users/builder/clone/integration-tests/node_modules/webdriver/build/utils.js:67:20) [0-0] at async Function.newSession (/Users/builder/clone/integration-tests/node_modules/webdriver/build/index.js:46:45) [0-0] at async remote (/Users/builder/clone/integration-tests/node_modules/webdriverio/build/index.js:77:22) [0-0] at async Runner._startSession (/Users/builder/clone/integration-tests/node_modules/@wdio/runner/build/index.js:223:56) [0-0] at async Runner._initSession (/Users/builder/clone/integration-tests/node_modules/@wdio/runner/build/index.js:176:25) [0-0] at async Runner.run (/Users/builder/clone/integration-tests/node_modules/@wdio/runner/build/index.js:88:19) [0-0] 2022-05-31T11:50:12.687Z ERROR @wdio/runner: Error: Failed to create session. [0-0] Timeout awaiting 'request' for 120000ms when running "http://localhost:4723/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"platformName":"iOS","noReset":false,"fullReset":true,"automationName":"XCUITest","deviceName":"iPhone 13","platformVersion":"15.4","app":"/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app","appWaitDuration":20000,"newCommandTimeout":90000,"webviewConnectTimeout":20000,"fullContextList":true,"autoAcceptAlerts":true,"chromedriverExecutable":"","chromeOptions":{"w3c":false,"args":["--disable-popup-blocking"]}},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"iOS","noReset":false,"fullReset":true,"automationName":"XCUITest","deviceName":"iPhone 13","platformVersion":"15.4","app":"/Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app","appWaitDuration":20000,"newCommandTimeout":90000,"webviewConnectTimeout":20000,"fullContextList":true,"autoAcceptAlerts":true,"chromedriverExecutable":"","chromeOptions":{"w3c":false,"args":["--disable-popup-blocking"]}}}" [0-0] at startWebDriverSession (/Users/builder/clone/integration-tests/node_modules/webdriver/build/utils.js:72:15) [0-0] at processTicksAndRejections (internal/process/task_queues.js:95:5) [0-0] at async Function.newSession (/Users/builder/clone/integration-tests/node_modules/webdriver/build/index.js:46:45) [0-0] at async remote (/Users/builder/clone/integration-tests/node_modules/webdriverio/build/index.js:77:22) [0-0] at async Runner._startSession (/Users/builder/clone/integration-tests/node_modules/@wdio/runner/build/index.js:223:56) [0-0] at async Runner._initSession (/Users/builder/clone/integration-tests/node_modules/@wdio/runner/build/index.js:176:25) [0-0] at async Runner.run (/Users/builder/clone/integration-tests/node_modules/@wdio/runner/build/index.js:88:19) [0-0] 2022-05-31T11:50:12.691Z DEBUG @wdio/sync: Finished to run "after" hook in 0ms 2022-05-31T11:50:12.890Z DEBUG @wdio/local-runner: Runner 0-0 finished with exit code 1 [0-0] FAILED in /Users/builder/Library/Developer/Xcode/DerivedData/Runner-edaimyiflreloheqntgnhkmwcclv/Build/Products/Debug-iphonesimulator/Runner.app - /test/features/login.feature 2022-05-31T11:50:12.903Z INFO @wdio/cli:launcher: Run onWorkerEnd hook 2022-05-31T11:50:12.904Z DEBUG @wdio/cli:utils: Finished to run "onWorkerEnd" hook in 0ms 2022-05-31T11:50:12.905Z INFO @wdio/cli:launcher: Run onComplete hook 2022-05-31T11:50:12.905Z DEBUG @wdio/appium-service: Appium (pid: 12214) killed 2022-05-31T11:50:12.905Z DEBUG @wdio/cli:utils: Finished to run "onComplete" hook in 0ms Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:08:03 2022-05-31T11:50:12.915Z INFO @wdio/local-runner: Shutting down spawned worker 2022-05-31T11:50:13.179Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully 2022-05-31T11:50:13.180Z INFO @wdio/local-runner: shutting down npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] ios: `PLATFORM_NAME=ios wdio ./config/ios.config.ts` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] ios script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/builder/.npm/_logs/2022-05-31T11_50_13_271Z-debug.log