appium/WebDriverAgent

WDA crash when call screenshot API

codematrixer opened this issue · 3 comments

WDA: v5.15.7
Xcode 15.0.1
iPhone 11 Pro , OS 14.3

When I compile the WDA v5.15.7 using Xcode 15 , after starting WDA and iproxy and executing curl http://localhost:8100/screenshot, it returns Empty relay from server, and then WDA crashes. some phones will behave this way.

The corresponding log is as follows:

2024-03-22 11:01:00.888203+0800 WebDriverAgentRunner-Runner[420:27224] [Default] Running tests...

Restarting after unexpected exit, crash, or test timeout in -[UITestingUITests testRunner]; summary will include totals from previous launches.

Test Suite 'Selected tests' started at 2024-03-22 11:01:01.318.
Test Suite 'WebDriverAgentRunner.xctest' started at 2024-03-22 11:01:01.319.
Test Suite 'UITestingUITests' started at 2024-03-22 11:01:01.319.
    t =      nans Suite Set Up
2024-03-22 11:01:01.341975+0800 WebDriverAgentRunner-Runner[420:27224] [User Defaults] Couldn't write values for keys (
    KeyboardAutocorrection
) in CFPrefsPlistSource<0x283223400> (Domain: com.apple.Preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access
2024-03-22 11:01:01.351716+0800 WebDriverAgentRunner-Runner[420:27224] [User Defaults] Couldn't write values for keys (
    KeyboardPrediction
) in CFPrefsPlistSource<0x283223400> (Domain: com.apple.Preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access
2024-03-22 11:01:01.352362+0800 WebDriverAgentRunner-Runner[420:27224] [User Defaults] Couldn't write values for keys (
    KeyboardShowPredictionBar
) in CFPrefsPlistSource<0x283223400> (Domain: com.apple.Preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access
2024-03-22 11:01:01.352973+0800 WebDriverAgentRunner-Runner[420:27224] [User Defaults] Couldn't write values for keys (
    DidShowGestureKeyboardIntroduction
) in CFPrefsPlistSource<0x283223400> (Domain: com.apple.Preferences, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access
Test Suite 'UITestingUITests' failed at 2024-03-22 11:01:01.357.
	 Executed 1 test, with 1 failure (0 unexpected) in 0.000 (0.038) seconds
Test Suite 'WebDriverAgentRunner.xctest' failed at 2024-03-22 11:01:01.358.
	 Executed 1 test, with 1 failure (0 unexpected) in 0.000 (0.039) seconds
Test Suite 'Selected tests' failed at 2024-03-22 11:01:01.358.
	 Executed 1 test, with 1 failure (0 unexpected) in 0.000 (0.040) seconds

Could you try out the latest one first? I haven't met such a crash, thus please debug from your Xcode to see where caused the crash

Could you try out the latest one first? I haven't met such a crash, thus please debug from your Xcode to see where caused the crash

Even with the latest version of WDA, the same error is encountered. Only the screenshot interface has this issue, and it only crash on iOS versions below iOS 15; there are no crash on iOS versions 15 and above.