question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Failed to create instance" : remote WAD session creation keeps failing

See original GitHub issue

Whenever I try to create a remote WinAppDriver Session from the “root” app(desktop), I get this error: Failed to create instance

Here is the session call:

var options = new AppiumOptions();
options.AddAdditionalCapability("app", "Root");
options.AddAdditionalCapability("ms:experimental-webdriver", true);
var desktopSession = new WindowsDriver<WindowsElement>(new Uri("http://173.32.11.43:4723/wd/hub"), options, TimeSpan.FromSeconds(120));

and here is WAD server log:

POST /wd/hub/session HTTP/1.1
Accept: application/json, image/png
Connection: Keep-Alive
Content-Length: 215
Content-Type: application/json;charset=utf-8
Host: 173.32.11.43:4723
User-Agent: selenium/3.141.0 (.net windows)

{"desiredCapabilities":{"app":"Root","ms:experimental-webdriver":true,"platformName":"Windows"},"capabilities":{"firstMatch":[{"ms:experimental-webdriver":true,"platformName":"Windows"}]}}
SessionManager - ERROR : WinAppDriver loading MitaBroker : IRequestHandlePtr::CreateInstance failed w/err 0x800401f0
HTTP/1.1 500 Internal Error
Content-Length: 85
Content-Type: application/json

{"status":13,"value":{"error":"unknown error","message":"Failed to create instance"}}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
pradeippcommented, Jul 2, 2021

For anyone facing this issue in the future: The winappdriver server in my remote machine was giving connection issues so I wanted to do a health check by pinging it’s api directly from my c# code. Maybe some header in my requests was messed, whenever I made direct api calls to the WAD server, this issue was almost always there. I stopped doing that and created a small python project to call it using the winappdriver package instead and now the problem is gone. Hope this helps.

1reaction
anunay1commented, May 13, 2021

I don’t understand what are you trying to achieve It will be more clear if you can explain the use case

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remote Desktop deployment Fails: Unable to create the ...
I am trying to install Remote Desktop Services (Roles: RD Connection, RD Session Host, RD Web Access) on Server 2019 that was previouse ......
Read more >
android - Appium failed to create session
1-In your device -> Settings -> Apps then search uiautomator , 2 apps will pop up . 2-Uninstall them. This error occurs when...
Read more >
Troubleshoot connecting to your Windows instance
Remote Desktop can't connect to the remote computerError using the macOS RDP clientRDP displays a black screen instead of the desktopUnable to remotely...
Read more >
Troubleshooting Session Manager - AWS Documentation
Session Manager can't connect from the Amazon EC2 console. Problem: After creating a new instance, the Session Manager tab in the Amazon Elastic...
Read more >
Understanding and troubleshooting WinRM connection and ...
Can I successfully establish a connection on a WinRM port to the remote machine? There are several things to get in the way...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found