-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cy.task(ctrLogMessages) timed out after waiting 60000ms fails the test at the end #249
Comments
Is this reproducing only on CI? Or locally as well? Is it only for certain tests or all tests? Have you tried different settings? Like not having file logging enabled? |
Hello @archfz,
No, I managed to reproduce it from my local machine (from docker). I think the problem arise only when running from docker.
Yes, from docker.
All test I guess. I created a very simple test with a small
Yes, I've tested it with log-only-on-failure and the same behavior occurred. This is the output produced when failing from local docker:
|
Ok. So it is only from docker. So it is not really local. I think it might be something related to node version or some other aspects of the docker image. Is it possible for you to create a minimal reproducible docker image? As I am having difficulty to reproduce this issue. |
Sure, this is what I can share: Docker file:
How we run it:
package.json
e2e.ts
cypress.config.ts
test that runs
|
I attempted to reproduce but still failed. Check here https://github.com/archfz/cypress-terminal-report-demo/tree/issue_249 You can build the image and run cypress in it, and it works. Now you have claimed that simply running Could you attempt running one of the specs on your project setup from cypress-terminal-report-demo? Or just add a simpler spec that doesn't use those |
@archfz I will try to follow your suggestion and use the demo repo (recommended in the previous comment), BUT before that I managed to reproduce again the issue (seemed to be exponentially harder to reproduce it if Looking forward for your response. |
Ok. So based on this new information and also based on some rechecks on things and config. You are using the
I have no additional information on the case of timeout on Also you have posted those screenshots. How did you create those screenshots? Because I understood that this only reproduces in docker, not locally as well. But you wouldn't be able to do |
Thank you for investigating further @archfz !
Indeed, the config is exactly what I mentioned in the code snippets from the above comments
I can confirm that sometimes I saw
Indeed, that's not the case
The project contains multiple typescript test spec files (each containing test suites wrapped with The spec that I used for testing (the one which fails in CI and docker local + all logs and comments above correspond to) does not contain any sort of skip. It's approximatively what I sent above:
However, I've noticed that other spec files make use of
I don't know if those other spec files are the culprits because I don't trigger them with
We have a tool which tests at scale (e.g. can run a docker container a 100 hundred times) and I remember seeing each of them being reported, but I can't remember if they were both reported as part of the same failed test. I would say "maybe yes" and I will continue to check and post a new comment here in case I manage to confirm it.
These screenshots are coming from CI which indeed runs cypress in docker, but it has video recording enabled and we export test results / screenshots / videos (created by cypress) as generated pipeline artifacts. I just pasted from there. Extra information which could help:
I hope that you'll find my answer helpful. If you need more information please let me know. |
Ok, It seems your cypress project is quite customized. I think it will be very hard to debug this. I am thinking that I will extend the |
So I have been thinking on where to log additional debug stuff to figure this out. But I couldn't really pinpoint where it would be best. I have however became more confused on what is going on. So you have said that you have disabled file logging and you've still got |
I've published 6.2.0 with |
Thank you @archfz for checking
Indeed, the project is medium-large and a debug option is welcomed.
I think this is a real possibility because I saw big log file being generated when the error was not thrown and no log file at all when the error was thrown. After checking one of the generated log files it seems that the total number of chars from inside was 1408628 (used this tool for measuring) and then I picked the biggest individual log which seemed to be an
Even though the test spec is almost trivial, the web application under test is generating a lot of logs so I guess this could be a valid concern as showed above.
I managed to reproduce it. Attaching the logs here. Btw I noticed that when I did log-file-with-debug-enabled.txt The config used was:
Looking forward for your response. Thanks! |
Yepp I can see that none of the debug logs are triggered from the In this case I really think its an issue with the payload of the task, which contains maybe too many messages. Please try to configure |
After experimenting I extracted the following conclusions:
My feeling is that there is still some processing in the background (e.g. setting Do you know what is the performance limit of the plugin ? Thanks |
With collectTypes set to empty array no logs will be collected. So this is very strange. If in that case you still got timeout on ctrLogMessages then something else is going on other than the size of the payload. At this point I would recommend experimenting with collectTypes as empty array and different cypress / node / docker image version. |
I don't know the performance limitations of this plugin. Noone ever reported a case where a test case was generating so many logs that it would break. |
Another thing you could try is enabling continuous logging. While this is not the best fit for actual usage it could give some more information where the problem might be. With this options there should not be a buildup of logs as all logs are immediately sent. https://github.com/archfz/cypress-terminal-report?tab=readme-ov-file#optionsenablecontinuouslogging |
When using cypress to test some web application it gets after the end of a successful test into some
after each
/after
bocks (plugin defined) and then fails withcy.task(ctrLogMessages) timed out after waiting 60000ms
.This makes the test to fail.
Operating System: Ubuntu latest
Software Version: Cypress 13.13.1, cypress-terminal-report ^5.0.2 (tried with ^6.1.2)
Additional Information: The web application is written with Angular and Cypress is used to test it. Cypress runs inside a docker container from Azure VM / Pipeline.
Error
e2e.ts
cypress.config.ts
The text was updated successfully, but these errors were encountered: