bug: appium server is showing 500 error when calling to get_screenshot_as_base64 while running Windows app test
See original GitHub issueWindows Application Driver is 1.2.1.0
Current Behavior
While running windows app appium test, once I am calling to driver.get_screenshot_as_base64()
I am getting the following error in appium server log:
[debug] [WindowsDriver@b02c (94a11461)] Calling AppiumDriver.getScreenshot() with args: ["94a11461-2ced-4895-b689-7cd4e44c6446"]
[debug] [WindowsDriver@b02c (94a11461)] Matched '/screenshot' to command name 'getScreenshot'
[debug] [WindowsDriver@b02c (94a11461)] Proxying [GET /screenshot] to [GET http://127.0.0.1:4724/wd/hub/session/B70CACF5-8A7E-4E2C-91BD-55B62AD131F1/screenshot] with no body
[debug] [WindowsDriver@b02c (94a11461)] ΰ΄ΰ¨ΰ΄ΰ¨γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄ΰ΄ΰ¨δδεββΌηζβΌζ ηζβΌηζηηζ€ζΌζΈβΌδγγδδδδγβ΄γ δγδβ΄γδγδβ΄γ€γδδβ΄γγδγγδδγγγδγβΌηζηζζζΈηζ ζΌηβδ εεεβΌγβΈγΰ΄ΰ΄ΰ¨δζζζηηγ¨βζηηζ°ζ€ζζηζ€ζΌζΈβΌζ¨ηζΌζΈβ°ββ¨βΌβ¨ΰ΄ΰ΄ΰ¨δζζζηηβ΄δζΈζζΌζζ€ζΈζγ¨βζη¨ζ€ηβ°βζζΌζ΄ηηζηηβ°βζζζζ°ζηζβ°βζηΰ΄ΰ΄ΰ¨δζΌζΈζΈζζηζ€ζΌζΈγ¨βζ¬ζζηβ΄ζζ°ζ€ηζΰ΄ΰ΄ΰ¨δζΌζΈηζζΈηβ΄εη€ηζγ¨βζηηζ°ζ€ζζηζ€ζΌζΈβΌζ¨ηζΌζΈγ¬βζζ ζηηζηγ΄ηηζβ΄γ ΰ΄ΰ΄ΰ¨δ ζΌηηγ¨βγγγβΈγβΈγβΈγγ¨γγγγΰ΄ΰ΄ΰ¨εηζηβ΄δζζ ζΈηγ¨βζηηζ€ηζ΄ΰ΄ΰ΄ΰ¨ΰ΄ΰ΄ΰ¨ΰ΄ΰ¨
[debug] [WindowsDriver@b02c (94a11461)] δ εεεβΌγβΈγβγγγβδ€ζΈηζηζΈζζ°βδηηζΌηΰ΄ΰ΄ΰ¨δζΌζΈηζζΈηβ΄δ°ζζΈζηζ γ¨βγγγΰ΄ΰ΄ΰ¨δζΌζΈηζζΈηβ΄εη€ηζγ¨βζηηζ°ζ€ζζηζ€ζΌζΈβΌζ¨ηζΌζΈΰ΄ΰ΄ΰ¨ΰ΄ΰ΄ΰ¨η¬βηηζηηηβγ¨γγβ°βηζζ°ηζβγ¨η¬βζηηζΌηβγ¨βηζΈζ¬ζΈζΌηζΈβζηηζΌηββ°βζ΄ζηηζζζβγ¨βδζΈβηζΈζ¬ζΈζΌηζΈβζηηζΌηβζΌζζηηηζζβζ€ζΈβηζ ζβηζζ΄ζΌηζβζζΈζβηζ ζ€ζ°ζβηηζΌζζηηζ€ζΈζβηζ ζβζζΌζ΄ζ΄ζζΈζβΈβη΄η΄ΰ΄ΰ¨
[WindowsDriver@b02c (94a11461)] Got response with status 500: {"status":13,"value":{"error":"unknown error","message":"An unknown error occurred in the remote end while processing the command."}}
[debug] [W3C] Matched W3C error code 'unknown error' to UnknownError
[debug] [WindowsDriver@b02c (94a11461)] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: An unknown error occurred in the remote end while processing the command.
[debug] [WindowsDriver@b02c (94a11461)] at errorFromW3CJsonCode (C:\Users\qahw\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\errors.js:1040:25)
[debug] [WindowsDriver@b02c (94a11461)] at ProxyRequestError.getActualError (C:\Users\qahw\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\errors.js:909:14)
[debug] [WindowsDriver@b02c (94a11461)] at WADProxy.command (C:\Users\qahw\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\jsonwp-proxy\proxy.js:352:19)
[debug] [WindowsDriver@b02c (94a11461)] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [WindowsDriver@b02c (94a11461)] at WinAppDriver.sendCommand (C:\Users\qahw\.appium\node_modules\appium-windows-driver\lib\winappdriver.js:223:12)
[debug] [WindowsDriver@b02c (94a11461)] at WindowsDriver.getScreenshot (C:\Users\qahw\.appium\node_modules\appium-windows-driver\lib\commands\general.js:48:22)
[HTTP] <-- GET /session/94a11461-2ced-4895-b689-7cd4e44c6446/screenshot 500 27 ms - 1221
[HTTP]
Pay attention to these chars:
ΰ¨ΰ΄ΰ¨γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄γ΄ΰ΄ΰ¨δδεββΌηζβΌζ ηζβΌηζηηζ€ζΌζΈβΌδγγδδδδγβ΄γ δγδβ΄γδγδβ΄γ€γδδβ΄γγδγγδδγγγδγβΌηζηζζζΈηζ ζΌηβδ εεεβΌγβΈγΰ΄ΰ΄ΰ¨δζζζηηγ¨βζηηζ°ζ€ζζηζ€ζΌζΈβΌζ¨ηζΌζΈβ°ββ¨βΌβ¨ΰ΄ΰ΄ΰ¨δζζζηηβ΄δζΈζζΌζζ€ζΈζγ¨βζη¨ζ€ηβ°βζζΌζ΄ηηζηηβ°βζζζζ°ζηζβ°βζηΰ΄ΰ΄ΰ¨δζΌζΈζΈζζηζ€ζΌζΈγ¨βζ¬ζζηβ΄ζζ°ζ€ηζΰ΄ΰ΄ΰ¨δζΌζΈηζζΈηβ΄εη€ηζγ¨βζηηζ°ζ€ζζηζ€ζΌζΈβΌζ¨ηζΌζΈγ¬βζζ ζηηζηγ΄ηηζβ΄γ ΰ΄ΰ΄ΰ¨δ ζΌηηγ¨βγγγβΈγβΈγβΈγγ¨γγγγΰ΄ΰ΄ΰ¨εηζηβ΄δζζ ζΈηγ¨βζηηζ€ηζ΄ΰ΄ΰ΄ΰ¨ΰ΄ΰ΄ΰ¨ΰ΄ΰ¨
[debug] [WindowsDriver@b02c (94a11461)] δ εεεβΌγβΈγβγγγβδ€ζΈηζηζΈζζ°βδηηζΌηΰ΄ΰ΄ΰ¨δζΌζΈηζζΈηβ΄δ°ζζΈζηζ γ¨βγγγΰ΄ΰ΄ΰ¨δζΌζΈηζζΈηβ΄εη€ηζγ¨βζηηζ°ζ€ζζηζ€ζΌζΈβΌζ¨ηζΌζΈΰ΄ΰ΄ΰ¨ΰ΄ΰ΄ΰ¨η¬βηηζηηηβγ¨γγβ°βηζζ°ηζβγ¨η¬βζηηζΌηβγ¨βηζΈζ¬ζΈζΌηζΈβζηηζΌηββ°βζ΄ζηηζζζβγ¨βδζΈβηζΈζ¬ζΈζΌηζΈβ
Expected Behavior
Screen short from windows application should be captured successfully
Minimal Reproducible Example
driver.get_screenshot_as_base64()
Environment
- Operating system: Windows 10 OS, 64 bit
- Appium server version (output of
appium --version
): appium 2.0.0 RC3 - Appium driver(s) and their version(s): uiautomator2@2.10.2 (automationName βUiAutomator2β)
- Appium plugin(s) and their version(s): uiautomator2@2.10.2 (automationName βUiAutomator2β)
- Node.js version (output of
node --version
): v18.12.0 npm
version (output ofnpm --version
): 8.19.2- Last component(s) version which did not exhibit the problem: never worked
- Platform and version under test: Windows
- Real device or emulator/simulator: real windows app
Link to Appium Logs
https://github.com/bwomsm1/AppiumLogs/blob/master/win_app_appium.log
Futher Information
No response
Issue Analytics
- State:
- Created 3 months ago
- Comments:5
Top Results From Across the Web
Server-side error: 500 occurred while processing ...
Appium server shows 500 while prossing server. I built firsttime a testapp with android-sdk on my physical mobilephone via usb.
Read more >Status err code 500 - Support
Device isn't picked up for execution and and at-last it shows as err message like above.
Read more >Issue Selenium hub with appium ,server response code : 500
Hi All , Getting the below error when i am running selenium based grid in appium , ERROR log4j:WARN No appenders could be...
Read more >Appium server Error - Issues/Bugs
i am using Windows 10 Operating system.While starting Appium Server Frequently getting 500 status codes error.Socket Hang up.Installed Appium Desktop ClientΒ ...
Read more >Got 500 errors when use real iphone - Support
Sometimes i got the following 500 error: Original error: Cannot get 'xml' source of the current application and. Got response with statusΒ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am attaching the base64 data to html page, it has to be in base64.
@anunay1 what API you are suggesting? I see that also
get_screenshot_as_png()
is passing throughget_screenshot_as_base64()
which I am using today.