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.

Appium times out when trying to start app that takes long time to start. How to extend the timeout?

See original GitHub issue

The problem

I’m testing an iOS app (on real device) that takes quit long time to start (about 80 seconds). It seems from the appium log that WebDriverAgent is trying to start the app (create a session), but times out after approx. 60 seconds. And then re-starts the app and tries again and so on.

I get this in the log:

2021-02-23 20:28:48.658 DEBUG [debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:3970/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"***********","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}],"alwaysMatch":{}}} 
2021-02-23 20:29:48.669 INFO  [WD Proxy] Error: timeout of 480000ms exceeded 

If you compare the timestamp you’ll see it takes approx. 60 seconds to timeout. Is it possible to extend this timeout somehow?

I have tried using the WebDriverAgent capability wdaConnectionTimeout=480000 but when set to higher than 60 seconds there seems to be something else capping it at 60 seconds. Even though the error message says timeout of 480000ms exceeded, which is a bit confusing.

See full log here: https://gist.github.com/alexander-poulikakos/7d062a5f49d869f71be898bd22ffa592

Environment

  • Node.js version (unless using Appium.app|exe): node v13.8.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexander-poulikakoscommented, Feb 24, 2021

The cap at 60 seconds seems to be gone with v1.21.0-beta.0 😃 Below times out after 65 seconds.

2021-02-24 11:24:22.800 INFO  [Appium] Welcome to Appium v1.21.0-beta.0 
...
2021-02-24 11:24:24.195 DEBUG [debug] [BaseDriver]     "appium:wdaConnectionTimeout": 65000, 
...
2021-02-24 11:24:40.440 DEBUG [debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:37465/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"com.midasplayer.test.candycrushsaga","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}],"alwaysMatch":{}}} 
2021-02-24 11:25:45.455 INFO  [WD Proxy] Error: timeout of 65000ms exceeded 

and when using the default wdaConnectionTimeout I get no timeout 😃

2021-02-24 12:13:58.542 DEBUG [debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:14277/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"com.midasplayer.test.candycrushsaga","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}],"alwaysMatch":{}}} 
2021-02-24 12:15:05.526 DEBUG [debug] [WD Proxy] Got response with status 200: {"value":{"sessionId":"01BE7C0C-7C14-4809-BF3A-6221A0E94045","capabilities":{"device":"iphone","browserName":"","sdkVersion":"10.3.2","CFBundleIdentifier":"com.midasplayer.test.candycrushsaga"}},"sessionId":"01BE7C0C-7C14-4809-BF3A-6221A0E94045"} 
1reaction
KazuCocoacommented, Feb 24, 2021

appium-base-driver@7.5.1 should be available via appium@beta

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timeouts - Appium
Edit this Doc Set Timeouts. Configure the amount of time that a particular type of operation can execute for before they are aborted ......
Read more >
Is there a way to increase session time? - Appium Discuss
I initiate synchronization which takes between 14 and 17 minutes to complete. For the session to not time out and for the code...
Read more >
Implicit Wait - Appium
Description. When searching for a single element, the driver should poll the page until an element is found or the timeout expires, whichever...
Read more >
How to increase timeout for Appium Settings installation ...
I am experiencing a timeout during Appium Settings installation in CI using the Android v26 emulator and TestNG for capabilities and etc. I...
Read more >
Activities Startup Troubleshooting Guide - Appium
Normally, the default 20 seconds is enough for the most of applications, however, some bigger apps might require more time to start and...
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