AppiumTestDistribution / appium-device-farm

This is an Appium 2.0 plugin designed to manage and create driver sessions on available devices.
https://devicefarm.org
Other
329 stars 103 forks source link

Appium server fails to start with iOS options in server config using appium-device-farm plugin #1423

Open ypo777 opened 8 hours ago

ypo777 commented 8 hours ago

Describe the bug

I am encountering an issue where the Appium server fails to start whenever iOS-related options are included in the server config file while using the appium-device-farm plugin. The server throws an error related to the IOSDeviceManager.js file, specifically indicating that it “Cannot read properties of undefined (reading ‘Width’).”

Link to Appium logs LOG

Environment

  1. appium - 2.12.0
  2. node - 20.18.0
  3. Npm or Yarn package manager: NPM
  4. Mobile platform/version under test: Both
  5. Real device or emulator/simulator: Both
  6. Appium CLI or Appium.app|exe: CLI
saikrishna321 commented 2 hours ago

@ypo777 Is this happening for Simulators or real device?

If its real device can you please check if the model is present in this file - https://github.com/AppiumTestDistribution/appium-device-farm/blob/main/src/device-managers/IOSDeviceType.ts

ypo777 commented 29 minutes ago

Thank you for sharing the file. I can confirm that the model for iPhone 16 Pro (iPhone16,1) and iPhone 16 Pro Max (iPhone16,2) is present in the IOSDeviceType.ts file. However, the issue occurs immediately after starting Appium, even without any iOS devices connected.

The error refers to IOSDeviceManager.js with the message "Cannot read properties of undefined (reading ‘Width’)." This seems to be happening before any device connection is made. Could this indicate a configuration or initialization issue within the appium-device-farm plugin?

Any guidance on resolving this error would be greatly appreciated.

saikrishna321 commented 11 minutes ago

@ypo777 Can you please tell me the command you have used to start the server? Also give me the output of xcrun simctl list --json