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.

navigator.setAppBadge hangs Cypress on Chrome 83

See original GitHub issue

Current behavior:

Cypress hangs (freezes), indefinitely. CI/CD killed the process after one hour.

This is reproducable - occurs every test run, both in Gitlab CI / Docker, as well as locally.

headless-mode has these issues, headed-mode does not have issues.

Desired behavior:

Cypress finished running (don’t care about pass/fail, just that it exists).

Test code to reproduce

reproduce.html

<!doctype html>
<html lang="en">
<head></head>
<body>
<script>
// Note that if you uncomment this line, everything's back to normal:
navigator.setAppBadge(5)
// This related function also causes the issue: 
// navigator.clearAppBadge()
// Here's some (unrelated) context: https://web.dev/badging-api/

document.getElementsByTagName('body')[0].innerText = 'Done'
</script>
</body>
</html>

test_spec.js

describe('Badge Icon', () => {
  it('does not hang cypress', () => {
    cy.visit('./cypress/fixtures/reproduce.html')
    cy.contains('Done')
  })
})

Versions

Cypress: confirmed on 4.3.0 / 4.0.0 / 3.8.3 / 3.8.1, and prior to 3.8.1 this there was no headless mode for Chrome
(assuming that it is the case for all Cypress versions)
OS: Linux
Browser: 
- Chrome 83 has this issue
- Chrome 81 does not have this issue (it passes)
- Electron 80 does not have this issue (it fails because undefined, but that's OK and to be expected)
- Firefox 74 does not have this issue (it fails because undefined, but that's OK and to be expected)
- Firefox 75 does not have this issue (it fails because undefined, but that's OK and to be expected)

Related issues

#6449 has similar symptoms, but a different browser.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
makepaniccommented, Jun 2, 2020

We hit the same issue, unrelated to cypress.

It seems like an upstream chromium issue. I’ve created https://bugs.chromium.org/p/chromium/issues/detail?id=1090429 to track it.

1reaction
ahmead23yaser23commented, Apr 20, 2020

جهودكم المبذولة على اي حال في مساعدة الحلول للمشاكل جيدة اريد توضيح اكثر

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Cypress Documentation
Troubleshooting · Support channels · Isolate the Problem · Download specific Chrome version · Clear Cypress cache · Launching browsers · Allow the...
Read more >
Cypress Tips and Tricks - Gleb Bahmutov
The command to run a specific spec file is cypress run --spec "spec/filename.js" by the way. Make JavaScript crashes useful #. As I...
Read more >
Sök: > - Sökmotorn
cookieEnabled Testa här document.cookie Testa här navigator. ... AdBlock; Clear Cache; ColorZilla; Google Chrome to Phone Extension; Page Ruler; ruul.
Read more >
Use Previous Version of Chrome to Prevent Instant Cypress ...
Recently, on my build servers, the Chrome version update to Chrome 95 and all of a sudden my automated builds stopped being able...
Read more >
Fixing Cypress errors part 1: chromium out of memory crashes
It was using chrome browser family with Cypress v4 (see below for more description on why this is wrong). Unfortunately, even after correcting ......
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