Skip to content

Error and warning when using init command #442

Description

@Hakier

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

Activity

  1. sharutkarsh commented on Nov 30, 2022

    @sharutkarsh

    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

  2. Hakier commented on Nov 30, 2022

    @Hakier
    Author

    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)
    
  3. sharutkarsh commented on Nov 30, 2022

    @sharutkarsh

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions