Testcafe: crypto.randomFillSync is not a function

Created on 27 Sep 2018  路  3Comments  路  Source: DevExpress/testcafe

Are you requesting a feature or reporting a bug?

Yes

What is the current behavior?

TypeError: crypto.randomFillSync is not a function
at module.exports (/var/lib/jenkins/jobs/automated-test/workspace/node_modules/nanoid/random.js:5:10)
at module.exports (/var/lib/jenkins/jobs/automated-test/workspace/node_modules/nanoid/index.js:24:15)
at new Role (/var/lib/jenkins/jobs/automated-test/workspace/node_modules/testcafe/src/role/index.js:19:22)
at createRole (/var/lib/jenkins/jobs/automated-test/workspace/node_modules/testcafe/src/role/index.js:85:12)
at Role (/var/lib/jenkins/jobs/automated-test/workspace/node_modules/testcafe/src/api/exportable-lib/index.js:10:12)
at Object. (/var/lib/jenkins/jobs/automated-test/workspace/src/Users.js:6:12)
at Object._compile [as .js] (/var/lib/jenkins/jobs/automated-test/workspace/node_modules/testcafe/src/compiler/test-file/api-based.js:84:25)
at Object. (/var/lib/jenkins/jobs/automated-test/workspace/src/authentication.js:2:1)
at Function._compile [as _execAsModule] (/var/lib/jenkins/jobs/automated-test/workspace/node_modules/testcafe/src/compiler/test-file/api-based.js:50:13)
at ESNextTestFileCompiler._execAsModule [as compile] (/var/lib/jenkins/jobs/automated-test/workspace/node_modules/testcafe/src/compiler/test-file/api-based.js:144:42)

What is the expected behavior?

Testcafe working with browserstack

How would you reproduce the current behavior (if this is a bug)?

Provide the test code and the tested page URL (if applicable)

Tested page URL:

Test code


Specify your

  • operating system: os
  • testcafe version: v0.22.0
  • node.js version: v10.10.0
server Auto-locked bug

Most helpful comment

@Turkirafaa, please check the Node.js version on your Jenkins machine. I guess it's lesser than 7.10.0 - the version that introduced the crypto.randomFillSync function. By the way, it's a breaking change in the nanoid package,

All 3 comments

@Turkirafaa, please check the Node.js version on your Jenkins machine. I guess it's lesser than 7.10.0 - the version that introduced the crypto.randomFillSync function. By the way, it's a breaking change in the nanoid package,

@AndreyBelym Thank you so much for you'r quick response we update the Node.js version to v8.12.0
and it's working now.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them on StackOverflow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Lukas-Kullmann picture Lukas-Kullmann  路  3Comments

Lukas-Kullmann picture Lukas-Kullmann  路  3Comments

devmondo picture devmondo  路  3Comments

devmondo picture devmondo  路  3Comments

madroneropaulo picture madroneropaulo  路  3Comments