appium/appium

Appium test hangs on iPhone 6 running iOS 10.0.1.

nspassov opened this issue · 7 comments

The problem

I am having an issue with an iPhone 6 running iOS 10.0.1. Appium establishes connection, WDA app is launched but then minimized and then it just sits waiting. I do not see any errors in the Appium output. Device is accessible at port 8100:

Environment

Appium 1.6 via npm
Mac OS El Capitan

:~$ node -v
v6.7.0
:~$ npm -v
3.10.7

iPhone 6, iOS 10.0.1 device

Details

WDA and the app get installed on the device, WDA is launched and then quickly minimized so device remains on home screen. The latest output from Appium is:

[Xcode] ▸ Signing /Users/nspassov/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app

[Xcode] MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/qx/brrqhdh576sbppvht41kx56m0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/f153065cd5137f39055aa0a5cefe30ee/80ced61726a241abf3f2309137db58360b9f7329/WebDriverAgentRunner-Runner.app
state->new_bundle: /Users/nspassov/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
state->dst_bundle: /var/folders/qx/brrqhdh576sbppvht41kx56m0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.UOJXeD/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
    dst_ipa: /var/folders/qx/brrqhdh576sbppvht41kx56m0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.UOJXeD/WebDriverAgentRunner-Runner.app_sparse.ipa

[Xcode] __MDMDirectoryDiff_block_invoke.37:1473 calling writeDictToFile with: /var/folders/qx/brrqhdh576sbppvht41kx56m0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.UOJXeD/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist

[Xcode] writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/qx/brrqhdh576sbppvht41kx56m0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.UOJXeD/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist

Any pointers as to what might be going wrong will be appreciated. Please let me know if there is additional information about my setup that I can provide.

I got same issue with iPhone 5c (10.0.2)

It shows black screen and freeze until timeout
https://gist.github.com/nghiadhd/818abdfa9a1d420b171adde3cef6054d

@nspassov Can you post a link to a gist of your server logs? This should include the desired capabilities.

@imurchie

Please check my log. I got same issue when I run WebDriverAgent with Xcode IDE directly, I cannot start XCUITest session and only way to fix it by restart the device.
In my side, I catch the exception, retry 3 times, if it's cannot resolve, I use idevicediagnostics to restart the device. But this solution seem it's difficult with appium-xcuitest-driver

@imurchie Here is the appium log: https://gist.github.com/nspassov/a7286ad3cc56177ca5a95cc9aef433ef

Btw, the .ipa was built using SDK 9 but this should not matter, right?

@nspassov Can you look at https://gist.github.com/nspassov/a7286ad3cc56177ca5a95cc9aef433ef#file-appium-1-6-0-L693

and follow the advice there? idevicesyslog is not able to access the device logs. You can either (a) do as the logs tell you, and install deviceconsole and add its path to realDeviceLogger capability, or (b) rebuild idevicesyslog locally with an upgraded ssl package, so that it can access the device.

When using the realDeviceLogger capability, make sure that the path is to the executable, not just the directory (see note here: https://github.com/appium/appium-xcuitest-driver#external-dependencies)

@imurchie Thank you very much for your time! I had deviceconsole installed but not the realDeviceLogger capability. I added it and now my test runs.

lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.