-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
9.12.1
Node.js Version
20.19.0
Mode
WDIO Testrunner
Which capabilities are you using?
{"browserName":"firefox","browserVersion":"135.0","bstack:options":{"local":false,"localIdentifier":"xxxxxxxxxxxxxxxxx","video":true,"appiumLogs":true,"networkLogs":true,"seleniumLogs":true,"consoleLogs":"verbose","resolution":"1280x1024","buildName":"1743439484500 XXX Xxx Xxxxxxxxxxx Xxxxx Xxxxx: xxxx_pages","projectName":" XXX Xxx Xxxxxxxxxxx Xxxxx Xxxxx - Suite xxxx_pages xxxx","userName":"xxxxxxxxxxxxxx","accessKey":"XxxXXxxxxxXXXXXXxxx","seleniumVersion":"4.6.0","wdioService":"9.12.0","buildProductMap":{"observability":true,"accessibility":false,"percy":false,"automate":true,"app_automate":false}},"webSocketUrl":true,"unhandledPromptBehavior":"ignore"}What happened?
wdio v9 tests run fine against Browserstack without http client proxy setup (i.e. without HTTPS_PROXY environment variable set) but fail with the following error under the proxy setup (i.e. when HTTPS_PROXY=<proxy_url>):
2025-03-31T16:46:42.900Z ERROR webdriver: Error: WebDriverError: Request timed out! Consider increasing the "connectionRetryTimeout" option. when running "https://hub-cloud.browserstack.com/wd/hub/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"browserName":"firefox","browserVersion":"135.0","bstack:options":{"local":false,"localIdentifier":"xxxxxxxxxx-xxxxxxx","video":true,"appiumLogs":true,"networkLogs":true,"seleniumLogs":true,"consoleLogs":"verbose","resolution":"1280x1024","buildName":"1743439484500 XXX Xxx Xxxxxxxxxxx Xxxxx Xxxxx: xxxx_pages","projectName":" XXX Xxx Xxxxxxxxxxx Xxxxx Xxxxx - Suite xxxx_pages dev2","userName":"xxxxxxx-xxxxxxx","accessKey":"XxxXXxxxxxXXXXXXxxx","seleniumVersion":"4.6.0","wdioService":"9.12.0","buildProductMap":{"observability":true,"accessibility":false,"percy":false,"automate":true,"app_automate":false}},"webSocketUrl":true,"unhandledPromptBehavior":"ignore"},"firstMatch":[{}]}}"most likely because of the following asymmetry in the timeouts configuration of ProxyAgent vs Agent: https://github.com/webdriverio/webdriverio/blob/main/packages/webdriver/src/request/node.ts#L23-L32
Can you please make a code change so that the ProxyAgent operates with same timeouts (derived from the "connectionRetryTimeout" option) as the Agent does?
What is your expected behavior?
Tests run fine with HTTPS_PROXY=<proxy_url> setup w/o generating WebDriverError: Request timed out! error as they currently run without the http client proxy setup (i.e. HTTPS_PROXY is unset)
How to reproduce the bug.
Run wdio v9 tests against Browserstack with HTTPS_PROXY=<proxy_url> setup
Relevant log output
2025-03-31T16:46:42.900Z ERROR webdriver: Error: WebDriverError: Request timed out! Consider increasing the "connectionRetryTimeout" option. when running "https://hub-cloud.browserstack.com/wd/hub/session" with method "POST" and args "{"capabilities":{"alwaysMatch":{"browserName":"firefox","browserVersion":"135.0","bstack:options":{"local":false,"localIdentifier":"xxxxxxxxxx-xxxxxxx","video":true,"appiumLogs":true,"networkLogs":true,"seleniumLogs":true,"consoleLogs":"verbose","resolution":"1280x1024","buildName":"1743439484500 XXX Xxx Xxxxxxxxxxx Xxxxx Xxxxx: xxxx_pages","projectName":" XXX Xxx Xxxxxxxxxxx Xxxxx Xxxxx - Suite xxxx_pages dev2","userName":"xxxxxxx-xxxxxxx","accessKey":"XxxXXxxxxxXXXXXXxxx","seleniumVersion":"4.6.0","wdioService":"9.12.0","buildProductMap":{"observability":true,"accessibility":false,"percy":false,"automate":true,"app_automate":false}},"webSocketUrl":true,"unhandledPromptBehavior":"ignore"},"firstMatch":[{}]}}"Code of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
