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

CI builds are failing due to ERR_OSSL_EVP_UNSUPPORTED. #6502

Closed
adunkman opened this issue Jun 28, 2022 · 2 comments
Closed

CI builds are failing due to ERR_OSSL_EVP_UNSUPPORTED. #6502

adunkman opened this issue Jun 28, 2022 · 2 comments
Labels
type: bug code to address defects in shipped code

Comments

@adunkman
Copy link

Describe the bug
There is an issue with hashing algorithms in Webpack 4 and Node versions 17 and above, due to Node’s migration to OpenSSL3. It’s documented at webpack/webpack#14532 — and all recent builds on this repo are failing due to the issue.

Builds fail with:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/home/runner/work/netlify-cms/netlify-cms/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/runner/work/netlify-cms/netlify-cms/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/runner/work/netlify-cms/netlify-cms/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/runner/work/netlify-cms/netlify-cms/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/runner/work/netlify-cms/netlify-cms/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/runner/work/netlify-cms/netlify-cms/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/runner/work/netlify-cms/netlify-cms/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/runner/work/netlify-cms/netlify-cms/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /home/runner/work/netlify-cms/netlify-cms/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/home/runner/work/netlify-cms/netlify-cms/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /home/runner/work/netlify-cms/netlify-cms/node_modules/babel-loader/lib/index.js:59:71 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Example pull requests which have failed with this error:

To Reproduce

  1. Make a change (the changeset is not relevant)
  2. Open a pull request
  3. Observe build failure

Applicable Versions:

  • webpack@4
  • nodejs@17 and above
@adunkman adunkman added the type: bug code to address defects in shipped code label Jun 28, 2022
@adunkman
Copy link
Author

The issue above suggests the possible paths forward:

  1. Remain on webpack@4, but supply --openssl-legacy-provider to nodejs:

    export NODE_OPTIONS=--openssl-legacy-provider
  2. Upgrade to webpack@5.

@martinjagodic
Copy link
Member

This is fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants