Skip to content

OpenSSL 3 breaks webpack build #22305

@rillian

Description

@rillian

Description

After upgrading my dev system to openssl 3.0, the build fails at npm run web-ui

(node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

This is apparently because webpack uses the obsolete md4 hash by default, which is no longer available.

Steps to Reproduce

  1. Build brave on Fedora 36. Ubuntu 22.04 should also show the problem.

Actual result:

Build fails

Expected result:

Build should succeed.

Reproduces how often:

I tried various node packages; the issue seems to be the system crypto library.

Desktop Brave version:

This is building 1.39.x nightly.

Miscellaneous Information:

Work around is to not update for now. Setting NODE_OPTIONS=--openssl-legacy-provider in the environment may also work around with node 17 or later.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions