Cypress e2e tests are failing on CI but not locally

Hi, what are the most common reasons why the e2e tests will fail on CircleCi and not locally? This has only been happening recently and not sure why.

1 Like

Thanks for joining the CircleCI community!

It would be helpful to see the errors you are getting to identify what could be going on. Can you post them here?

1 Like

This shows where the e2e tests are failing:

You can also clone down this repo and checkout to the branch where the tests are failing and see that the e2e tests pass locally and fail on the CI.

You can also find the CI config here: Unirep-Social/config.yml at main · Unirep/Unirep-Social · GitHub

Thanks for responding!

@jerdog any thoughts here?

The only real error I am seeing is coming from the application code for

TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.

It working locally but not in your CI pipeline usually means a dependency isn’t accounted for somewhere?

I think this has to be a dependency issue. But still debugging.

1 Like

Hey @AnthonyMadia , just wanted to follow up and see how things are coming along?

Thanks for following up. I solved this problem but now having the same problem on another branch. It seems the CI is having flaky tests but I can run everything perfectly locally.

This is strange because the changes made on this branch were very minimal as you can see here: Frontend/show off rep bar by kittybest · Pull Request #145 · Unirep/Unirep-Social · GitHub but the e2e tests are still failing.

I don’t know enough about Cypress, but the errors it spits out seem to be pretty specific around “unhandled promise”. Running things locally and working, but not working in the CI platform (which is containerized) usually points to dependency issues.

How did you solve the previous problem?