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

ENOENT: no such file or directory, open 'dump_har/file' #36

Closed
vCaisim opened this issue Apr 14, 2023 · 1 comment
Closed

ENOENT: no such file or directory, open 'dump_har/file' #36

vCaisim opened this issue Apr 14, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@vCaisim
Copy link
Contributor

vCaisim commented Apr 14, 2023

Error:



  Mark all as completed
    1) "before each" hook for "should allow me to mark all items as completed"
    2) "after each" hook: _ for "should allow me to mark all items as completed"


  0 passing (5s)
  2 failing

  1) Mark all as completed
       "before each" hook for "should allow me to mark all items as completed":
     AssertionError: Timed out retrying after 4000ms: Expected to find element: `.new-todo`, but never found it.

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Mark all as completed`
      at Context.eval (webpack:///./cypress/support/commands.ts:73:0)

  2) Mark all as completed
       "after each" hook: _ for "should allow me to mark all items as completed":
     CypressError: `cy.task('dumpEvents')` failed with the following error:

> ENOENT: no such file or directory, open 'dump_har/eede7d9d-4215-4a58-912e-200850796f6b.raw.json'

https://on.cypress.io/api/task

Because this error occurred during a `after each` hook we are skipping all of the remaining tests.
      at <unknown> (https://todomvc.com/__cypress/runner/cypress_runner.js:141557:78)
      at tryCatcher (https://todomvc.com/__cypress/runner/cypress_runner.js:8914:23)
      at Promise._settlePromiseFromHandler (https://todomvc.com/__cypress/runner/cypress_runner.js:6849:31)
      at Promise._settlePromise (https://todomvc.com/__cypress/runner/cypress_runner.js:6906:18)
      at Promise._settlePromise0 (https://todomvc.com/__cypress/runner/cypress_runner.js:6951:10)
      at Promise._settlePromises (https://todomvc.com/__cypress/runner/cypress_runner.js:7027:18)
      at _drainQueueStep (https://todomvc.com/__cypress/runner/cypress_runner.js:3621:12)
      at _drainQueue (https://todomvc.com/__cypress/runner/cypress_runner.js:3614:9)
      at ../../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://todomvc.com/__cypress/runner/cypress_runner.js:3630:5)
      at Async.drainQueues (https://todomvc.com/__cypress/runner/cypress_runner.js:3500:14)
  From Your Spec Code:
      at Context._ (webpack:///./node_modules/@currents/cypress-debugger-support/dist/index.js:1:66941)
  
  From Node.js Internals:
    Error: ENOENT: no such file or directory, open 'dump_har/eede7d9d-4215-4a58-912e-200850796f6b.raw.json'
        at Object.openSync (node:fs:585:3)
        at Object.readFileSync (node:fs:453:35)
        at readFile (/home/slavic/Projects/test-release/node_modules/@currents/cypress-debugger-plugin/src/fs.ts:13:46)
        at getHar (/home/slavic/Projects/test-release/node_modules/@currents/cypress-debugger-plugin/src/install.ts:28:16)
        at dumpEvents (/home/slavic/Projects/test-release/node_modules/@currents/cypress-debugger-plugin/src/install.ts:44:19)
        at invoke (/home/slavic/.cache/Cypress/12.9.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/child/run_plugins.js:246:16)
        at <unknown> (/home/slavic/.cache/Cypress/12.9.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/util.js:59:14)
        at tryCatcher (/home/slavic/.cache/Cypress/12.9.0/Cypress/resources/app/node_modules/bluebird/js/release/util.js:16:23)
        at Function.Promise.attempt.Promise.try (/home/slavic/.cache/Cypress/12.9.0/Cypress/resources/app/node_modules/bluebird/js/release/method.js:39:29)
        at Object.wrapChildPromise (/home/slavic/.cache/Cypress/12.9.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/util.js:58:23)
        at RunPlugins.taskExecute (/home/slavic/.cache/Cypress/12.9.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/child/run_plugins.js:252:10)
        at RunPlugins.execute (/home/slavic/.cache/Cypress/12.9.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/child/run_plugins.js:166:21)
        at EventEmitter.<anonymous> (/home/slavic/.cache/Cypress/12.9.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/child/run_plugins.js:56:12)
        at EventEmitter.emit (node:events:520:28)
        at EventEmitter.emit (node:domain:475:12)
        at process.<anonymous> (/home/slavic/.cache/Cypress/12.9.0/Cypress/resources/app/node_modules/@packages/server/lib/plugins/util.js:33:22)
        at process.emit (node:events:520:28)
        at process.emit (node:domain:475:12)
        at process.emit.sharedData.processEmitHook.installedValue [as emit] (/home/slavic/.cache/Cypress/12.9.0/Cypress/resources/app/node_modules/@cspotcode/source-map-support/source-map-support.js:745:40)
        at emit (node:internal/child_process:938:14)
        at processTicksAndRejections (node:internal/process/task_queues:84:21)

Reason:

Every test execution is expected to have an associated HAR file. When a CypressError is raised har file is not created. Details: NeuraLegion/cypress-har-generator#105, NeuraLegion/cypress-har-generator#59

@vCaisim vCaisim self-assigned this Apr 14, 2023
@vCaisim
Copy link
Contributor Author

vCaisim commented Apr 14, 2023

The specs were not failing because

beforeEach(() => {
  cy.visit('/');
});

was added to the cypress/support/e2e.ts file.

@vCaisim vCaisim added the bug Something isn't working label Apr 14, 2023
@vCaisim vCaisim closed this as completed Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant