facebookarchive / WebDriverAgent

A WebDriver server for iOS that runs inside the Simulator.
Other
4.15k stars 1.36k forks source link

Crash when taking screenshot #913

Open camillake opened 6 years ago

camillake commented 6 years ago

iOS 9.3.5 (iPhone 4s) iOS 10.3.3 (iPhone 5) XCODE: 9.3

Using: curl -X GET -H "Content-Type: application/json" http://${deviceip}/screenshot Can not get screenshot and source tree

WebDriverAgentRunner-Runner[254] : CGImageCreateWithImageProvider: invalid image size: 0 x 0.

Full log as below:


MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with: state->old_bundle: /var/folders/b2/kyw0lgbs2rb0xt8nl9tjdkth0000gq/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/2fa00dee5f3710cfc00aa8a6d574da5a/72e7b58b5d4f54454b8701b655fc7ca1babe7b6e/WebDriverAgentRunner-Runner.app state->new_bundle: /Users/camilla/Product-Code/build_app/WebDriverAgent-altourzmbyeknddazxvrkdhbyaxb/Build/Products/Release-iphoneos/WebDriverAgentRunner-Runner.app state->dst_bundle: /var/folders/b2/kyw0lgbs2rb0xt8nl9tjdkth0000gq/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.qyRQlT/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE dst_ipa: /var/folders/b2/kyw0lgbs2rb0xt8nl9tjdkth0000gq/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.qyRQlT/WebDriverAgentRunner-Runner.app_sparse.ipa

MDMDirectoryDiff_block_invoke:1473 calling writeDictToFile with: /var/folders/b2/kyw0lgbs2rb0xt8nl9tjdkth0000gq/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.qyRQlT/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist

writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/b2/kyw0lgbs2rb0xt8nl9tjdkth0000gq/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.qyRQlT/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist

TEST EXECUTE FAILED

2018-04-12 17:45:20.692 WebDriverAgentRunner-Runner[254:15859] Running tests... 2018-04-12 17:45:22.918 WebDriverAgentRunner-Runner[254:15859] Continuing to run tests in the background with task ID 1 Test Suite 'All tests' started at 2018-04-12 17:45:23.853 Test Suite 'WebDriverAgentRunner.xctest' started at 2018-04-12 17:45:23.864 Test Suite 'UITestingUITests' started at 2018-04-12 17:45:23.866 Test Case '-[UITestingUITests testRunner]' started. t = 0.01s Start Test at 2018-04-12 17:45:23.878 t = 0.72s Set Up 2018-04-12 17:45:24.603 WebDriverAgentRunner-Runner[254:15859] Built at Apr 12 2018 16:28:17 2018-04-12 17:45:24.710 WebDriverAgentRunner-Runner[254:15859] ServerURLHere->http://192.168.1.42:8101<-ServerURLHere t = 89.87s Find the Application "com.apple.springboard" 0x16761b00 t = 89.89s Snapshot accessibility hierarchy for app with pid 48 Apr 12 17:46:55 WebDriverAgentRunner-Runner[254] : CGImageCreateWithImageProvider: invalid image size: 0 x 0. 2018-04-12 17:47:13.841 WebDriverAgentRunner-Runner[258:16417] Running tests... 2018-04-12 17:47:15.672 WebDriverAgentRunner-Runner[258:16417] Continuing to run tests in the background with task ID 1

Restarting after unexpected exit or crash in UITestingUITests/testRunner; summary will include totals from previous launches.

Test Suite 'Selected tests' started at 2018-04-12 17:47:16.584 Test Suite 'WebDriverAgentRunner.xctest' started at 2018-04-12 17:47:16.593 Test Suite 'WebDriverAgentRunner.xctest' failed at 2018-04-12 17:47:16.599. Executed 1 test, with 1 failure (0 unexpected) in 0.000 (0.006) seconds Test Suite 'WebDriverAgentLib.framework' started at 2018-04-12 17:47:16.612 Test Suite 'WebDriverAgentLib.framework' passed at 2018-04-12 17:47:16.618. Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.006) seconds Test Suite 'Selected tests' failed at 2018-04-12 17:47:16.627. Executed 1 test, with 1 failure (0 unexpected) in 0.000 (0.043) seconds

ledinhphuong commented 6 years ago

It works fine on my end.

My environment:

Which is the commit of WDA that you used?

camillake commented 6 years ago

@ledinhphuong My WDA commit is at f81e120cdf6f74185f0f653c23171e5c63ee5d74 The issue only happened on following combinations: iOS 9.3.5 (iPhone 4s) iOS 10.3.3 (iPhone 5)

Zoe1808 commented 6 years ago

The same error. iOS 10.3.3 (iPhone 5) @ledinhphuong

bubblegreen commented 5 years ago

The same error. commit is at c233bf0 iOS 10.3.3(iPhone5) @ledinhphuong