I am running Cypress UI tests in AzureDevOps CI/CD and some how most of the UI test are getting failed. All of the tests were running fine few days back.
It is throwing a Timed out waiting for the browser to connect. Retrying. error: Any advise on how to resolve the issue.
Environment Details:
Cypress version: 3.4.1,
Node: 10.x,
Azure DevOps CI/CD
Running: report/send-report.spec.js... (12 of 14)
2019-10-10T00:47:31.0294852Z
2019-10-10T00:47:31.0295427Z Warning: Cypress can only record videos when using the built in 'electron' browser.
2019-10-10T00:47:31.0295707Z
2019-10-10T00:47:31.0296579Z You have set the browser to: 'chrome'
2019-10-10T00:47:31.0296837Z
2019-10-10T00:47:31.0297613Z A video will not be recorded when using this browser.
2019-10-10T00:47:31.0313740Z (node:4030) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added. Use emitter.setMaxListeners() to increase limit
2019-10-10T00:48:01.0316223Z
2019-10-10T00:48:01.0592004Z Timed out waiting for the browser to connect. Retrying...
2019-10-10T00:48:31.0587550Z
2019-10-10T00:48:31.0839142Z Timed out waiting for the browser to connect. Retrying again...
2019-10-10T00:49:01.0877330Z
2019-10-10T00:49:01.1241198Z The browser never connected. Something is wrong. The tests cannot run. Aborting...
I have noticed that you have set retries value as 2 to enable immediately retry on failure instead of moving on to the next test. So I recommend you to change the value and check if the error still occur.
And you can try another workaround, to change numTestsKeptInMemory down from 50 to something sane like 1 or 0. Here is the offical documentation. https://docs.cypress.io/guides/references/configuration.html#Global
In addition, it seems like an occasional error. Because some users failed on the first pipeline, but succeed on the second pipeline. And this should be a problem with cypress itself or your system's memory, you can report this problem to cypress directly.
Here is the link about cypress-io/cypress. https://github.com/cypress-io/cypress/issues/
And here is the link about the same error message.https://github.com/cypress-io/cypress/issues/1305
Related
thank you for looking into this!
We are running a quite comprehensive testsuite (some hunderds of test) with the goal to make sure that our tracking implemantation works as expected. We are executing this tests via CI 4x a day. Since a few weeks we have random test aborts, which are unfortunately extremely hard to track and reproduce.
What is the Current behavior?
Errors: Unhandled promise rejection:
Error [ERR_HTTP2_INVALID_SESSION]: The session has been destroyed
at new NodeError (node:internal/errors:371:5)
at ClientHttp2Session.request (node:internal/http2/core:1702:13)
at DestinationRequest._sendRealThroughHttp2 (/home/ec2-user/actions-runner/_work/ds_cerberus/ds_cerberus/node_modules/testcafe-hammerhead/lib/request-pipeline/destination-request/index.js:51:32)
at DestinationRequest._send (/home/ec2-user/actions-runner/_work/ds_cerberus/ds_cerberus/node_modules/testcafe-hammerhead/lib/request-pipeline/destination-request/index.js:110:18)
at runMicrotasks (:null:null)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
For us it looks like a racing condition inside the hammerhead-lib which is used as a proxy for testcafe. But we have no idea how to fix this - or least make sure that not the whole suite of tests is aborted by it.
This is the stacktrace if the tests are aborted. Unfortunately this means that the execution of all tests is aborted and does not only affect a single test, which renders the whole suite for us pretty useless...
Steps to Reproduce
There seems to be more aborts if the tests are executed in the suite and not solely - but even there it is quite hard to identify a pattern.
TestCafe version
"testcafe": "^1.17.1",
Node.js version
node-version: '16.x'
Command-line arguments
testcafe --config-file .testcaferc-dev.json tests
The issue may be related to HTTP/2 requests. So, you can disable it using the following option: disableHttp2. Check if the issue is reproduced after that.
You can also try to increase timeouts, e.g. ajaxRequestTimeout and testExecutionTimeout.
If this does not help, please create a simple project where the issue is reproducible and share it here. We will research it on our side.
I am using webdriverIO v7 and cucumber to test my application.
I have feature file with 10 scenarios.
What happens is that when I run the test then first 4 scenarios are executed seamlessly and on the fifth scenario all of sudden I get the error:
unknown error: java.net.ConnectException: Connection refused: connect
at Object.getErrorFromResponseBody (C:\my-project\node_modules\webdriver\build\utils.js:189:12)
at WebDriverRequest._request (C:\my-project\node_modules\webdriver\build\request.js:168:31)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Browser.runCommandWithHooks (C:\my-project\node_modules\#wdio\sync\build\wrapCommand.js:105:25)
at Browser.runCommandWithHooks (C:\my-project\node_modules\#wdio\sync\build\wrapCommand.js:100:24)
at Browser.url (C:\my-project\node_modules\#wdio\sync\build\wrapCommand.js:67:44)
at MyPage.openImportPage (C:\my-project\src\pages\/myPage.js:32:17)
at forEach (C:\my-project\src\helpers\/helpers.js:60:21)
at Array.forEach (<anonymous>)
at Helpers.deleteWishLists (C:\my-project\src\helpers\/helpers.js:55:51)
at World.<anonymous> (C:\my-project\src\step_definitions\/config_steps.js:28:13)
at World.executeSync (C:\my-project\node_modules\#wdio\sync\build\index.js:38:22)
at World.executeSync (C:\my-project\node_modules\#wdio\sync\build\index.js:52:38)
at C:\my-project\node_modules\#wdio\sync\build\index.js:69:68
The first step of the fifth scenario is also executed in previous scenarios which succeeded normally.
It doesn't behave consistently - for example, when running for the second time in non headless mode all scenarios passed (all of a sudden).
Running in headless mode, sometimes all scenarios fail with that exception, sometimes only some fail - no rule to notice there.
It is very confusing. I assume it has nothing to do with my tests since sometimes they are all passing, but has to do with my setup or internet connection or webdriverIO framework and its standalone mode ...
Does anybody have clue why is this happening. Who is the trouble maker here?
I don't even know in which direction should I look to in order to investigate this.
Please help.
Thanks!
At the end the issue was with my internet connection.
Guys from wdio made small patch for it:
https://github.com/webdriverio/webdriverio/issues/6728
I am using docusign-esign package in my project for esigning.
While creating an envelope, I am getting the below error-
(node:3254) UnhandledPromiseRejectionWarning: Error: Timeout of 60000ms exceeded
Please let me know if any way I can configure the timeout value or any other way to fix this issue.
60s is a very long time and I would not try to edit the timeout but rather debug the code before createEnvelope call. Even start with the ApiClent. This post suggest that the error could be caused by faulty assertion
I followed the steps for building hono from source from this page https://www.eclipse.org/hono/docs/dev-guide/building_hono/
The build completes without errors, but when running the integration tests, I receive lots of errors related to timeouts and expired certificates. Here's an excerpt of the log:
HTTP11:59:07.040 [main] INFO o.e.h.adapter.http.impl.Application - The following profiles are active: prod
ARTEMIS2020-10-29 11:59:09,455 ERROR [org.apache.activemq.artemis.core.server] AMQ224088: Timeout (10 seconds) while handshaking with /172.19.0.5:38356 has occurred.
QPID2020-10-29 11:59:09.827479 +0000 SERVER (info) [C4] Connection to hono-artemis.hono:5671 failed: amqp:connection:framing-error SSL Failure: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Is it possible to update the certificates or is this not the main problem?
Here's the link to the complete log file
You are probably building sources from one of the previously released tags, i.e. not from the master branch, right?
If so, the demo certificates included in the source code may have expired in the meantime since the time of release. You can re-create the certificates by running the demo-certs/create_certs.sh script. Note that this needs to be done once only, i.e. it is not necessary to do this before each build.
I have a script that periodically runs aggregation on a mongodb collection. As the dataset has grown, the amount of time it takes to aggregate has also grown. My aggregation script has recently stopped working consistently, and the error logs show:
error: { [MongoError: server <x> timed out]
name: 'MongoError',
message: 'server <x> timed out' }
I've tried debugging this, and the only pattern I can find is that this timeout seems to only occur when the aggregation takes longer than 2 minutes (it times out right around 2m). Does anyone have additional debugging tips for this? The 2-minute thing is giving me the impression that I just need to configure some timeout somewhere but I can't figure out where or if i'm just falling into a red-herring trap.
About the system configuration: This aggregation script is a node.js (v5.9.1) application running in an alpine-based docker (v1.9.1) container. It uses the mongodb node driver (v2.1.19). Single mongodb server (though this is also happening in a separate environment with a replSet) running mongod (v3.2.6)
I got the same problem for logs time aggregation. I think I have the solution for you.
I found that the option socketTimeoutMS is responsible for that.
Check your mongo_client.js default socketTimeoutMS value. For me it was 2min. Mongodb module version 2.1.18.
So just add this option into your url :
mongodb://localhost:27017/test?maxPoolSize=2&socketTimeoutMS=60000
It will set timeout to 10 mins. That does the trick for me.