UI inspector does not load after xcode upgrade on an iOS 15 real device.
Please find logs below:
[WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/58E3A011-8F89-45C6-B83F-15A045F3A0B0/screenshot] with no body
[WD Proxy] Got response with status 500: {“value”:{“error”:“unknown error”,“message”:"-[XCUIScreen screenshotDataForQuality:rect:error:]: unrecognized selector sent to instance 0x281ced580",“traceback”:"(\n\t0 CoreFoundation 0x00000001805e9cc0 FE94D75F-5F1D-3127-BA50-0161D8817EE6 + 597184\n\t1 libobjc.A.dylib 0x0000000197659758 objc_exception_throw + 56\n\t2 CoreFoundation 0x00000001806b96d0 FE94D75F-5F1D-3127-BA50-0161D8817EE6 + 1447632\n\t3 CoreFoundation 0x0000000180583edc FE94D75F-5F1D-3127-BA50-0161D8817EE6 + 179932\n\t4 CoreFoundation 0x000000018058314c _CF_forwarding_prep_0 + 92\n\t5 WebDriverAgentLib 0x0000000106ba0130 -[XCUIDevice(FBHelpers) fb_rawScreenshotWithQuality:error:] + 152\n\t6 WebDriverAgentLib 0x0000000106ba0010 -[XCUIDevice(FBHelpers) fb_screenshotWithError:] + 76\n\t7 WebDriverAgentLib 0x0000000106b45254 +[FBScreenshotCommands handleGetScreenshot:] + 10…
[W3C] Matched W3C error code ‘unknown error’ to UnknownError
[XCUITest] Taking screenshot with WDA
[WD Proxy] Matched ‘/screenshot’ to command name ‘getScreenshot’
[WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8100/session/58E3A011-8F89-45C6-B83F-15A045F3A0B0/screenshot] with no body
[WD Proxy] Got response with status 500: {“value”:{“error”:“unknown error”,“message”:"-[XCUIScreen screenshotDataForQuality:rect:error:]: unrecognized selector sent to instance 0x281cea9c0",“traceback”:"(\n\t0 CoreFoundation 0x00000001805e9cc0 FE94D75F-5F1D-3127-BA50-0161D8817EE6 + 597184\n\t1 libobjc.A.dylib 0x0000000197659758 objc_exception_throw + 56\n\t2 CoreFoundation 0x00000001806b96d0 FE94D75F-5F1D-3127-BA50-0161D8817EE6 + 1447632\n\t3 CoreFoundation 0x0000000180583edc FE94D75F-5F1D-3127-BA50-0161D8817EE6 + 179932\n\t4 CoreFoundation 0x000000018058314c _CF_forwarding_prep_0 + 92\n\t5 WebDriverAgentLib 0x0000000106ba0130 -[XCUIDevice(FBHelpers) fb_rawScreenshotWithQuality:error:] + 152\n\t6 WebDriverAgentLib 0x0000000106ba0010 -[XCUIDevice(FBHelpers) fb_screenshotWithError:] + 76\n\t7 WebDriverAgentLib 0x0000000106b45254 +[FBScreenshotCommands handleGetScreenshot:] + 10…
[W3C] Matched W3C error code ‘unknown error’ to UnknownError
[MJSONWP (b389f418)] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: -[XCUIScreen screenshotDataForQuality:rect:error:]: unrecognized selector sent to instance 0x281cea9c0
[MJSONWP (b389f418)] at errorFromW3CJsonCode (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:780:25)
[MJSONWP (b389f418)] at ProxyRequestError.getActualError (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:663:14)
[MJSONWP (b389f418)] at JWProxy.command (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:273:19)
[MJSONWP (b389f418)] at runMicrotasks ()
[MJSONWP (b389f418)] at processTicksAndRejections (internal/process/task_queues.js:85:5)
[HTTP] <-- GET /wd/hub/session/b389f418-c951-43aa-b430-354328852b5c/screenshot 500 1059 ms - 273
[HTTP]