-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
TypeError: Cannot convert undefined or null to object failing the test #4181
Comments
Hey @arnojong, thanks for providing the test code to reproduce the issue. Unfortunately, when I run the code above, I get some different errors. Do you have anything in your Can you send a screenshot of the TypeError you are seeing in the Test Runner? I'd like to see where this is being thrown. You should also be able to click the error in the Command Log with devtools open and see the stack trace of the error printed within the console - this may help you track down where the error is throwing. Let me know! |
@arnojong Can you open the DevTools and click on the yellow error? This should print the stack trace in the console. Can you send a screenshot or what is printed there please? Thanks! |
@jennifer-shehane Here you go! |
@arnojong This error is coming from your application's code at I would suggest looking into why that is happening at that line of code. I can't give much more insight since I haven't been able to run this locally and get the same error. We'd need a reproducible example. |
Unfortunately we have to close this issue as there is not enough information to reproduce the problem. Please comment in this issue with a reproducible example and we will reopen the issue. 🙏 |
Hi @arnojong just dropping a comment here, to let you know that I saw the same error. I see you're also running a Magento site. This error happens sporadically and I am not able to accurately reproduce is - no action is needed here, I just thought I'd let you know that there is someone else in the world that saw this :) |
Also seeing this error with Magento, but only in the graphic test runner. Tests work fine in the CLI. |
Hi, I have had some time to look into this error It appears for me when selecting product options, address autocomplete drop down options, and it prevented my checkout from completing I first started by going over the versions of https://github.com/julien-maurel/jQuery-Storage-API, to see if I can upgrade, but that did not solve my issue Early on in my tests, I saw that my local storage (which Magento 2 depends on) are being cleared. This is a philosophy of Cypress and I agree with it, but Magento depends on that storage data being set - I found the same for cookies btw What I ended up doing was to set the below at the top of my test
That has prevented the error from firing, and my tests, now function as they should Hope it helps! |
Current behavior:
My tests are failing because of the
TypeError: Cannot convert undefined or null to object
failing the testSteps to reproduce
I wrote the following test, yet it fails, I followed the documentation but don't see what I did wrong.
Versions
Cypress version 3.2.0, using
npx cypress open
to show the runner, no changes made to that.Mac OSX Mojave 10.14
The text was updated successfully, but these errors were encountered: