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.

Application under test was upgraded to .net 4.8 and all element requests are timing out

See original GitHub issue

The dev team at my org upgraded their WinForms app to .net version 4.8 and all element requests began timing out. The timeout is on the call to find the element and no response is returned after 60 seconds and the server times out. I tried raising the timeout to 4 min but it still times out. It was all working prior to the .net upgrade. Other commands such as windows maximizing and getting title of window still works. But anything involving FindElement times out. I tried also modifying the version to 1.2.99 and using ms:experimental-webdriver: true. Has anyone experienced this before or have any ideas of what could cause this to be the case?

Using: Selenium 4.0.1 with WinAppDriver v1.2.1/v1.2.99 and Appium v5.0.0-beta01

Sample of Logs from Appium where element call is made and connection times out:

2022-02-22 19:43:05:595 [HTTP] <-- GET /wd/hub/session/5b0c7fc5-5cda-4300-8172-ffde6e1ec076/title 200 27 ms - 81
2022-02-22 19:43:05:596 [HTTP] 
2022-02-22 19:43:05:627 [HTTP] Request idempotency key: 6a444302-74f3-4553-a280-c4ce5172190e
2022-02-22 19:43:05:629 [HTTP] --> POST /wd/hub/session/5b0c7fc5-5cda-4300-8172-ffde6e1ec076/element
2022-02-22 19:43:05:629 [HTTP] {"using":"xpath","value":"//*[@AutomationId='txtClaimID']"}
2022-02-22 19:43:05:631 [W3C (5b0c7fc5)] Calling AppiumDriver.findElement() with args: ["xpath","//*[@AutomationId='txtClaimID']","5b0c7fc5-5cda-4300-8172-ffde6e1ec076"]
2022-02-22 19:43:05:632 [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, accessibility id
2022-02-22 19:43:05:632 [WD Proxy] Matched '/element' to command name 'findElement'
2022-02-22 19:43:05:633 [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:4724/wd/hub/session/009498D5-33C1-4C43-A5C7-E411B05AB27F/element] with body: {"using":"xpath","value":"//*[@AutomationId='txtClaimID']"}
2022-02-22 19:43:05:635 [WinAppDriver] ==========================================

2022-02-22 19:43:05:635 [WinAppDriver] POST /wd/hub/session/009498D5-33C1-4C43-A5C7-E411B05AB27F/element HTTP/1.1


2022-02-22 19:43:05:635 [WinAppDriver] Accept: application/json, */*


2022-02-22 19:43:05:635 [WinAppDriver] Connection: keep-alive


2022-02-22 19:43:05:635 [WinAppDriver] Content-Length: 59


2022-02-22 19:43:05:636 [WinAppDriver] Content-Type: application/json; charset=utf-8


2022-02-22 19:43:05:636 [WinAppDriver] Host: 127.0.0.1:4724


2022-02-22 19:43:05:636 [WinAppDriver] User-Agent: appium


2022-02-22 19:43:05:636 [WinAppDriver] 


2022-02-22 19:43:05:636 [WinAppDriver] {"using":"xpath","value":"//*[@AutomationId='txtClaimID']"}
2022-02-22 19:44:05:641 [HTTP] <-- POST /wd/hub/session/5b0c7fc5-5cda-4300-8172-ffde6e1ec076/element - - ms - -
2022-02-22 19:44:05:641 [HTTP] 
2022-02-22 19:44:05:642 [HTTP] Could not cache the response identified by '6a444302-74f3-4553-a280-c4ce5172190e', because it has not been completed
2022-02-22 19:44:05:642 [HTTP] Does the client terminate connections too early?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
Shakevgcommented, Mar 3, 2022

I am also using .Net Framework 4.8 with WinAppDriver for several years and didn’t have any issues

0reactions
VinayBerrycommented, Mar 10, 2022

@anunay1 yeah its app specific I have also run that experiment of targeting a hello-world app on 4.8 and everything worked ok. I worked around it a little by directly using accessibility ids/names instead of xpath, I guess it was just too slow after the 4.8 upgrade for whatever reason. But there’s still issues when the app is spending a lot of time loading the appium connection tends to trigger a timeout. Still havent found a way around that unfortunately.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading from .net 5 to .net 6 causes timeouts for external ...
We decided to upgrade our website Asp.net core code from .net5 to .net6, we simply set the 'target framework' of the web application...
Read more >
Runtime Changes for Migration from .NET Framework 4.5.1 ...
Find information about application compatibility issues from runtime changes that might affect your app when migrating from .NET Framework ...
Read more >
Making ASP.NET Application Always Running
But if you are running critical jobs, you should ensure that your Hangfire Server instance is always running to guarantee the in-time background...
Read more >
Client error System.Net.WebException: The request timed out
I have a ServiceStack server running on .NET Core 2.1 within IIS using ServiceStack 5.5.1. I then have a WPF client also running...
Read more >
The Good and the Bad of .NET Framework Programming
NET is a software development framework and ecosystem designed and supported by Microsoft to allow for easy desktop and web application ...
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