InvalidCharacterError Failed to execute 'atob' on 'Window'
See original GitHub issueCurrent behavior
We are getting the following error trace. This is occurring randomly on random spec files in our CI environment. We are not able to reproduce it. All the retries also fail with the same error.
InvalidCharacterError: The following error originated from your test code, not from Cypress.
> Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
Error: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
at Object.decodeBase64Unicode (https://example.com/__cypress/runner/cypress_runner.js:177637:31)
at base64toJs (https://example.com/__cypress/runner/cypress_runner.js:176928:28)
at Object.extractSourceMap (https://example.com/__cypress/runner/cypress_runner.js:176894:21)
at extractSourceMap (https://example.com/__cypress/runner/cypress_runner.js:175985:37)
at tryCatcher (https://example.com/__cypress/runner/cypress_runner.js:10325:23)
at MappingPromiseArray._promiseFulfilled (https://example.com/__cypress/runner/cypress_runner.js:7445:38)
at MappingPromiseArray.PromiseArray._iterate (https://example.com/__cypress/runner/cypress_runner.js:8647:31)
at MappingPromiseArray.init (https://example.com/__cypress/runner/cypress_runner.js:8611:10)
at Promise._settlePromise (https://example.com/__cypress/runner/cypress_runner.js:8314:21)
at Promise._settlePromise0 (https://example.com/__cypress/runner/cypress_runner.js:8362:10)
at Promise._settlePromises (https://example.com/__cypress/runner/cypress_runner.js:8442:18)
at Promise._fulfill (https://example.com/__cypress/runner/cypress_runner.js:8386:18)
at MappingPromiseArray.PromiseArray._resolve (https://example.com/__cypress/runner/cypress_runner.js:8659:19)
at MappingPromiseArray._promiseFulfilled (https://example.com/__cypress/runner/cypress_runner.js:7485:18)
at Promise._settlePromise (https://example.com/__cypress/runner/cypress_runner.js:8322:26)
at Promise._settlePromise0 (https://example.com/__cypress/runner/cypress_runner.js:8362:10)
Desired behavior
The tests should not fail with this error or atleast should correct itself in retries.
Test code to reproduce
Unable to reproduce the error consistently.
Versions
Cypress: 5.3.0 Browser: Custom Chrome 86 (headless)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:21 (3 by maintainers)
Top Results From Across the Web
Failed to execute 'atob' on 'Window' - Stack Overflow
Here I got the error: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded. Because you didn't...
Read more >HTML : Error:Failed to execute 'atob' on 'Window' - YouTube
HTML : Error: Failed to execute ' atob' on 'Window ': The string to be decoded is not correctly encoded [ Gift :...
Read more >failed to execute 'atob' on 'window': the string to be decoded is ...
error domexception: failed to execute 'atob' on 'window': the string to be decoded is not correctly encoded. Add Answer | View In TPC...
Read more >cypress-io/cypress - Gitter
I'm getting "InvalidCharacterError: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.".
Read more >Window atob() Method - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I started seeing these and other (similar in nature) errors when switching to running more than 1 cypress test in parallel on the same machine.
The following failures are observed:
All of these are always visible on the first test of each chunk, which leads me to think that cypress or the browser are not properly initiated (or the app does not manage finishing loading) before the test attempts to start.
We are running cypress 5.3.0 — would really like to solve these before attempting to upgrade to the latest version since there’s a non-trivial amount of work to update of the
cy.route
calls.I am looking into issues relating to:
I get the same error when I run my tests on GitHub actions. Cypress on ci is painful.