Unable to take screen shot for iOS 15.1

Hi,
I use appium 2.0 and ios 15.1 to test. got the following errors:
[debug] [WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/2721B88E-69CD-4630-B89D-0113910120A8/screenshot] with no body

[WD Proxy] Got response with status 500: {“value”:{“error”:“unable to capture screen”,“message”:“Error Domain=XCTDaemonErrorDomain Code=39 “Legacy screen requests are no longer supported” UserInfo={NSLocalizedDescription=Legacy screen requests are no longer supported}”,“traceback”:""},“sessionId”:“2721B88E-69CD-4630-B89D-0113910120A8”}

[debug] [W3C] Matched W3C error code ‘unable to capture screen’ to UnableToCaptureScreen

[debug] [W3C (561a1de8)] Encountered internal error running command: UnableToCaptureScreen: Error Domain=XCTDaemonErrorDomain Code=39 “Legacy screen requests are no longer supported” UserInfo={NSLocalizedDescription=Legacy screen requests are no longer supported}

Anyone can help?

I got this error when using Appium 1.21.0 with Xcode 13. Moving to Appium 1.22.0 solved it for me (Apple changed the API for screenshots).

Not sure about Appium 2.0. Maybe there is a more recent release candidate?

Our team is using Appium 2.0, and after some search I replaced the latest wda but still not working. I’ll try to update my xcode to 13, now it’s 12.

Just update, after upgrade to xcode 13, screen shot is working fine.

1 Like

Hi @Huwei I faced the same issue and try upgrading to Xcode 13 and appium to 1.22.2 to solve it. When using iOS simulator version 15, it is solved, but when using simulator version < 15, this issue still happens. If you don’t mind, can you try it also on ios < 15 like 14 or 13 to make sure whether the issue occurs or not?

Hi @Sandrespium I tried for ios < 15 on real device, I don’t have this issue. But I never tried it on simulators.