Appium + Jenkins + Real device IOS

I’ve updated Appium and Selenium and have updated my code.

I’m still getting the error

use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[debug] [XCUITest] Current user: ‘jenkins’
[debug] [XCUITest] Xcode version set to ‘10.1’ (tools v10.1.0.0.1.1539992718)

[debug] [XCUITest] iOS SDK Version set to ‘12.1’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1542297969619 (10:06:09 GMT-0600 (Central Standard Time))

[XCUITest] The ‘idevice_id’ program is not installed. If you are running a real device test it is necessary. Install with ‘brew install libimobiledevice --HEAD’
[debug] [XCUITest] Available devices:
[XCUITest] Error: Unknown device or simulator UDID: ‘c8be317ecec81cd9b8d06b47bcb575a7f46ced57’

As try - why not directly in jenkins job add prebuild command “brew install libimobiledevice --HEAD” and see…

I tried that: idevice_id -l lists the device.

Warning: libimobiledevice HEAD-45fda81 is already installed and up-to-date
To reinstall HEAD_3, run brew reinstall libimobiledevice

  • idevice_id -l
    c8be317ecec81cd9b8d06b47bcb575a7f46ced57

Maybe I should just stop using mpsadmin and move my project and everything under Jenkins user.

never tried your combination. i have always jenkins/teamcity/bamboo running on one machine (e.g. amazon cloud) and agents are on another machines.

The combination i’m using doesn’t seem like it would be that strange. I"m just using a Macbook Pro with a admin user, then I installed Jenkins, and I’m trying to run jenkins as the admin user.

I’ll keep digging, and if I figure it out I will share it. Thanks for your help Aleksei.

DD

From: https://github.com/appium/java-client/blob/master/docs/environment.md

How To Verify What Is Missing

Appium itself is a NodeJS application and uses the same environment as its host node process. If you experience an error related to local environment setup then verify the actual process environment first. In Mac OS, for example, it is possible to do this via ps eww command, where PID is the process identifier of the running Appium’s host Node process. In Windows the ProcessExplorer utility can be used for such purpose. Then make sure the corresponding variable is there and it is set to a proper value, or, in case there is an error finding some binary, make sure the parent folder of this binary is present in PATH list, the binary itself on the local file system and can be executed manually.

Not sure what the means. I run the ps eww 7777 and I get: PID TT STAT TIME COMMAND. <- what do I do with this information?

Anyone happen to know where is jenkins looking for idevice_id?

[XCUITest] The ‘idevice_id’ program is not installed. If you are running a real device test it is necessary. Install with ‘brew install libimobiledevice --HEAD’

@dduphorn appium using “libimobiledevice” program to install test client on iOS device. you need to install it manually first on machine where appium running.

1 Like