Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
12.84k stars 1.47k forks source link

Latest docker build for 6.0.4 is broken #6325

Closed lonesomewalker closed 2 months ago

lonesomewalker commented 4 months ago

Describe the current behavior

This is somewhat not understandable for me, because i got this running in 6.0.3. #6317 was annoying but not the case here.

When installing the official transcription plugin, either by cli or webinterface, the following errors occur:

[some.domain.tld:443] 2024-04-11 21:09:41.633 error: Cannot install plugin peertube-plugin-akismet, removing it... {
  "err": {
    "err": {
      "stack": "Error: Command failed: yarn add peertube-plugin-akismet@0.1.1\nwarning package.json: No license field\nwarning No license field\nerror /data/plugins/node_modules/ffi-napi: Command failed.\nExit code: 1\nCommand: node-gyp-build\nArguments: \nDirectory: /data/plugins/node_modules/ffi-napi\nOutput:\ngyp info it worked if it ends with ok\ngyp info using node-gyp@10.0.1\ngyp info using node@18.20.1 | linux | x64\ngyp info find Python using Python version 3.11.2 found at \"/usr/bin/python3\"\n\ngyp http GET https://nodejs.org/download/release/v18.20.1/node-v18.20.1-headers.tar.gz\ngyp http 200 https://nodejs.org/download/release/v18.20.1/node-v18.20.1-headers.tar.gz\ngyp http GET https://nodejs.org/download/release/v18.20.1/SHASUMS256.txt\ngyp http 200 https://nodejs.org/download/release/v18.20.1/SHASUMS256.txt\ngyp info spawn /usr/bin/python3\ngyp info spawn args [\ngyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',\ngyp info spawn args 'binding.gyp',\ngyp info spawn args '-f',\ngyp info spawn args 'make',\ngyp info spawn args '-I',\ngyp info spawn args '/data/plugins/node_modules/ffi-napi/build/config.gypi',\ngyp info spawn args '-I',\ngyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',\ngyp info spawn args '-I',\ngyp info spawn args '/home/peertube/.cache/node-gyp/18.20.1/include/node/common.gypi',\ngyp info spawn args '-Dlibrary=shared_library',\ngyp info spawn args '-Dvisibility=default',\ngyp info spawn args '-Dnode_root_dir=/home/peertube/.cache/node-gyp/18.20.1',\ngyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',\ngyp info spawn args '-Dnode_lib_file=/home/peertube/.cache/node-gyp/18.20.1/<(target_arch)/node.lib',\ngyp info spawn args '-Dmodule_root_dir=/data/plugins/node_modules/ffi-napi',\ngyp info spawn args '-Dnode_engine=v8',\ngyp info spawn args '--depth=.',\ngyp info spawn args '--no-parallel',\ngyp info spawn args '--generator-output',\ngyp info spawn args 'build',\ngyp info spawn args '-Goutput_dir=.'\ngyp info spawn args ]\ngyp info spawn make\ngyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]\nmake: Entering directory '/data/plugins/node_modules/ffi-napi/build'\n  CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o\nrm -f Release/obj.target/../node-addon-api/nothing.a Release/obj.target/../node-addon-api/nothing.a.ar-file-list; mkdir -p `dirname Release/obj.target/../node-addon-api/nothing.a`\nar crs Release/obj.target/../node-addon-api/nothing.a @Release/obj.target/../node-addon-api/nothing.a.ar-file-list\n  COPY Release/nothing.a\n  CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o\n  CC(target) Release/obj.target/ffi/deps/libffi/src/types.o\n  CC(target) Release/obj.target/ffi/deps/libffi/src/raw_api.o\n  CC(target) Release/obj.target/ffi/deps/libffi/src/java_raw_api.o\n../deps/libffi/src/java_raw_api.c: In function 'ffi_java_raw_call':\n../deps/libffi/src/java_raw_api.c:317:3: warning: 'ffi_java_raw_to_ptrarray' is deprecated [-Wdeprecated-declarations]\n  317 |   ffi_java_raw_to_ptrarray (cif, raw, avalue);\n      |   

(sorry, can't post the whole log)

And related to #6324 this is NOT related to an unsupported plugin, because akismet is "officially supported". So, i think, either the docker image has some weird changes or after the "docker compose pull" for the update something is missing.

Thank you.

Steps to reproduce

  1. docker compose exec -u peertube peertube npm run plugin:install -- --npm-name peertube-plugin-akismet
  2. docker compose down -v
  3. docker compose up -d

Describe the expected behavior

After the installation no errors should be shown :-) Also configuration options should be available.

Additional information

lonesomewalker commented 4 months ago

Difference: v6.0.2 works flawlessly. npm notice New minor version of npm available! 10.2.3 -> 10.5.2 v6.0.4 is not.

Chocobozzz commented 4 months ago

Hi,

Can you list installed plugins on your instance?

lonesomewalker commented 4 months ago

From the beginning: 0 installed :-( I mean i really did a fresh setup. Version 6.0.2 installed smoothly, after finishing setup going to plugins -> working

Having a fresh 6.0.4 -> installation is either denied or shown as done but then the settings are missing.

Chocobozzz commented 3 months ago

Can you run and paste the output of the following commands?

lonesomewalker commented 3 months ago

Hi :-)

Can you run and paste the output of the following commands?

Sure, in the current 6.0.2 i get:

  • docker compose exec -u peertube peertube cat /data/plugins/package.json
{
  "dependencies": {
    "peertube-plugin-bittube-logo-favicon": "1.0.5",
    "peertube-plugin-categories": "1.2.7",
    "peertube-plugin-transcription": "1.9.0",
    "peertube-theme-rankett": "0.0.3"
  }
}
  • docker compose exec -u peertube peertube ls /data/plugins/
data  node_modules  package.json  yarn-error.log  yarn.lock
  • docker compose exec -u peertube peertube ls /data/plugins/node_modules
@colors                  bytes            fn.name                            listenercount     peertube-plugin-bittube-logo-favicon  string_decoder
@dabh                    chainsaw         form-data                          logform           peertube-plugin-categories            strip-bom
@types                   color            fs-extra                           mic               peertube-plugin-transcription         subtitle
async                    color-convert    fs.realpath                        mime-db           peertube-theme-rankett                text-hex
asynckit                 color-name       fstream                            mime-types        process-nextick-args                  traverse
balanced-match           color-string     get-symbol-from-current-process-h  minimatch         readable-stream                       triple-beam
big-integer              colorspace       get-uv-event-loop-napi-h           minimist          ref-napi                              undici-types
binary                   combined-stream  glob                               mkdirp            ref-struct-di                         universalify
bluebird                 concat-map       graceful-fs                        ms                rimraf                                unzipper
brace-expansion          core-util-is     inflight                           multipipe         safe-buffer                           util-deprecate
buffer-alloc             debug            inherits                           node-addon-api    safe-stable-stringify                 vosk
buffer-alloc-unsafe      delayed-stream   is-arrayish                        node-gyp-build    setimmediate                          wav
buffer-fill              duplexer2        is-stream                          object-assign     simple-swizzle                        winston
buffer-from              enabled          isarray                            once              split2                                winston-transport
buffer-indexof-polyfill  fecha            jsonfile                           one-time          stack-trace                           wrappy
buffers                  ffi-napi         kuler                              path-is-absolute  stream-parser

But i did this in a clean 6.0.4 docker, and there i can't install this.

So, you need the output from a 6.0.4?

Chocobozzz commented 3 months ago

Even if you use a fresh container, you mount your local docker-volume/data directory. It contains the plugins directory with previously installed plugins. So try to run:

docker compose exec -u peertube peertube npm run plugin:uninstall -- --npm-name peertube-plugin-transcription