Change in test file crashes component tests after upgrading to Mac
See original GitHub issueCurrent behavior
Hello! Thanks in advance for your assistance with this issue.
After I updated to Mac Ventura, I started seeing that any change to my test file crashes my open component tests as can be seen in the attached video. Changes to the non-test code does not crash the component tests.
https://user-images.githubusercontent.com/6589960/197911652-6fccf5b8-7ade-410a-a2c2-c6c78ff59bea.mov
[Stack trace](http://localhost:50705/__/#)
Error: EPERM: operation not permitted, utime '/Users/willweiss/Library/Caches/Cypress/10.11.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-dev-server/dist/browser.js'
at utimesSync (node:fs:2025:3)
at EventEmitter.CypressCTWebpackPlugin.onSpecsChange (/Users/willweiss/Library/Caches/Cypress/10.11.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-dev-server/dist/CypressCTWebpackPlugin.js:64:13)
at EventEmitter.emit (node:events:513:28)
at EventEmitter.emit (node:domain:489:12)
at EventEmitter. (/Users/willweiss/Library/Caches/Cypress/10.11.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/dev-server.js:9:21)
at EventEmitter.emit (node:events:513:28)
at EventEmitter.emit (node:domain:489:12)
at process. (/Users/willweiss/Library/Caches/Cypress/10.11.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/util.js:33:26)
at process.emit (node:events:513:28)
at process.emit (node:domain:489:12)
at process.emit.sharedData.processEmitHook.installedValue [as emit] (/Users/willweiss/Library/Caches/Cypress/10.11.0/Cypress.app/Contents/Resources/app/node_modules/@cspotcode/source-map-support/source-map-support.js:745:40)
at emit (node:internal/child_process:939:14)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
SpecRunner
Passed:
4
Failed:
--
Pending:
--
[EnsureFeatureSwitchesFetched.cyC.test.tsx](http://localhost:50705/__/#)344ms
EnsureFeatureSwitchesFetched
blocks rendering children until feature switches are fetched from the API when switch is onpassed
blocks rendering children until feature switches are fetched from the API when switch is offpassed
uses feature switches fetched from NativeApp if available and doesn't call the API if all necessary switches are presentpassed
still makes a request to the API if the NativeApp doesn't have all the feature switches we needpassed
ChromeChrome 106
360x760 (92%)
Desired behavior
In this situation, cypress should stay open after updating my test file
Test code to reproduce
Tests are run via
TZ=America/New_York yarn cypress run --component --browser chrome --config watchForFileChanges=false
on version 10.11.0
.
with a cypress.config.ts file that looks like this
export default defineConfig({
projectId: ...,
downloadsFolder: "src/test/cypress/downloads",
fixturesFolder: "src/test/cypress/fixtures",
screenshotsFolder: "src/test/cypress/screenshots",
videosFolder: "src/test/cypress/videos",
defaultCommandTimeout: 10000,
watchForFileChanges: false,
viewportWidth: 360,
viewportHeight: 760,
retries: {
runMode: 2,
openMode: 0
},
video: false,
chromeWebSecurity: false,
e2e: {
baseUrl: "https://parent-android-web.classdojo.test:4002",
setupNodeEvents(on, config) {
on("file:preprocessor", cypressEsbuildPreprocessor({}));
return config
},
specPattern: "src//**/*.cyI.test.{ts,tsx}",
supportFile: "src/test/cypress/support/e2e.ts",
},
component: {
setupNodeEvents(on, config) { },
specPattern: "src/**/*.cyC.test.{ts,tsx}",
supportFile: "src/test/cypress/support/component.js",
devServer: {
framework: "next",
bundler: "webpack",
},
},
});
### Cypress Version
10.11.0
### Node version
v16.17.0
### Operating System
macOS
### Debug Logs
_No response_
### Other
_No response_
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Diagnose problems with your Mac - Apple Support
Choose File > Print, then click Print. If Apple Diagnostics reports that your Wi-Fi card is not working properly, contact Apple or an...
Read more >How to Use the Mac Console App to Diagnose a Crash
We're going to take a look at using the Console app to track down the cause of a system or app crash.
Read more >Troubleshooting | Cypress Documentation
When debugging a failing test, follow these general principles to isolate the problem: ... sometimes causing a breaking change in your automated tests....
Read more >MacOS Monterey Problems – Fixing Issues with macOS 12
If the Mac feels slow after updating to MacOS Monterey, ... In testing, I was able to replicate this issue a few times...
Read more >Freezing and crashing issues after macOS Ventura upgrade
For Intel Mac devices. Go to Apple menu > Shut down. Turn ON your Mac while pressing down the SHIFT key. Release the...
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
@amehta265
Yes I understand, thank you very much for everything! 😃
@TapaiBalazs I agree with you that giving full disk access to an IDE is definitely not a permanent solution and is merely a workaround. Cypress needs access to folders and files in this path
/Users/btapai/Library/Caches/Cypress/10.11.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-dev-server/dist/
in order to read and write to the Cypress files in cache. Providing full disk access allows Cypress to do this. Ideally Cypress would have access to all its downloaded binaries irrespective of the IDE being used.We will definitely be looking into a more permanent solution but I’m glad we have a work around for now.