An unknown server-side error occurred while processing the command

Hi all,

I’m trying to automate an Hybrid app.
The login screen is an WebView.
I use driver.switchTo().window(WEBVIEW)
I get the below error when I try to debug or execute :
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/session/624035cd-dc1f-4728-8cd5-4ae33228c315/element",“method”:“POST”,“json”:{“using”:“xpath”,“value”:"//input[@id=‘username’]”}}

info: [debug] Responding to client with error: {“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command.”,“origValue”:“Did not successfully proxy server command”},“sessionId”:"624035cd-

Can anyone please let know how to resolve this issue?

Regards
Tejesh

In appium you are supposed to switch context not window…

Try this…
https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/hybrid.md

Thanks and regards,
M.Karthik