-
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
Cypress Component Tests Not Working after macOS Ventura Upgrade #24876
Comments
Hi @mschaefer-gresham , sorry to hear you're having trouble. I have a couple requests:
|
Could you run Cypress in debug mode mode and print or attach the entire set of logs here? Can you be a bit more specific about what you would like me to do? I see that you can use the .debug() function inside a test, but my tests aren't even loading. Could you provide a bit of info about what sort of project you're running component tests on? Create React App? Next? Vue? React App with webpack, not Create React App. Do you see similar behavior for other browsers (Electron, for example)? Yes, Electron hangs on the "Loading your tests" page. Using the Firefox, it hangs on "Opening component testing in Firefox". What about if you step through the Cypress launch steps manually? (not provide the --component or --browser flags via CLI and instead use the UI) If I run "cypress open", then using Chrome it doesn't even open the tests. It hangs on "Opening component testing in Chrome". Can you try eliminating non-default apps from the execution chain to see if there's an OS permissions issue somewhere? For example, use Terminal instead of iTerm When using Terminal the os indicated that Terminal had no permissions access or modify apps. So I clicked Allow and was directed the App Management settings and I enabled Terminal: But the result is the same. Cypress hangs on the "Your tests are loading..." page: |
Sorry @mschaefer-gresham , I wasn't very clear on the debug logs part. It is possible to enable 'debug-level' logging when running Cypress which gives us more insight into the internal workings of the app. Hopefully that will give us a clue why your tests are hanging |
Here is what I ran:
Output:
It hangs here: |
@mschaefer-gresham I think you may need to tweak the command a bit - we're trying to set the
or
The goal is to get (a ton) of output that looks like this:
|
@mschaefer-gresham I took a look at your logs and didn't see any single smoking gun that would explain the odd behavior you're seeing. I also set up a basic React app on macOS 13.0.1 using Node 19.1.0 and Cypress 10.11.0 and did not see any hangs or issues. At this point the main thing that stands out is the use of Without a reproducible example to debug through it's difficult to know where to start, but I would see if perhaps Node was accidentally installed via |
Thank you for investigating. That's unfortunate you didn't find anything. I'm totally stuck at the moment. The tests won't run. I tried to re-installed Cypress and tried getting a fresh set of node_modules. I also uninstalled nvm & node and re-installed. Not sure what to try now. |
@mschaefer-gresham Hmm, this is definitely frustrating, especially since the project seems to work for your coworker. These environment-specific issues are always the hardest to debug. I'll poll some other team members on the chance they notice something in the logs that I missed. In the interim there are a couple basic troubleshooting steps I can offer:
|
Here's the outcome of each point above:
|
I see this in the logs
I wonder if this is relevant. I am updating my macbook to Ventura right now, so I can try to reproduce and help out with debugging. |
I also cannot reproduce. I tried various things, no luck. Related? #25231 |
@mike-plummer @lmiller1990 here is a bit more information. Using the create react app project, if I go to Developer Tools (Cypress menu) and select Reload while Cypress is hanging (the initial Cypress page) then I get the following error:
Using my webpack project I get:
I deleted /Users/matthew/Library/Application Support/Cypress/ (this required using sudo) and now the cypress react app tests are running. However, my project's tests still aren't running. I now get past the initial Cypress page and can see the loaded specs in Chrome. But when I try to run a spec I hangs on the "Your tests are loading...." step. I tried deleting my project and repulling the dependencies but it didn't help. Any ideas? |
We write to a preferences file to save some local state (like the current filter when searching for specs). Webpack also writes to a file when it bundles. As to why this is throwing EACCES, I am not sure... something strange is happening with your permissions. I wonder why your (terminal/Cypress App) doesn't have permission to access the file system? I googled "ventura permissions error" and various things come up, mainly related to Virus Scanners breaking due to the same issue, but no obvious "do this to fix it" (assuming you tried the usual things, like playing with the permissions in System Preferences?) If you do
First is the owner, second is the group. What does your terminal show for this command? This issue seems environment specific. I'm sorry I can't be of more assistance. |
I think these are the same: #25231 |
I tried running this command:
And I get the following:
I ran First Aid via Disk Utility and reset my user permisssions:
This fixed this issue above. But Cypress still hanging when I try to run a spec file. |
@lmiller1990 @mike-plummer I finally got my tests running. It was a combination of reseting my user permissions and reverting to node 16.19.0. I was using node 18.12.1 and found this issue this morning 23114 related to tests hanging with node 18. |
@lmiller1990 @mike-plummer node version 19 was hanging as well. I applied the corresponding fix provided in 23114 by adding the following to my webpack config:
And the tests started running. I'm using the latest Cypress version 12.2. Is 23114 included in 12.2 or earlier, or is this a new issue? |
What version of Vite are you using? I think they fixed that in v4. #23114 is most certainly live, we do minor releases every 2 weeks. Nice debugging! I am using Cypress with Vite (v4) and Node.js 18, I didn't have this happen, but I did not try Node.js 19 yet. |
@lmiller1990 that's the thing. I'm not using vite. I'm using webpack (5.74.0) and webpack-dev-server (4.11.1). |
I think #23114 was fixing Vite. I think we need similar patch in webpack to set the host correctly. We should do this. I can get this into our next sprint (early Feb). If you'd like to try and make this patch earlier, it would go in Thank you for the debugging and patience! |
Hey team! Please add your planning poker estimate with Zenhub @astone123 @ZachJW34 @marktnoonan @warrensplayer @lmiller1990 |
#25861 will fix it. |
Current behavior
After upgrading to Ventura, Cypress component testing has stopped working. I've seen other related posts. I tried givng iTerm Full Disk Access, App Management rights, and added it to Developer Tools (all under Privacy and Security).
Cypress hangs here (
yarn cypress open --component
):I had node 16 installed before upgrading to Ventura. With node 16,
yarn cypress run --component --browser chrome
still works. Butyarn cypress open --component
hangs as above. I installed node 19 after upgrading to Ventura and both commands hang using version 19.Using node 19,
yarn cypress run --component --browser chrome
hangs here on the first test:Another member on my team only had to give App Management rights to iTerm and Webstorm and Cypress is working. But he didn't install a new node version after upgrading or make any other changes. I had also freshly cloned our repo and did a yarn install after the upgrade which he didn't do. I'm guessing that if he made similar changes he would have the same issues.
If I run
sudo yarn cypress open --component
the tests load, but when I try to run one, it just hangs here:I also cleared the Cypress cache and re-installed.
Any suggestions would be welcome.
Debug logs
No response
Cypress Version
10.11.0
Node version
19.1.0
Package Manager
yarn
Package Manager Version
1.22.19
Operating system
Mac
Operating System Version
ventura 13.0.1
Other
No response
The text was updated successfully, but these errors were encountered: