Skip to content

RealIosDeviceIdError with simulator on iOS #4418

@Klaartje-dpg

Description

@Klaartje-dpg

Description of the bug/issue

I'm testing with Nightwatch and Appium. On Android it's going great but on iOS I'm having issues. My capabilities work perfectly on Appium Inspector, but when I try to build my tests using the nightwatch.config.js, I get an error.

  • I tried using the mobile helper but it just says that everything is
    configured correctly.
  • I also tried adding the UDID to my capabilities but that didn't help
    either. I still get the same error.
  • I also checked the device list a few times, the UDID is correct and
    the device is booted.

Steps to reproduce

  1. Use my capabilities
  2. run nightwatch
  3. See error

Sample test

Command to run

npx nightwatch --env ios --verbose

Verbose Output

RealIosDeviceIdError
   Real Device ID is neither configured nor passed

    Try fixing by :
    1. Pass deviceId in the command (for e.g : --deviceId 00008030-00024C2C3453402E)
    2. Or pass safari:deviceUDID capability in config
    3. To verify the deviceId run, system_profiler SPUSBDataType | sed -n '/iPhone/,/Serial/p' | grep 'Serial Number:' | awk -F ': ' '{print $2}
    4. For more help, run: npx @nightwatch/mobile-helper ios

Nightwatch Configuration

module.exports = {
	src_folders: ['tests'],
	test_settings: {
		android: {
			webdriver: {
				start_process: false,
				host: 'localhost',
				port: 4723
			},
			desiredCapabilities: {
				platformName: 'Android',
				'appium:deviceName': 'Pixel 4',
				'appium:app': 'someplace/app-debug.apk',
				'appium:automationName': 'UiAutomator2',
				'fullReset': true,
				'noReset': false
			}
		},
		ios: {
			webdriver: {
				start_process: true,
				host: 'localhost',
				port: 4723
			},
			desiredCapabilities: {
				platformName: "iOS",
				'appium:deviceName': "iPhone 16 Pro",
				'appium:platformVersion': "18.6",
				'appium:app': "someplace/app.app",
				'appium:automationName': "XCUITest"
			},
		}
	}
};

Nightwatch.js Version

3.12.2

Node Version

Node.js v24.7.0

Browser

No response

Operating System

MacOS 15.6.1 (24G90)

Additional Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions