I am new in mobile app automation testing. When I try to launch Appium iphone simulator by command “sudo npx nightwatch ./nightwatch/examples/mobile-app-tests/wikipedia-ios.js --env app.ios.simulator”, Im getting the folllowing error
An unknown server-side error occurred while processing the command. Original error: The simulator FFB6D06D-1C2F-43EE-BCA9-B3064291A467 has failed to finish booting after 120s. Original status: Monitoring boot status for appiumTest-C74DCC06-EF7B-44B7-AFA7-E71333E457FC-iPhone 13 (FFB6D06D-1C2F-43EE-BCA9-B3064291A467).\n’ +
‘[2023-11-07 15:21:49 +0000] Status=2, isTerminal=NO, Elapsed=00:03.\n’ +
‘\tWaiting on Data Migration\n’ +
‘\t\tReason:Running plugin com.apple.-0LaunchServicesMigrator (00LaunchServicesMigrator.migrator, user-agnostic)\n’ +
‘\t\tMigration Elapsed:00:00 seconds\n’ +
‘\n’ +
‘[2023-11-07 15:21:49 +0000] Status=2, isTerminal=NO, Elapsed=00:03.\n’ +
‘\tWaiting on Data Migration\n’ +
‘\t\tReason:Running plugin com.apple.-0LaunchServicesMigrator (00LaunchServicesMigrator.migrator, user-agnostic)\n’ +
‘\t\tMigration Elapsed:00:00 seconds\n’ +
here are the capabilities in nightwatch.config.js
appium version Version 2.2.1
Xcode version : Version 15.0.1
MACOS : Sonoma version. 14.1 (23B74)
appium-uiautomator2-driver : 2.33.1
appium-xcuitest-driver : 5.8.1
nightwatch : 3.2.1
module.exports = {
// An array of folders (excluding subfolders) where your tests are located;
// if this is not specified, the test source must be passed as the second argument to the test runner.
src_folders: [‘test’,‘nightwatch/examples’],
page_objects_path: [],
custom_commands_path: [],
custom_assertions_path: [],
plugins: [],
globals_path: ‘’,
webdriver: {},
test_workers: {
enabled: false
},
test_settings: {
default: {
disable_error_log: false,
launch_url: ‘’,
screenshots: {
enabled: false,
path: 'screens',
on_failure: true
},
desiredCapabilities: {
browserName: ''
},
webdriver: {
start_process: true,
server_path: ''
},
},
app: {
selenium: {
start_process: true,
use_appium: true,
host: 'localhost',
port: 4724,
server_path: '',
// args to pass when starting the Appium server
cli_args: [
// automatically download the required chromedriver
// '--allow-insecure=chromedriver_autodownload'
],
// Remove below line if using Appium v1
default_path_prefix: ''
},
webdriver: {
timeout_options: {
timeout: 0,
retry_attempts: 1
},
keep_alive: false,
start_process: false
}
},
'app.android.emulator': {
extends: 'app',
'desiredCapabilities': {
browserName: null,
platformName: 'android',
// `appium:options` is not natively supported in Appium v1, but works with Nightwatch.
// If copying these capabilities elsewhere while using Appium v1, make sure to remove `appium:options`
// and add `appium:` prefix to each one of its capabilities, e.g. change 'app' to 'appium:app'.
'appium:options': {
automationName: 'UiAutomator2',
// Android Virtual Device to run tests on
avd: 'nightwatch-android-11',
// While Appium v1 supports relative paths, it's more safe to use absolute paths instead.
// Appium v2 does not support relative paths.
app: `${__dirname}/nightwatch/sample-apps/wikipedia.apk`,
appPackage: 'org.wikipedia',
appActivity: 'org.wikipedia.main.MainActivity',
appWaitActivity: 'org.wikipedia.onboarding.InitialOnboardingActivity',
// chromedriver executable to use for testing web-views in hybrid apps
chromedriverExecutable: `${__dirname}/chromedriver-mobile/chromedriver`,
newCommandTimeout: 0
}
}
},
'app.android.real': {
extends: 'app',
'desiredCapabilities': {
browserName: null,
platformName: 'android',
// `appium:options` is not natively supported in Appium v1, but works with Nightwatch.
// If copying these capabilities elsewhere while using Appium v1, make sure to remove `appium:options`
// and add `appium:` prefix to each one of its capabilities, e.g. change 'app' to 'appium:app'.
'appium:options': {
automationName: 'UiAutomator2',
// While Appium v1 supports relative paths, it's more safe to use absolute paths instead.
// Appium v2 does not support relative paths.
app: `${__dirname}/nightwatch/sample-apps/wikipedia.apk`,
appPackage: 'org.wikipedia',
appActivity: 'org.wikipedia.main.MainActivity',
appWaitActivity: 'org.wikipedia.onboarding.InitialOnboardingActivity',
// 'chromedriver' binary is required while testing hybrid mobile apps.
//
// Set `chromedriverExecutable` to '' to use binary from `chromedriver` NPM package (if installed).
// Or, put '--allow-insecure=chromedriver_autodownload' in `cli_args` property of `selenium`
// config (see 'app' env above) to automatically download the required version of chromedriver
// (delete `chromedriverExecutable` capability below in that case).
chromedriverExecutable: '',
newCommandTimeout: 0,
// add device id of the device to run tests on, if multiple devices are online
// Run command: `$ANDROID_HOME/platform-tools/adb devices` to get all connected devices
// udid: '',
}
}
},
'app.ios.simulator': {
extends: 'app',
'desiredCapabilities': {
browserName: null,
platformName: 'iOS',
// `appium:options` is not natively supported in Appium v1, but works with Nightwatch.
// If copying these capabilities elsewhere while using Appium v1, make sure to remove `appium:options`
// and add `appium:` prefix to each one of its capabilities, e.g. change 'app' to 'appium:app'.
'appium:options': {
automationName: 'XCUITest',
platformVersion: '17.0',
deviceName: 'iPhone 13',
// While Appium v1 supports relative paths, it's more safe to use absolute paths instead.
// Appium v2 does not support relative paths.
app: `${__dirname}/nightwatch/sample-apps/wikipedia.zip`,
bundleId: 'org.wikimedia.wikipedia',
newCommandTimeout: 0
}
}
},
'app.ios.real': {
extends: 'app',
'desiredCapabilities': {
browserName: null,
platformName: 'ios',
// `appium:options` is not natively supported in Appium v1, but works with Nightwatch.
// If copying these capabilities elsewhere while using Appium v1, make sure to remove `appium:options`
// and add `appium:` prefix to each one of its capabilities, e.g. change 'app' to 'appium:app'.
'appium:options': {
automationName: 'XCUITest',
// While Appium v1 supports relative paths, it's more safe to use absolute paths instead.
// Appium v2 does not support relative paths.
app: `${__dirname}/nightwatch/sample-apps/wikipedia.zip`,
bundleId: 'org.wikimedia.wikipedia',
newCommandTimeout: 0,
// add udid of the device to run tests on. Or, pass the id to `--deviceId` flag when running tests.
// device id could be retrieved from Xcode > Window > "Devices and Simulators" window.
// udid: '00008030-00024C2C3453402E'
}
}
},
},
usage_analytics: {
enabled: true,
log_path: ‘./logs/analytics’,
client_id: ‘10dc2889-5857-41b0-bd94-ccc1ec6c5df5’
}
};