WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

/status returns error 500

Open osamanatouf2 opened this issue 2 years ago • 3 comments

WiinAppDriver v1.3 Release Candidate 1 (1.2.99)](https://github.com/microsoft/WinAppDriver/releases/tag/v1.2.99) GET /status returns error 500: {"status":13," value":{"error":"unknown error","message":"An unknown error occurred in the remote end while processing the command."}}

Some tools call /status as their first operation, and the error stops them from proceeding further. This is mentioned in several other bug reports (see for example https://github.com/microsoft/WinAppDriver/issues/1728 or https://github.com/microsoft/WinAppDriver/issues/1739).

@DHowett Any update on this?

osamanatouf2 avatar Mar 06 '23 21:03 osamanatouf2

@DHowett I think it fix is still lying in your shelveset.

anunay1 avatar Mar 07 '23 16:03 anunay1

you can use WinAppDriver(1.2.1)

likc-1117 avatar May 25 '23 03:05 likc-1117

@DHowett

Image

How2Fix

  1. Download Resource Hacker
  2. Save the following to versioninfo.rc
versioninfo.rc
1 VERSIONINFO
FILEVERSION 1,2,99,0
PRODUCTVERSION 1,2,99,0
FILEOS 0x4
FILETYPE 0x1
{
BLOCK "StringFileInfo"
{
	BLOCK "040904b0"
	{
		VALUE "CompanyName", "Microsoft Corporation"
		VALUE "FileDescription", "WinAppDriver.exe"
		VALUE "FileVersion", "1.2.99.0"
		VALUE "InternalName", "WinAppDriverPCServer"
		VALUE "LegalCopyright", "\xA9Microsoft Corporation.  All rights reserved."
		VALUE "OriginalFilename", "WinAppDriver.exe"
		VALUE "ProductVersion", "1.2.99.0-release"
		VALUE "ProductName", "Windows Application Driver"
	}
}

BLOCK "VarFileInfo"
{
	VALUE "Translation", 0x0000 0x04B0  
}
}
  1. ResourceHacker.exe -open versioninfo.rc -save versioninfo.res -action compile -log nul
  2. ResourceHacker.exe -open WinAppDriver.exe -save WinAppDriver.exe -resource versioninfo.res -action add -log nul
  3. ?
  4. Profit

curl 127.0.0.1:4723/status > {"build":{"revision":"0","time":"Wed Jun 30 20:20:12 2021","version":"1.2.99"},"os":{"arch":"arm64","name":"windows","version":"10.0.26100"}}

N.B. /status pulls information from the file WinAppDriver.exe (rather than the running executable?) so if you try renaming it it won't work.

I tested this (below) on Windows 11 Pro ARM and it works great.

winget install OpenJS.NodeJS
npm install -g appium
appium driver install --source=npm appium-windows-driver
appium

EdwardBlair avatar Feb 13 '25 13:02 EdwardBlair