You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used to disable Discord and Stripe errors inside of a cy.origin block like so:
cy.origin('https://checkout.stripe.com',{args: {expiryDate: format(addMonths(newDate(),2),'MMyy')}},({ expiryDate }: {expiryDate: string})=>{cy.on('uncaught:exception',(err)=>{// Allow any error to occur on the Stripe page, hope for the best.returnfalse;});
This worked with 100% reliability across easily a thousand test samples, for months. Now, on the latest version (I haven't checked which version reverting to might work), I need to also add the same cy.on('uncaught:exception', ...) error silencer outside of the origin block or Stripe's uncaught exceptions are raised after returning back from the Stripe page:
cy.on('uncaught:exception',(err)=>{// Allow any error to occur on the Stripe page, hope for the best.returnfalse;});cy.origin('https://checkout.stripe.com',{args: {expiryDate: format(addMonths(newDate(),2),'MMyy')}},({ expiryDate }: {expiryDate: string})=>{cy.on('uncaught:exception',(err)=>{// Allow any error to occur on the Stripe page, hope for the best.returnfalse;});// Stripe testing code// ...// Stripe redirects back to my web app})
Intuitively it seems like the still running Stripe code, or Stripe launched promises, cause errors after Cypress has already returned out of the origin block to my web app's page.
Desired behavior
All errors originating from inside an origin block should be caught there and not interfere with my web app's testing code.
Test code to reproduce
Stripe throws a lot of errors by default, any cy.origin to a valid Stripe Checkout URL should exhibit this behaviour. Please note that I have the experimental obstructive third party code flag enabled.
Cypress Version
13.13.0
Node version
20
Operating System
Windows 11
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered:
@Helveg It'd be helpful to narrow down the release this was introduced in. We made a change in 13.9.0 around unhandled errors: #29454 to handled undefined errors, but I'm not sure why that would impact this situation.
Current behavior
I used to disable Discord and Stripe errors inside of a
cy.origin
block like so:This worked with 100% reliability across easily a thousand test samples, for months. Now, on the latest version (I haven't checked which version reverting to might work), I need to also add the same
cy.on('uncaught:exception', ...)
error silencer outside of the origin block or Stripe's uncaught exceptions are raised after returning back from the Stripe page:Intuitively it seems like the still running Stripe code, or Stripe launched promises, cause errors after Cypress has already returned out of the origin block to my web app's page.
Desired behavior
All errors originating from inside an origin block should be caught there and not interfere with my web app's testing code.
Test code to reproduce
Stripe throws a lot of errors by default, any
cy.origin
to a valid Stripe Checkout URL should exhibit this behaviour. Please note that I have the experimental obstructive third party code flag enabled.Cypress Version
13.13.0
Node version
20
Operating System
Windows 11
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: