-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InvalidCharacterError Failed to execute 'atob' on 'Window' #9442
Comments
Are either of you testing file upload in your tests? Or Cypress.Blob anywhere? I've seen this error when involved with file upload before. Also, I see that both of you you are using an older version of Cypress. Please update to the current version of Cypress and let us know if this is still happening for you. Can you share the code around file upload where this is failing? It would be best if you could get this occurring locally in the same browser and open DevTools to see the full error and where it's originating from. |
Hi @jennifer-shehane , thanks for the reply. We are not testing file uploads in any of our tests. From what I can understand looking at the stack trace, the error is originating here when it is being called from here when loading the spec files in the browser. As what we saw in the video that was recorded is that the tests don't even start running. We'll be updating to the latest cypress version this week and let you know if this still persists. |
Hi @jennifer-shehane , But I saw that the error happened when Cypress tried to launch Mocha JS. In this point any test has been executed yet. Is there a way to get more information about the error? I used DEBUG option but the information is not enoght to know what happend. Regarding the version, I started migration to Cypress 6.0.0 last week but I had some issues with new command cy.interceptor(). Some of them were already reported in other tickets and I created this question in discusion section #9364. When they are fixed, I will continue with the migration. Thanks for your assistance. |
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 I am looking into issues relating to:
|
Hi @andreieftimie , I have a similar scenario (multiple cypress process in parallel) and Cypress is throwing the same errors with latest version (6.5.0). Yesterday I upgraded the version from 4.12.1 to 6.5.0 but the errors presists. Maybe Cypress does not have support to be executed in parallel in the same machine. In my case, errors happen randomly and other time all tests passed without any errors. |
This is how it actually looks. There seem to be multiple factors at play here. Unfortunately I am not in control over the CI infra, and can't run real parallelism at the moment. |
Mostly chiming in here to say that we see this pretty regularly on our CI system as well, and that it seems nigh on impossible to reproduce when we're specifically looking for it. edited to add that we're using Cypress 7.2.0 and headless electron 89. |
This might help. We used to run 3 parallel processes of Cypress on one server. This caused a lot of issues for us one of which was this one. |
I am also getting the same error while uploading .svg file. I am using the latest version of cypress (7.5.0). Below is the script to upload file: I am able to upload .jpg/.png/json file using the same script |
We don't recommended running more than 1 Cypress process in parallel on a single machine. There are a few issues that happen when this is done and the majority of the time, there is not enough resources on the machine to run Cypress and it still be performant. |
Based on the inquires in this thread there are numerous people running multiple instances on the same machine. For example we don't have full control over the CI environment (and I suspect similar constrains for other people) so a "poor man's" parallelism is achieved through running 2-3 instances on the same machine. While proper multi-machine parallelism would be better, we did halve the running time from ~60min to ~30 min by running 3 instances in parallel. |
I am having same issue now with my CI. And yes, I think running parallel tests on your CI is a common standard now. |
Hi folks, I had similar issues in my CI enviroment. In my case, I was able to fix it increasing the SHM size to 4 gb (args '--shm-size="4g"') in the jenkins file and assigning different temp folder by each cypress process (XDG_CONFIG_HOME=/tmp/cyhome). In my case, jenkins job is executing 6 cypress instance in parallel without errors. Versions |
@sgomezcnvdev nice! |
|
@andreieftimie Solution that helped me Fix unexpected token and win atob |
@romankhomitskyi - that is really interesting, thanks for the article, and I think you've correctly identified a root cause here. If you (or anyone else) wanted to open a PR to do something similarly inside Cypress itself, we'd definitely be interested in taking a look at it. |
I think there is an experienced dev at Cypress that could do this in 1-2 days |
I get the same error when I run my tests on GitHub actions. Cypress on ci is painful. |
@jennifer-shehane is this documented anywhere? Also in your jenkins example you do run multiple parallel cypress processes on a single agent: |
any updates ? |
Not right now -- is this still an issue in later versions of Cypress (eg Cypress 12)? It's hard to assign someone to work on this when it's so difficult to reproduce consistently - hard to debug and fix something that's primarily a race condition, especially if it only occurs running many Cypress instances in on a single machine in parallel, which isn't something we generally recommend (parallelization via CI and separate machines, however, is definitely something we use heavily). You could try #9442 (comment). I don't fully understand how the webpack preprocessor conflict occurs that is suggested in that article, nor how it would lead to the |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Current 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.
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)
The text was updated successfully, but these errors were encountered: