The plugin does nothing

Summary

  • plugin version: 1.7.3
  • PeerTube version: 4.2.2

What is the current bug behavior?

Installing the plugin through the admin interface has an error and message in the logs:

изображение

At the same time, it is listed as successfully installed in the list of installed plugins, but does not have any settings on the appropriate button:

изображение

Updating an existing video to invoke the plugin does nothing.

Installation through the command line always seems to succeed, but the effects are the same (error in the logs, lack of settings, failure to work after editing video).

/v/w/p/peertube-latest# NODE_ENV=production NODE_CONFIG_DIR=/var/www/peertube/config yarn plugin:install -n peertube-plugin-transcription
yarn run v1.22.18
$ node ./dist/scripts/plugin/install.js -n peertube-plugin-transcription
[video.toby3d.me:443] 2022-07-05 18:07:20.395 info: Installing plugin peertube-plugin-transcription.
[video.toby3d.me:443] 2022-07-05 18:07:39.551 info: Successful installation of plugin peertube-plugin-transcription.
[video.toby3d.me:443] 2022-07-05 18:07:39.552 info: Registering plugin or theme peertube-plugin-transcription.
[video.toby3d.me:443 peertube-plugin-transcription] 2022-07-05 18:07:40.024 info: Fetching Vosk models from https://alphacephei.com/vosk/models/model-list.json...
[video.toby3d.me:443 peertube-plugin-transcription] 2022-07-05 18:07:40.371 info: Found 0 valid models for languages: .
[video.toby3d.me:443 peertube-plugin-transcription] 2022-07-05 18:07:40.452 info: Worker n°1 is up!
[video.toby3d.me:443] 2022-07-05 18:07:40.920 info: Add plugin peertube-plugin-transcription CSS to global file.
[video.toby3d.me:443] 2022-07-05 18:07:41.015 info: Added locale fr-FR of plugin peertube-plugin-transcription.
[video.toby3d.me:443] 2022-07-05 18:07:41.018 info: Added locale en-US of plugin peertube-plugin-transcription.
[video.toby3d.me:443] 2022-07-05 18:07:41.026 info: Cleaning HTML cache.
Done in 24.50s.

What is the expected correct behavior?

Installation without errors, the availability of plugin settings and video processing after editing it.

Relevant logs and/or screenshots

cat /var/www/peertube/storage/logs/peertube.log | grep peertube-plugin-transcription:

{"level":"warn","message":"Cannot install plugin peertube-plugin-transcription.","label":"video.toby3d.me:443","err":{"err":{"stack":"Error: Command failed: yarn add peertube-plugin-transcription@1.5.8\nwarning package.json: No license field\nwarning No license field\nerror peertube-plugin-transcription@1.5.8: The engine \"node\" is incompatible with this module. Expected version \">=15.0.0\". Got \"14.18.3\"\nerror Found incompatible module.\n\n    at ChildProcess.exithandler (child_process.js:383:12)\n    at ChildProcess.emit (events.js:400:28)\n    at ChildProcess.emit (domain.js:475:12)\n    at maybeClose (internal/child_process.js:1058:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)","message":"Command failed: yarn add peertube-plugin-transcription@1.5.8\nwarning package.json: No license field\nwarning No license field\nerror peertube-plugin-transcription@1.5.8: The engine \"node\" is incompatible with this module. Expected version \">=15.0.0\". Got \"14.18.3\"\nerror Found incompatible module.\n","killed":false,"code":1,"signal":null,"cmd":"yarn add peertube-plugin-transcription@1.5.8"},"stdout":"yarn add v1.22.10\n[1/4] Resolving packages...\n[2/4] Fetching packages...\ninfo Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.\n","stderr":"warning package.json: No license field\nwarning No license field\nerror peertube-plugin-transcription@1.5.8: The engine \"node\" is incompatible with this module. Expected version \">=15.0.0\". Got \"14.18.3\"\nerror Found incompatible module.\n"},"timestamp":"2022-01-17T21:46:27.781Z"}

The log reports that I have the wrong version of the node, but:

# node -v 
v17.9.1
# nvm current
v17.9.1

If use the format of the plugin installation command from the PeerTube documentation, not the plugin README:

# sudo -u peertube NODE_ENV=production NODE_CONFIG_DIR=/var/www/peertube/config npm run plugin:install -- --npm-name peertube-plugin-transcription

> peertube@4.2.2 plugin:install
> node ./dist/scripts/plugin/install.js "--npm-name" "peertube-plugin-transcription"

[video.toby3d.me:443] 2022-07-05 19:27:57.437 info: Installing plugin peertube-plugin-transcription.
[video.toby3d.me:443] 2022-07-05 19:28:15.949 info: Successful installation of plugin peertube-plugin-transcription.
[video.toby3d.me:443] 2022-07-05 19:28:15.950 info: Registering plugin or theme peertube-plugin-transcription.
[video.toby3d.me:443 peertube-plugin-transcription] 2022-07-05 19:28:16.155 info: Fetching Vosk models from https://alphacephei.com/vosk/models/model-list.json...
[video.toby3d.me:443 peertube-plugin-transcription] 2022-07-05 19:28:16.490 info: Found 0 valid models for languages: .
[video.toby3d.me:443 peertube-plugin-transcription] 2022-07-05 19:28:16.568 info: Worker n°1 is up!
[video.toby3d.me:443] 2022-07-05 19:28:17.058 info: Add plugin peertube-plugin-transcription CSS to global file.
[video.toby3d.me:443] 2022-07-05 19:28:17.160 info: Added locale fr-FR of plugin peertube-plugin-transcription.
[video.toby3d.me:443] 2022-07-05 19:28:17.175 info: Added locale en-US of plugin peertube-plugin-transcription.
[video.toby3d.me:443] 2022-07-05 19:28:17.182 info: Cleaning HTML cache.
error[05.07.2022, 21:27:29] Cannot install plugin peertube-plugin-transcription, removing it...

{
  "err": {
    "err": {
      "stack": "Error: Command failed: yarn add peertube-plugin-transcription@1.7.3\nwarning package.json: No license field\nwarning No license field\nerror An unexpected error occurred: \"EACCES: permission denied, unlink '/var/www/peertube/storage/plugins/node_modules/@colors/colors/LICENSE'\".\n\n    at ChildProcess.exithandler (node:child_process:398:12)\n    at ChildProcess.emit (node:events:527:28)\n    at ChildProcess.emit (node:domain:475:12)\n    at maybeClose (node:internal/child_process:1090:16)\n    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)",
      "message": "Command failed: yarn add peertube-plugin-transcription@1.7.3\nwarning package.json: No license field\nwarning No license field\nerror An unexpected error occurred: \"EACCES: permission denied, unlink '/var/www/peertube/storage/plugins/node_modules/@colors/colors/LICENSE'\".\n",
      "code": 1,
      "killed": false,
      "signal": null,
      "cmd": "yarn add peertube-plugin-transcription@1.7.3"
    },
    "stdout": "yarn add v1.22.19\n[1/4] Resolving packages...\n[2/4] Fetching packages...\n[3/4] Linking dependencies...\ninfo If you think this is a bug, please open a bug report with the information provided in \"/var/www/peertube/storage/plugins/yarn-error.log\".\ninfo Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.\n",
    "stderr": "warning package.json: No license field\nwarning No license field\nerror An unexpected error occurred: \"EACCES: permission denied, unlink '/var/www/peertube/storage/plugins/node_modules/@colors/colors/LICENSE'\".\n"
  }
}

Possible fixes

I don't have the JS and Node skills to suggest possible solutions.

Edited by Maxim Lebedev