question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expected to find global registry error on test case init

See original GitHub issue

Hi,

I recently updated our framework to use cypress 10.x, and typescript. Also changed to the latest cypress-cucumber-preprocessor from you, and I thank you for that for updating this package. Yesterday it was working perfectly. Today I did an npm update and it broke all of it. I was wondering why, and it pointed me to this package, where the error message said that I should report this as a bug, so I am doing that rn. 😃

I cannot give you an example repo unfortunately due to capacity, however maybe you can point out what is its problem with my package json after npm update, or maybe there is a bug you can see from that either way.

Thank you, you are awesome!

image

at fail ([node_modules/@badeball/cypress-cucumber-preprocessor/lib/assertions.js:7:1](https://kontrol-dev.kasa.com/__/#))
    at assert ([node_modules/@badeball/cypress-cucumber-preprocessor/lib/assertions.js:14:1](https://kontrol-dev.kasa.com/__/#))
    at assertAndReturn ([node_modules/@badeball/cypress-cucumber-preprocessor/lib/assertions.js:18:1](https://kontrol-dev.kasa.com/__/#))
    at getRegistry ([node_modules/@badeball/cypress-cucumber-preprocessor/lib/registry.js:137:1](https://kontrol-dev.kasa.com/__/#))
    at defineBefore ([node_modules/@badeball/cypress-cucumber-preprocessor/lib/methods.js:32:1](https://kontrol-dev.kasa.com/__/#))
    at 1.../../support/helpers/auth0-api ([e2e/stepDefinitions/e2e.ts:38:8](https://kontrol-dev.kasa.com/__/#))
    at o ([node_modules/browser-pack/_prelude.js:1:1](https://kontrol-dev.kasa.com/__/#))
    at eval ([node_modules/browser-pack/_prelude.js:1:1](https://kontrol-dev.kasa.com/__/#))
    at 225.../../e2e/stepDefinitions/e2e ([support/helpers/kontrol-api.ts:1:1](https://kontrol-dev.kasa.com/__/#))
    at o ([node_modules/browser-pack/_prelude.js:1:1](https://kontrol-dev.kasa.com/__/#))
From previous event:
    at runScriptsFromUrls (https://kontrol-dev.kasa.com/__cypress/runner/cypress_runner.js:175359:137)
    at Object.runScripts (https://kontrol-dev.kasa.com/__cypress/runner/cypress_runner.js:175374:13)
    at $Cypress.onSpecWindow (https://kontrol-dev.kasa.com/__cypress/runner/cypress_runner.js:163545:76)

Dependencies we use:

"devDependencies": {
    "@bahmutov/cypress-extends": "^1.1.0",
    "@cypress/browserify-preprocessor": "^3.0.2",
    "@percy/cli": "^1.0.0-beta.52",
    "@percy/cypress": "^3.1.0",
    "@typescript-eslint/parser": "^5.33.0",
    "cypress-iframe": "^1.0.1",
    "cypress-plugin-stripe-elements": "^1.0.1",
    "cypress-slack-reporter": "^1.2.1",
    "cypress-social-logins": "^1.11.2",
    "cypress-terminal-report": "^4.1.2",
    "docolatte": "^2.10.2",
    "eslint": "^8.10.0",
    "mochawesome": "^7.1.3",
    "mochawesome-merge": "^4.2.1",
    "mochawesome-report-generator": "^6.2.0",
    "path": "^0.12.7",
    "resolve": "^1.22.1",
    "stream": "^0.0.2"
  },
  "dependencies": {
    "@badeball/cypress-cucumber-preprocessor": "^12.0.1",
    "@cucumber/cucumber": "^7.0.0",
    "@cypress/webpack-preprocessor": "^5.12.1",
    "@privateRepo1": "^9.18.0",
    "@privateRepo2": "0.1.1",
    "@privateRepo3": "^2.43.0",
    "@typescript-eslint/eslint-plugin": "^5.33.0",
    "aws-sdk": "^2.932.0",
    "axios": "^0.27.2",
    "clean-jsdoc-theme": "^3.3.1",
    "commander": "^7.2.0",
    "cypress": "^10.6.0",
    "cypress-commands": "^1.1.0",
    "cypress-real-events": "^1.7.1",
    "cypress-waitfor": "^1.1.0",
    "dayjs": "^1.10.4",
    "express": "^4.18.1",
    "jira-client-xray": "^1.0.1",
    "jsdoc-cypress-cucumber-plugin": "^1.1.0",
    "lodash": "^4.17.21",
    "luxon": "^1.26.0",
    "mocha": "^10.0.0",
    "mongodb": "^4.7.0",
    "namecase": "^1.1.2",
    "prettier": "^2.5.1",
    "prettier-eslint": "^13.0.0",
    "ts-loader": "^9.3.1"
  },

Current behavior

After using npm update and updating my packages, this error message comes up after loading a test case.

Desired behavior

Works as expected

Versions

  • Cypress version: 10.6.0
  • Preprocessor version: 4.2.0
  • Node version: 17.6.0

Checklist

  • I’ve read the FAQ.
  • I’ve read Instructions for logging issues.
  • I’m not using cypress-cucumber-preprocessor@4.3.1 (package name has changed and it is no longer the most recent version, see #689).

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
badeballcommented, Aug 17, 2022

See my comment above.

0reactions
richardszanyi-kasacommented, Aug 18, 2022

A better error message would suffice here then. That makes sense, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 2 Unit Tests: Cannot find name 'describe'
Unit Tests work like a charm. The problem is: I see some errors, which are mentioned in tutorial: Our editor and the compiler...
Read more >
Not able to run terraform init command · Issue #21876 - GitHub
Hi, I am trying to run the terraform init command, but it fails with the below error ... Error: registry service is unreachable,...
Read more >
Error Messages | Cypress Documentation
This message means that Cypress was unable to find tests in the specified file. You'll likely get this message if you have an...
Read more >
Using the Testify Go module for Unit Tests in Golang - JFrog
Learn about using Testify to write unit tests in Golang that are easy to read and maintain. We'll show some best practices for...
Read more >
Windows Installer Error Messages (for Developers)
Message codes, message text, and remarks for Windows Installer error messages. Errors include ship errors, internal errors, and errors ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found