Issues with Safari on Real iOS Devices - Appium v1.3.4 with Java

Sorry, not sure if this is Issue/Bug or Support topic, and not perhaps not even an Appium issue.


MacBook Retina OSX 10.9.5 - XCode 6.1
iPhone 4 on 7.1.2
iPad 3 on 8.0

My libraries are:

ideviceinstaller HEAD
libimobiledevice 1.1.7
libplist 1.12
node 0.10.32
usbmuxd 1.0.10

ios-webkit-debug-proxy 1.4 from source, running:

./bin/ios-webkit-debug-proxy-launcher.js -c [device udid]:27753 -d

Appium v1.3.4 running from source, using:

./ --ios --real-safari --code-sign 'iPhone Developer' --profile 'profile code'

I’m not actually sure what to put in for code-sign but it doesn’t seem to matter. Profile code is from the provision file from Apple.
Then run Appium with:

node lib/server/main.js -U <udid>

Where both UDID are copied from, so they should not be wrong:

instruments -s devices

Now when I run the Java test:

Sometimes it works, but it sometimes ios-webkit-debug-proxy will have an error:

Invalid message _rpc_applicationUpdated: <dict>

Which ios-webkit-debug-proxy-launcher.js catches and relaunches ios-webkit-debug-proxy.
However, another error sometimes comes up before that one:

stderr: Unknown app_id

At this point, Appium will have an entry saying that the connection was refused since ios-webkit-debug-proxy is dead. This error isn’t caught by i-w-d-p launcher, so I added it to the error messages to detect.

Now, with my change, Unknown app_id is caught but the ios-webkit-debug-proxy-launcher does not look like it restarts:

stderr: Unknown app_id

Detected error message: Unknown app_id
Killing proxy!
RUNNING: ios_webkit_debug_proxy -c 93aa224dbed74d186076fcf422836298d7ae29d8:27753 -d
stderr: Invalid message _rpc_applicationSentListing: <dict>

Disconnected :27753 from iPhone (<udid>)

child process exited with code 0

Occasionally with my change, I get nothing happening after SafariLauncher launches Safari:

[debug] Didn't get a new command in 60 secs, shutting down...
[info] Shutting down appium session
[debug] Stopping ios
[debug] Closing socket server.
[debug] Instruments socket server was closed
[debug] Sending sigterm to instruments

and ios-webkit-debug-proxy is still running. Maybe this is because Appium has sent the command to the device already and ios-webkit was off during the restart of an error?

Does anyone have any idea what I can do to get Safari testing to work (reliably)?


Edit: I have Web Inspector turned on, and UI Automation enabled for my iOS 8.0 iPad.

UPDATE: I have tried it with a 10.8.5 VM, so it doesn’t seem to be OS related.

Related issues that I’ve read in case someone else has this problem:!msg/appium-discuss/HmQo3hLdSyQ/disg_volTKMJ

I am still facing the same issue, @jchuong have u find any solution

I am getting error while installing --HEAD ideviceinstaller

undefined macro - AM_PROG_CC_C_O
undefined macro - AM_PROG_LIBTOOL
undefined macro - AM_COMPILER_FLAGs


I should have fix this myself: