-
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
Possible memory leak in v5.3.2 #203
Comments
I have a feeling that this might be caused by the fix for #184 Could you help narrow down the issue? Are you using any asserts? Check if issue is reproducing in 5.2.0 already. Besides this it would be helpful if you can provide a minimal reproducible example. |
Issue does not replicate in 5.2.0 Below is the console logs when testing with 5.1.1 / 5.2.0
|
I also get this kind of error. On the plugin version 5.3.3 Always appears in input type input fields example сy.get("input").type("test") |
I am still facing issues reproducing this. The tests in this repository also use input typing. Best would be if you could create a repository in which you reproduce it and send it here. In 5.3 the safe json stringify was introduced. This maybe can cause the issue, but this is only used for |
@archfz Tried with the following code in the support file
getting the following error
|
Check the doc, you need exact values there. Also I was proposing to include all but the ones that start with cons. |
After reviewing the issue again I have noticed that you have a particular console info log:
I believe this could be where the issues is reproducing. Maybe that object is too big somehow, or the library that is handling stringification is not handling too big objects properly. I have decided to try out another library. https://www.npmjs.com/package/stringify-object |
@archfz Tested with version 5.3.5 ➜ iot_rwt git:(develop) ✗ npm list | grep term Got the same issue.
|
@archfz Isolated the issue to when i removed just the info part it worked. Tested on 5.3.5 with the below options
It worked! Sharing our configs in condig.cypress.js as well.
|
@joydeep100 Could you describe the object that is console info logged? Somehow that is casuing the issue but I am struggling to understand how. |
Just check in the browsers console how that object looks like. Can you say it's big? Does it have circular references? Or any other particular things? Maybe try to json stringify it and send it here or just send a screenshot of the log in the browser console (inspector). |
Yeah, that object is for sure huge, as it has even the dom body in it. Now I wonder what we can do to avoid issue with this. |
Could you run the following gist on your object? https://gist.github.com/rajinwonderland/36887887b8a8f12063f1d672e318e12e And tell me how big is the memory size of it? |
I am struggling to see a solution for this. Previously we used JSON.stringify, which was working for your case because it breaks with cycles error. But now we support decycling and printing such complex objects as well, but this in turn allowes not serializing your very large object which exhausts the memory. We either revert back and break support or we maybe need a library that supports max depth setting. |
Could you maybe try to serialize with this? https://github.com/Canop/JSON.prune |
Yes JSON.prune() works. Attaching the output. |
… leak. Release 5.3.5" This reverts commit 994e9f8.
Check if 3.5.6 resolves the issue. |
@archfz You mean 5.3.6 right. Yeah it works. Now the object is printed something like this
|
We started observing that cypress is running out of memory and starts to crash as OOM error after we upgraded from 5.1.1 to 5.3.2
cypress-io/cypress#27574
The text was updated successfully, but these errors were encountered: