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

Error and warning when using init command #442

Open
Hakier opened this issue Nov 29, 2022 · 3 comments
Open

Error and warning when using init command #442

Hakier opened this issue Nov 29, 2022 · 3 comments

Comments

@Hakier
Copy link

Hakier commented Nov 29, 2022

Hello!

Version 1.11.1 was the last version that run init command without warnings and errors.
In this version when called init command it printed to the console only two lines:

[29.11.2022, 16:29:41] - info: Creating file: /projects/learn/cypress-example-kitchensink/browserstack.json
[29.11.2022, 16:29:41] - info: BrowserStack Config File created, you can now run browserstack-cypress --config-file run

Since version 1.11.2 it prints also a Warning:

(node:157652) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)

Since version 1.14.0 it prints also a TypeError:

/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:176
if(typeof bsConfig === 'object' && !utils.isUndefined(bsConfig.run_settings)) {
^

  TypeError: Cannot read properties of null (reading 'run_settings')
  at redactBsConfig (/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:176:66)
  at redactRecordCaps (/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:192:3)
  at Object.send (/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:208:3)
  at exports.sendUsageReport (/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/utils.js:137:18)
  at exports.configCreated (/home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/utils.js:507:8)
  at /home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/bin/helpers/fileHelpers.js:14:11
  at /home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/node_modules/graceful-fs/graceful-fs.js:143:16
  at /home/user/.nvm/versions/node/v18.12.1/lib/node_modules/browserstack-cypress-cli/node_modules/graceful-fs/graceful-fs.js:61:14
  at FSReqCallback.oncomplete (node:fs:197:23)

Tested on node: v12.22.12, v14.17.4, v18.12.1

BTW. Only one line differs in generated config (1.11.1 vs 1.19.1):
image

@sharutkarsh
Copy link

Hi there,

Cypress CLI version 1.19.1 is the newer one, which has all the bug fixes and more stability compared to older versions.

By the way I could not understand your exact issue, I would suggest you to please raise support ticket.

Link- https://www.browserstack.com/contact#technical-support

Thanks

@Hakier
Copy link
Author

Hakier commented Nov 30, 2022

Hi, thanks for the reply but Cypress CLI version 1.19.1 has the same issues (which is the reason I created this thread). Here is an output from browserstack-cypress init:

(node:526071) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
[30.11.2022, 13:00:44] - info: Creating file: /home/user/dev/project/browserstack.json
[30.11.2022, 13:00:44] - info: BrowserStack Config File created, you can now run browserstack-cypress --config-file run
/home/user/.nvm/versions/node/v14.17.4/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:176
if(typeof bsConfig === 'object' && !utils.isUndefined(bsConfig.run_settings)) {
                                                               ^

TypeError: Cannot read property 'run_settings' of null
  at redactBsConfig (/home/user/.nvm/versions/node/v14.17.4/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:176:66)
  at redactRecordCaps (/home/user/.nvm/versions/node/v14.17.4/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:192:3)
  at Object.send (/home/user/.nvm/versions/node/v14.17.4/lib/node_modules/browserstack-cypress-cli/bin/helpers/usageReporting.js:208:3)
  at Object.exports.sendUsageReport (/home/user/.nvm/versions/node/v14.17.4/lib/node_modules/browserstack-cypress-cli/bin/helpers/utils.js:140:18)
  at exports.configCreated (/home/user/.nvm/versions/node/v14.17.4/lib/node_modules/browserstack-cypress-cli/bin/helpers/utils.js:586:8)
  at /home/user/.nvm/versions/node/v14.17.4/lib/node_modules/browserstack-cypress-cli/bin/helpers/fileHelpers.js:14:11
  at /home/user/.nvm/versions/node/v14.17.4/lib/node_modules/browserstack-cypress-cli/node_modules/graceful-fs/graceful-fs.js:143:16
  at /home/user/.nvm/versions/node/v14.17.4/lib/node_modules/browserstack-cypress-cli/node_modules/graceful-fs/graceful-fs.js:61:14
  at FSReqCallback.oncomplete (fs.js:180:23)

@sharutkarsh
Copy link

As suggested please raise a support ticket.

Link- https://www.browserstack.com/contact#technical-support

Thanks

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

No branches or pull requests

2 participants