Skip to content
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

Tests fail because of exception in console #1565

Closed
Gennadiii opened this issue Apr 11, 2018 · 10 comments
Closed

Tests fail because of exception in console #1565

Gennadiii opened this issue Apr 11, 2018 · 10 comments
Labels
type: duplicate This issue or pull request already exists

Comments

@Gennadiii
Copy link

  • Operating System: Win10
  • Cypress Version: 1.4.2
  • Browser Version: Chrome 65

Is this a Feature or Bug?

This is a bug

Current behavior:

I have exception on my app, I can see it in console: Uncaught TypeError: Cannot read property 'lastChild' of null
And I don't care about it actually. But Cypress fails tests because of it.

Desired behavior:

I`d like to ignore such kind of errors since they don't influence the flow I need to test

@jennifer-shehane
Copy link
Member

You can turn these off, as detailed here: https://on.cypress.io/catalog-of-events#Uncaught-Exceptions

@Gennadiii
Copy link
Author

Gennadiii commented Apr 16, 2018

@jennifer-shehane Doesn't help/ I have the same errors with exact code from example in support/index.js
@brian-mann could you please help?

@jennifer-shehane jennifer-shehane added stage: awaiting response Potential fix was proposed; awaiting response and removed type: question labels Apr 17, 2018
@jennifer-shehane
Copy link
Member

This should definitely work if the error is originating from your application. Could you provide more details about the Uncaught TypeError?

  • Screenshots
  • Your support/index.js code

@brian-mann
Copy link
Member

@Gennadiii this is one of the most tested features of Cypress. We have dozens of tests around these scenarios. Until you provide a reproducible repo we will close all issues.

There can always be edge cases that we haven't considered, but the documentation and our tests are accurate from what we've covered. Until we understand and even identify and prove that this is happening there isn't anything for our team to do. We need a minimally reproducible repo.

Alternatively, our team offers paid support where we will screenshare with you to help diagnose and fix the issue.

@brian-mann
Copy link
Member

Also here is a much longer comment I've made before about this exact issue: #1385 (comment)

@jennifer-shehane jennifer-shehane removed stage: awaiting response Potential fix was proposed; awaiting response labels Jan 16, 2019
@arjitkathuria
Copy link

I am also getting same issue, I have tried Cypress.on('uncaught:exception', (err, runnable) => {
return false
})
But still not working anybody please help.

@vjpr

This comment has been minimized.

@muslaydin

This comment has been minimized.

1 similar comment
@gpcavalcante

This comment has been minimized.

@jennifer-shehane
Copy link
Member

Please refer to this issue, which details why this happens and a PR for the fix. #987

We will be closing this issue to comments.

@cypress-io cypress-io locked and limited conversation to collaborators Oct 23, 2019
@kuceb kuceb added the type: duplicate This issue or pull request already exists label Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

8 participants