AgoraIO / Tools

383 stars 828 forks source link

Error: error:0308010C:digital envelope routines::unsupported #360

Closed neilyoung closed 6 months ago

neilyoung commented 6 months ago

Running the Agora-WebRTC-Troubleshooting on MacOS, Sonoma, M1. AppID configured.

npm install fine.

npm run dev gives this:

npm run dev

> agora-webrtc-precall-test@0.2.0 dev
> vue-cli-service serve

 INFO  Starting development server...
10% building 2/2 modules 0 active(node:9689) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at module.exports (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at runSyncOrAsync (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
    at iterateNormalLoaders (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
10% building 2/5 modules 3 active ...cuments/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/webpack/hot/dev-server.jsnode:internal/crypto/hash:68
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at module.exports (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.8.1

What am I missing?

plutoless commented 6 months ago

please refer to this for solutions, https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

neilyoung commented 6 months ago

Right when you say this, I found the same link...

neilyoung commented 6 months ago

After npm audit fix --force:

 ERROR  TypeError: transpileDependencies.map is not a function
TypeError: transpileDependencies.map is not a function
    at genTranspileDepRegex (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/@vue/cli-plugin-babel/index.js:5:38)
    at module.exports (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/@vue/cli-plugin-babel/index.js:21:29)
    at /Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/@vue/cli-service/lib/Service.js:82:9
    at Array.forEach (<anonymous>)
    at loadedCallback (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/@vue/cli-service/lib/Service.js:80:20)
    at Service.init (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/@vue/cli-service/lib/Service.js:97:14)
    at Service.run (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/@vue/cli-service/lib/Service.js:247:16)
    at Object.<anonymous> (/Users/me/Documents/tmp/vue-webrtc/Tools/TroubleShooting/Agora-WebRTC-Troubleshooting/node_modules/@vue/cli-service/bin/vue-cli-service.js:37:9)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
plutoless commented 6 months ago

i think this is simply too old version.. we will try to take a look to see if we can fix it. Before that, i would suggest you to downgrade your nodejs version.

neilyoung commented 6 months ago

I'm not focused on this app, I was just looking for an Agora WebRTC sample for Vue JS

plutoless commented 6 months ago

@neilyoung in this case, pls take a look at this instead, https://github.com/agoraio/api-examples-web

neilyoung commented 6 months ago

OK, thank you.