question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A test passes in UI mode and fails when run headlessly

See original GitHub issue

Current behavior

I have recently migrated my testing project from cypress 9 to cypress 10 I had a test that used to pass in both UI and headless modes. After the migration, it only passed in UI mode.

There is an error message that keeps showing in the console while tests are running headlessly

[1788:0608/155331.144737:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for url8437.mytigate.com failed: ----- Certificate i=0 (OU=Cypress Proxy Server Certificate,O=Cypress Proxy CA,L=Internet,ST=Internet,C=Internet,CN=url8437.mytigate.com) ----- ERROR: No matching issuer found

Desired behavior

The tests shall pass in both UI and headless modes.

Test code to reproduce

The issue happens specifically when an ethereal based task is called. The task call

cy.task('getMessage', key).then(message=>{
    cy.get('html').invoke('html', message.html);
});

This task queries an ethereal mailbox for the last message received. The error shown in headless mode

 `cy.task('getMessage')` timed out after waiting `60000ms`

Cypress Version

10

Other

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
HeshamMoneercommented, Jun 10, 2022

Hi @rachelruderman I have been trying to reproduce it and it was only reproducible on the app being tested Maybe a new feature was added at the time I migrated to Cypress 10 I still need to make further investigations

0reactions
rachelrudermancommented, Jun 11, 2022

Since updating from 8.5.0 to 9.7.0 our tests are full of certificate errors in Gitlab CI/CD Pipeline (seeing the same thing in two separate projects)

Hi @intellix! Since this issue is specific to the app code of the reporter, it’s been closed by the author. For your certificate errors, we welcome you to open a new issue with a reproducible example 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Cypress tests fail when running headless but pass ...
My website uses a refresh policy which is working stable while the web opens the cypress interface. But that looks not working on...
Read more >
Headless testing on Chrome browser fails few times for no ...
There are many things that could cause tests to fail in headless and pass in head mode. The most likely cause is timing....
Read more >
Configure for UI testing - Azure Pipelines | Microsoft Learn
When running Selenium tests for a web app, you can launch the browser in two ways: Headless mode. In this mode, the browser...
Read more >
GUI and Headless Browser Testing - Travis CI Docs
What This Guide Covers; Using Sauce Labs; Using xvfb to Run Tests That Require a GUI; Using the Chrome addon in the headless...
Read more >
Headless Browser Testing Clarified | by Zhimin Zhan - Medium
The error backtrace usually does not give the full picture. In other words, Chrome with UI is my default test execution mode. When...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found