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:0308010C:digital envelope routines::unsupported #572

Open
sed-i opened this issue Mar 8, 2022 · 3 comments
Open

error:0308010C:digital envelope routines::unsupported #572

sed-i opened this issue Mar 8, 2022 · 3 comments

Comments

@sed-i
Copy link

sed-i commented Mar 8, 2022

Describe the bug
Script fails to run with node 17.

To Reproduce
Steps to reproduce the behavior:

Try running the example script.

$ npx @flood/element-cli run example.ts
Running example.ts (1 of 1) with
- Element v2.0.4
- Node v17.6.0

● Script Compiler █████████████████████████ compiling (0%)  
 

> Error! An unexpected error occurred!
  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at module.exports (/home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/loader-runner/lib/LoaderRunner.js:221:10) Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:135:10)
    at module.exports (/home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/ubuntu/.npm/_npx/b1911d56a05d7b9b/node_modules/loader-runner/lib/LoaderRunner.js:221:10)

Expected behavior
The example script runs.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.3 LTS
  • Node.js version: v17.6.0
  • Version v2.0.4

Additional context
The same thing works with node 16 and older:

$ sudo snap refresh node --channel=16/stable
node (16/stable) 16.14.0 from OpenJS Foundation (iojs✓) refreshed
$ element run example.ts
Running example.ts (1 of 1) with
- Element v2.0.4
- Node v16.14.0

✔ Script Compiler
  Compiled successfully in 242.70ms

^C⠋ Iteration 1 
    ✓ Step '1. Start' passed (1,000ms)
      Screenshot saved in /home/ubuntu/tmp/element-results/example/2022-03-08T035040.856Z/screenshots/265RQXipbGkrAR9enKw0xPpxYty.jpg
    ⠋ Step '2. Age' is running ...
@mjvdende
Copy link

also fails in node v18 with same issue

@jhkAndelDk
Copy link

I have the same issue exactly.
`PS C:\Repos\B2C.SelfService.FloodTests\src\B2C.SelfService.FloodTests> element run ./B2CSelfServiceFloodTests.perf.ts --no-headless
Running ./B2CSelfServiceFloodTests.perf.ts (1 of 1) with

  • Element v2.0.4
  • Node v19.8.1
  • Script Compiler █████████████████████████ compiling (0%)

Error! An unexpected error occurred!
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:140:10)
at module.exports (C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at iterateNormalLoaders (C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\loader-runner\lib\LoaderRunner.js:221:10) Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:140:10)
at module.exports (C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at iterateNormalLoaders (C:\Users\jhk\AppData\Roaming\npm\node_modules\element-cli\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
this is a bug, please report it here https://github.com/flood-io/element/issues/new?template=bug_report.md`

@sed-i
Copy link
Author

sed-i commented Mar 30, 2023

Yep. My workaround for Ubuntu 22.04 is

apt remove -y nodejs npm --auto-remove
snap install --classic node --channel=16/stable
npm i -g element-cli@2.0.4
sudo -u ubuntu npx -y playwright@1.27.1 install-deps
sudo -u ubuntu npx -y playwright@1.27.1 install

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

3 participants