MrLemur / bottle-radio

Radio in a bottle. All in one solution for your own radio station.
MIT License
60 stars 10 forks source link

Docker-Compose up fails with: Error: error:0308010C:digital envelope routines::unsupported #35

Closed gorfreed closed 2 years ago

gorfreed commented 2 years ago

Hello!

Bottle Radio is exactly what I have been looking for after going down the same road with Azuracast than you did - I really appreciate your description :) Unfortunately it took me over a year to find this repo, and it seems there are some issues I am unable to solve. They are all related to the installation of the components used failing. I am not a developer but I am running my fair share of docker-deployed services, so I assume this compose script requires a little more knowledge than described in your installation guide. Or it is simply outdated.

This has been verified on three of my VPS (2x 20.04, 1x 18. 04). By just following your install instructions, docker-compose up fails with:

Building frontend
Step 1/16 : FROM node:alpine as builder
alpine: Pulling from library/node
97518928ae5f: Already exists
4796d9078153: Pull complete
c3cb450ea517: Pull complete
dc9de54e9683: Pull complete
Digest: sha256:e64dc950217610c86f29aef803b123e1b6a4a372d6fa4bcf71f9ddcbd39eba5c
Status: Downloaded newer image for node:alpine
 ---> bb1fcdaff936
Step 2/16 : WORKDIR /app
 ---> Running in adc96fe3d4b2
Removing intermediate container adc96fe3d4b2
 ---> 8a31341c92ff
Step 3/16 : COPY package.json .
 ---> 314398f99893
Step 4/16 : COPY yarn.lock .
 ---> 563f211c8248
Step 5/16 : RUN yarn
 ---> Running in cdeb18573813
yarn install v1.22.15
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@emotion/styled > @emotion/babel-plugin@11.3.0" has unmet peer dependency "@babel/core@^7.0.0".
warning "@emotion/styled > @emotion/babel-plugin > @babel/plugin-syntax-jsx@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > @testing-library/user-event@13.1.9" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
Done in 70.39s.
Removing intermediate container cdeb18573813
 ---> 86cd90de1149
Step 6/16 : COPY . .
 ---> d7f65d513081
Step 7/16 : RUN yarn build
 ---> Running in 3ad84968c56f
yarn run v1.22.15
$ react-scripts build
Creating an optimized production build...
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (/app/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/app/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/app/node_modules/webpack/lib/NormalModule.js:471:10)
    at /app/node_modules/webpack/lib/NormalModule.js:503:5
    at /app/node_modules/webpack/lib/NormalModule.js:358:12
    at /app/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /app/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at runSyncOrAsync (/app/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
    at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/app/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
/app/node_modules/react-scripts/scripts/build.js:19
  throw err;
  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (/app/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/app/node_modules/webpack/lib/NormalModule.js:417:16)
    at /app/node_modules/webpack/lib/NormalModule.js:452:10
    at /app/node_modules/webpack/lib/NormalModule.js:323:13
    at /app/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /app/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/app/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /app/node_modules/react-scripts/node_modules/babel-loader/lib/index.js:59:103 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v17.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: Service 'frontend' failed to build: The command '/bin/sh -c yarn build' returned a non-zero code: 1

I have researched this error and it seems to be quite common when compiling nodejs projects (https://github.com/webpack/webpack/issues/14532). So I tried putting the "--openssl-legacy-provider" into the package.json react script build reference, and it actually worked - only to be stopped when installing Mopidy:


`Step 4/18 : RUN apt-get update     && apt-get install -y     dumb-init     graphviz-dev     gstreamer1.0-plugins-bad     gstreamer1.0-plugins-good     gstreamer1.0-plugins-ugly     gstreamer1.0-pulseaudio     libasound2-dev     python-dev     python-gst-1.0     python3-gst-1.0     && rm -rf /var/lib/apt/lists/*
 ---> Running in 3d184dc0d078
Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Reading package lists...
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://deb.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
ERROR: Service 'mopidy' failed to build: The command '/bin/sh -c apt-get update     && apt-get install -y     dumb-init     graphviz-dev     gstreamer1.0-plugins-bad     gstreamer1.0-plugins-good     gstreamer1.0-plugins-ugly     gstreamer1.0-pulseaudio     libasound2-dev     python-dev     python-gst-1.0     python3-gst-1.0     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
`

So yeah, it seems to be pretty broken atm. Or I am missing something. Please help me out!

MrLemur commented 2 years ago

Thanks for bringing this to my attention. There a few updates required for all containers which I should have uploaded this week.

gorfreed commented 2 years ago

I don't fully want to rule out my incompetence though, but when following the install instructions strictly, the above described result will occur. Looking forward to the update!

gorfreed commented 2 years ago

Still no update. Shoot, I guess I was too late for this one. It would have been the perfect solution... If anyone reads this and knows an alternative, please let me know!

MrLemur commented 2 years ago

Hi @gorfreed! Sorry I've been a bit sidetracked with the log4j vulnerabilty that came out. Can you try the major-fixes branch. Everything should run, expect I'm still trying to fix an issue where the track data is not displayed on the web radio player.

MrLemur commented 2 years ago

This has now been merged to the main branch. Liquidsoap is pinned to v1.4.4 while I figure out why the metadata doesn't work on v2.0.0.