Skip to content
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

illegal operation on a directory #800

Closed
ram-potla opened this issue Oct 23, 2017 · 9 comments
Closed

illegal operation on a directory #800

ram-potla opened this issue Oct 23, 2017 · 9 comments
Labels

Comments

@ram-potla
Copy link

ram-potla commented Oct 23, 2017

Bug:

  • Operating System: MACOS Sierra 10.12 (16A323
  • Cypress Version: 1.0.2
  • Browser Version: Chrome Version 61.0.3163.100 (Official Build) (64-bit)

Is this a Feature or Bug?

I opened cypress using cypress open
Server starts and shows me the newly created spec file
I ran the spec file
It opens a browser with running and immediately I see the following errors;

GET /__cypress/runner/fonts/fontawesome-webfont.woff2?v=4.7.0 304 0.609 ms - -
GET /__cypress/iframes/integration/bootStrap_page_spec.js 200 3.391 ms - 741
GET /__cypress/tests?p=cypress/support/index.js-559 200 2.830 ms - -
GET /__cypress/tests?p=cypress/integration/bootStrap_page_spec.js-825 200 2.531 ms - -
GET / 200 4.072 ms - -
GET /css/solaApp.cacda5a6.css 304 35.861 ms - -
GET /typekit/sus6pzy.js 304 30.890 ms - -
GET /vendor/manifest.e299533f.js 304 29.369 ms - -
GET /js/solaApp.e299533f.js 304 30.334 ms - -
GET /typekit/c/sus6pzy-d.css 304 4.225 ms - -
GET / 302 2.453 ms - 52
GET /__/ 304 2.703 ms - -
GET /vendor/vendor.e299533f.js 200 102.384 ms - -
GET /__cypress/runner/cypress_runner.css 304 0.625 ms - -
GET /__cypress/runner/cypress_runner.js 304 0.448 ms - -
GET /__cypress/runner/fonts/fontawesome-webfont.woff2?v=4.7.0 304 0.637 ms - -
  Error: EISDIR: illegal operation on a directory, open '/Users/potlar/Library/Application Support/Cypress/cy/production/projects/cy-poc-6ed1ecd45462ea54d65d007f43c04fee/bundles/cypress/integration'
  
  - Error
  

GET /__cypress/iframes/ 200 19.451 ms - 665
  Error: Cannot find module '/Users/potlar/cy-poc/cypress/integration' from '/Users/potlar/cy-poc'
  
  - async.js:55 
    [cy-poc]/[server]/[browser-resolve]/[resolve]/lib/async.js:55:21
  
  - async.js:69 load
    [cy-poc]/[server]/[browser-resolve]/[resolve]/lib/async.js:69:43
  
  - async.js:92 onex
    [cy-poc]/[server]/[browser-resolve]/[resolve]/lib/async.js:92:31
  
  - async.js:22 
    [cy-poc]/[server]/[browser-resolve]/[resolve]/lib/async.js:22:47
  
  - polyfills.js:284 
    [cy-poc]/[server]/[graceful-fs]/polyfills.js:284:29
  

  Error: EISDIR: illegal operation on a directory, open '/Users/potlar/Library/Application Support/Cypress/cy/production/projects/cy-poc-6ed1ecd45462ea54d65d007f43c04fee/bundles'
  
  - Error
  

GET /__cypress/tests?p=cypress/support/index.js-993 200 7.346 ms - -
{ Error: EISDIR: illegal operation on a directory, read
    at Error (native)
 errno: -21, code: 'EISDIR', syscall: 'read' }
Error: EISDIR: illegal operation on a directory, read
    at Error (native)
@bahmutov
Copy link
Contributor

Interesting bug. Is this a single project with this problem or does every project have the same access problem? How did you install Cypress - npm i -D cypress from the project folder /Users/potlar/cy-poc?

@bahmutov bahmutov added OS: mac stage: needs information Not enough info to reproduce the issue stage: needs investigating Someone from Cypress needs to look at this type: bug labels Oct 24, 2017
@ram-potla
Copy link
Author

ram-potla commented Oct 24, 2017 via email

@ram-potla
Copy link
Author

ram-potla commented Nov 8, 2017

GET /__cypress/runner/fonts/fontawesome-webfont.woff2?v=4.7.0 304 0.906 ms - -
  Error: EISDIR: illegal operation on a directory, open '/Users/potlar/Library/Application Support/Cypress/cy/production/projects/cypress-073855131d8053ebc1daebbb0464b31a/bundles/cypress/integration'  
  - Error
  

GET /__cypress/iframes/ 200 23.354 ms - 665
  Error: Cannot find module '/Users/potlar/ANZ/sola/csp-angular-ui-sola/e2e/cypress/cypress/integration' from '/Users/potlar/ANZ/sola/csp-angular-ui-sola/e2e/cypress'
  
  - async.js:55 
    [cypress]/[server]/[browser-resolve]/[resolve]/lib/async.js:55:21
  
  - async.js:69 load
    [cypress]/[server]/[browser-resolve]/[resolve]/lib/async.js:69:43
  
  - async.js:92 onex
    [cypress]/[server]/[browser-resolve]/[resolve]/lib/async.js:92:31
  
  - async.js:22 
    [cypress]/[server]/[browser-resolve]/[resolve]/lib/async.js:22:47
  
  - polyfills.js:284 
    [cypress]/[server]/[graceful-fs]/polyfills.js:284:29
  

  Error: EISDIR: illegal operation on a directory, open '/Users/potlar/Library/Application Support/Cypress/cy/production/projects/cypress-073855131d8053ebc1daebbb0464b31a/bundles'
  
  - Error
  

GET /__cypress/tests?p=cypress/support/index.js-512 200 8.466 ms - -
{ Error: EISDIR: illegal operation on a directory, read
    at Error (native)
 errno: -21, code: 'EISDIR', syscall: 'read' }
Error: EISDIR: illegal operation on a directory, read
    at Error (native)

GET /__cypress/tests?p=-460 - - ms - -

@bahmutov
Copy link
Contributor

Very weird, and the disk is not out of space? We have never seen this error when running Cypress on Macs

@ram-potla
Copy link
Author

ram-potla commented Nov 28, 2017 via email

@brian-mann
Copy link
Member

I have very rarely and occasionally seen this error but I couldn't ever figure out the underlying cause.

It might be having to do with the application you're visiting. Can you try running something like the Kitchen Sink? You did not specify if this is happening on all applications or just yours.

You said "you added one sample test". Does this mean that it crashes only when you save a file? Can you be more descriptive of the exact steps you perform to cause this to happen? Perhaps taking screenshots or sending us the recorded video.

Something I thought of would be a permission issue related to ~/Library or another folder in there. Could be failing to create the directory structure needed to cache the test bundles.

Also have you tried upgrading to newer Cypress versions? We've done a lot of work in the spec code handling.

@brian-mann
Copy link
Member

I think what is actually happening is that your app is implementing a security mechanism that is redirecting Cypress to an invalid URL, and when it attempts to serve this file it instantly crashes because it's not valid and we can't read it.

I think that is the only times I've seen this error.

@brian-mann
Copy link
Member

I'm going to close this until more information is provided, or assuming its security related there are already many open issues talking about how to work around this.

@brian-mann brian-mann removed stage: needs investigating Someone from Cypress needs to look at this type: bug labels Nov 28, 2017
@jennifer-shehane jennifer-shehane removed stage: needs information Not enough info to reproduce the issue labels Jan 16, 2019
@jbryson3
Copy link

jbryson3 commented Oct 28, 2019

I got this error when my SPA UI framework (Ember.js) was configured to use the hash in the url.

cy.visit('http://localhost:4200'); 
//once loaded is forwarded to localhost:4200/#/dashboard

When I changed my application's router to use the "history" strategy, I no longer received this error.

cy.visit('http://localhost:4200');
// once loaded is forwarded to localhost:4200/dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants