Etherpad_mypads broken after trying to install ep_table_of_contents

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 11.2.30.2
What app is this about: etherpad_mypads

Describe your issue

Hello everybody,

I broke my etherpad_mypads trying to install ep_table_of_contents. I made full of mistakes, playing with npm and made the problem worst.
I reinstalled every plugin with the right version (npm install --no-save ep_author_hover@0.3.37) but node.js is not in the right version ($ node --version
v18.20.4).

I need to restore existing pads. What can I do ?
Can I just reinstall node.js and plugins ? And how ?
Can I save database with PHPmyadmin, reinstall etherpad_mypads and restore the database ? Are the pads in this Mariadb database ?

Thanks for any help.

lmds

Share relevant logs or error messages

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:979:32)
    at Function.Module._load (internal/modules/cjs/loader.js:819:12)
    at Module.require (internal/modules/cjs/loader.js:1003:19)
    at require (internal/modules/cjs/helpers.js:107:18)
    at Object.<anonymous> (/var/www/etherpad_mypads/src/node/db/DB.js:24:17)
    at Module._compile (internal/modules/cjs/loader.js:1114:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
e[32m[2024-09-29 14:49:36.217] [INFO] settings - e[39mAll relative paths will be interpreted relative to the identified Etherpad base dir: /var/www/etherpad_mypads
e[32m[2024-09-29 14:49:36.252] [INFO] settings - e[39msettings loaded from: /var/www/etherpad_mypads/settings.json
e[32m[2024-09-29 14:49:36.254] [INFO] settings - e[39mcredentials loaded from: /var/www/etherpad_mypads/credentials.json
e[32m[2024-09-29 14:49:36.256] [INFO] settings - e[39mUsing skin "colibris" in dir: /var/www/etherpad_mypads/src/static/skins/colibris
e[32m[2024-09-29 14:49:36.261] [INFO] settings - e[39mSession key loaded from: /var/www/etherpad_mypads/SESSIONKEY.txt
e[32m[2024-09-29 14:49:36.261] [INFO] settings - e[39mRandom string used for versioning assets: 0ca04a3d
/var/www/etherpad_mypads/src/node_modules/ueberdb2/dist/index.js:83920
	      this.cookies ??= [];
	                   ^^^

etherpad_mypads was not broken installing ep_table_of_contents. This plugin just not install.
It was broken updating ep_align with etherpad admin interface. I made things worse using npm…

[2024-09-16 12:48:25.086] [INFO] plugins - ^[[39mInstalling plugin ep_table_of_contents...
[2024-09-16 12:49:01.804] [ERROR] runCmd|npm - ^[[39mnpm WARN notsup Unsupported engine for ep_table_of_contents@0.3.86: wanted: {"node":">=18.0.0"} (current: {$
[2024-09-16 12:49:01.804] [ERROR] runCmd|npm - ^[[39mnpm WARN notsup Not compatible with your version of node/npm: ep_table_of_contents@0.3.86
[2024-09-16 12:49:01.807] [ERROR] runCmd|npm - ^[[39mnpm WARN enoent ENOENT: no such file or directory, open '/var/www/etherpad_mypads/package.json'
[2024-09-16 12:49:01.836] [ERROR] runCmd|npm - ^[[39mnpm WARN eslint-plugin-import@2.27.5 requires a peer of eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 b$
[2024-09-16 12:49:01.853] [ERROR] runCmd|npm - ^[[39mnpm WARN etherpad_mypads No description
[2024-09-16 12:49:01.871] [ERROR] runCmd|npm - ^[[39mnpm WARN etherpad_mypads No repository field.
[2024-09-16 12:49:01.889] [ERROR] runCmd|npm - ^[[39mnpm WARN etherpad_mypads No README data
[2024-09-16 12:49:01.911] [ERROR] runCmd|npm - ^[[39mnpm WARN etherpad_mypads No license field.
[2024-09-16 12:49:01.911] [ERROR] runCmd|npm - ^[[39m
[2024-09-16 12:49:02.191] [INFO] runCmd|npm - ^[[39m+ ep_table_of_contents@0.3.86
[2024-09-16 12:49:02.191] [INFO] runCmd|npm - ^[[39madded 1 package from 1 contributor in 33.584s
[2024-09-16 12:49:04.551] [INFO] runCmd|npm - ^[[39m
[2024-09-16 12:49:04.552] [INFO] runCmd|npm - ^[[39m191 packages are looking for funding
[2024-09-16 12:49:04.552] [INFO] runCmd|npm - ^[[39m  run `npm fund` for details

ep_table_of_content is noted installed but the plugin wasn’t loaded and no table of contents appeared in pads

[2024-09-27 12:34:57.700] [ERROR] runCmd|npm - ^[[39mnpm WARN notsup Unsupported engine for ep_align@0.3.97: wanted: {"node":">=18.0.0"} (current: {"node":"14.2$
[2024-09-27 12:34:57.701] [ERROR] runCmd|npm - ^[[39mnpm WARN notsup Not compatible with your version of node/npm: ep_align@0.3.97
[2024-09-27 12:34:57.704] [ERROR] runCmd|npm - ^[[39mnpm WARN enoent ENOENT: no such file or directory, open '/var/www/etherpad_mypads/package.json'
[2024-09-27 12:34:57.729] [ERROR] runCmd|npm - ^[[39mnpm WARN eslint-plugin-import@2.27.5 requires a peer of eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 b$
[2024-09-27 12:34:57.748] [ERROR] runCmd|npm - ^[[39mnpm WARN etherpad_mypads No description
[2024-09-27 12:34:57.766] [ERROR] runCmd|npm - ^[[39mnpm WARN etherpad_mypads No repository field.
[2024-09-27 12:34:57.783] [ERROR] runCmd|npm - ^[[39mnpm WARN etherpad_mypads No README data
[2024-09-27 12:34:57.800] [ERROR] runCmd|npm - ^[[39mnpm WARN etherpad_mypads No license field.
[2024-09-27 12:34:57.801] [ERROR] runCmd|npm - ^[[39m
[2024-09-27 12:34:58.070] [INFO] runCmd|npm - ^[[39m+ ep_align@0.3.97
[2024-09-27 12:34:58.071] [INFO] runCmd|npm - ^[[39mremoved 1 package and updated 1 package in 23.261s
[2024-09-27 12:35:00.433] [INFO] runCmd|npm - ^[[39m
[2024-09-27 12:35:00.434] [INFO] runCmd|npm - ^[[39m190 packages are looking for funding
[2024-09-27 12:35:00.434] [INFO] runCmd|npm - ^[[39m  run `npm fund` for details
[2024-09-27 12:35:00.434] [INFO] runCmd|npm - ^[[39m
[2024-09-27 12:35:00.536] [INFO] plugins - ^[[39mSuccessfully installed plugin ep_align
[2024-09-27 12:35:00.537] [INFO] plugins - ^[[39mRunning npm to get a list of installed plugins...
[2024-09-27 12:35:11.360] [ERROR] runCmd|npm - ^[[39mnpm ERR! missing: ep_align@0.3.53, required by etherpad_mypads
[2024-09-27 12:35:11.431] [ERROR] server - ^[[39mMetrics at time of fatal error:
{
  "httpStartTime": 1727307164541,
  "memoryUsage": 281227264,
  "memoryUsageHeap": 63289000,
  "ueberdb_lockAwaits": 122,
  "ueberdb_lockAcquires": 7977,
  "ueberdb_lockReleases": 7977,
  "ueberdb_reads": 5595,
  "ueberdb_readsFailed": 0,
  "ueberdb_readsFinished": 5595,
  "ueberdb_readsFromCache": 5428,
  "ueberdb_readsFromDb": 167,
  "ueberdb_readsFromDbFailed": 0,
  "ueberdb_readsFromDbFinished": 167,
  "ueberdb_writes": 3221,
  "ueberdb_writesFailed": 0,
  "ueberdb_writesFinished": 3221,
  "ueberdb_writesObsoleted": 9,
  "ueberdb_writesToDb": 3212,
  "ueberdb_writesToDbFailed": 0,
  "ueberdb_writesToDbFinished": 3212,
  "ueberdb_writesToDbRetried": 0,
  "totalUsers": 4,
  "activePads": 3,
  "connects": {
    "mean": 0.00035663239857390035,
    "count": 39,
    "currentRate": 0.0003566323983640163,
    "1MinuteRate": 0.007553668846787295,
    "5MinuteRate": 0.002845250306888746,
    "15MinuteRate": 0.0010539967369687943
  },
  "lastDisconnect": 1727433311429,
  "disconnects": {
    "mean": 0.0003203377419626027,
    "count": 35,
    "currentRate": 0.00032033774198713083,
    "1MinuteRate": 4.337879425241145e-92,
   "5MinuteRate": 0.002845250306888746,
    "15MinuteRate": 0.0010539967369687943
  },
  "lastDisconnect": 1727433311429,
  "disconnects": {
    "mean": 0.0003203377419626027,
    "count": 35,
    "currentRate": 0.00032033774198713083,
    "1MinuteRate": 4.337879425241145e-92,
    "5MinuteRate": 9.719443278272743e-21,
    "15MinuteRate": 3.301855714998452e-9
  },
  "httpRequests": {
    "meter": {
      "mean": 0.001766496001899079,
      "count": 193,
      "currentRate": 0.0017664960019783853,
      "1MinuteRate": 0.0504340745369609,
      "5MinuteRate": 0.021894331824826002,
      "15MinuteRate": 0.008322074690996148
    },
    "histogram": {
      "min": 0.356794998049736,
      "max": 1002.3427830040455,
      "sum": 3649.9450949542224,
      "variance": 11525.189392345053,
      "mean": 18.911632616343123,
      "stddev": 107.35543485238674,
      "count": 193,
      "median": 2.0554540008306503,
      "p75": 4.772801999002695,
      "p95": 17.982192601263453,
      "p99": 1001.8997892087698,
      "p999": 1002.3427830040455
    }
  },
  "pendingEdits": 0,
  "edits": {
    "meter": {
      "mean": 0.007178003433041808,
      "count": 784,
      "currentRate": 0.007178003432990218,
      "1MinuteRate": 2.9644e-320,
      "5MinuteRate": 3.435317737973688e-143,
      "15MinuteRate": 5.34978102923279e-49
    },
    "histogram": {
      "min": 21.970599003136158,
      "max": 205.77081399783492,
      "sum": 80246.48588206246,
      "variance": 95.14991338399172,
      "mean": 102.35521158426334,
      "stddev": 9.754481707604548,
      "count": 784,
      "median": 102.64346250146627,
      "p75": 104.48684075288475,
      "p95": 113.38023950066417,
      "p99": 126.52346025034782,
      "p999": 205.77081399783492
    }
  }
}
[2024-09-27 12:35:11.432] [ERROR] server - ^[[39mError: Command exited with code 1: npm ls --long --json --depth=0 --no-production
    at exports (/var/www/etherpad_mypads/src/node/utils/run_cmd.js:119:25)
    at Object.exports.getPackages (/var/www/etherpad_mypads/src/static/js/pluginfw/plugins.js:115:48)
    at Object.exports.update (/var/www/etherpad_mypads/src/static/js/pluginfw/plugins.js:86:34)
    at Object.exports.install (/var/www/etherpad_mypads/src/static/js/pluginfw/installer.js:64:17)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

I have the same problem as the one exposed on this post.

which had no answer…

Reinstalling etherpad_mypads is not a problem. The problem is how to recover pads, as reinstalling blanks mariaDB database and etherpad_mypads directories.

Hello,
there is no solution on my side.
I lost all my stuff.
And i was pretty alone with this bug.
So maybe we can initiate a move to solve it…
I wonder if it would be a good idea to post on the Etherpad_my_pad gitub directly…?

tchao

I don’t know if removing the plugin from the list /var/www/etherpad_mypads/var/installed_plugins.json and restarting the service helps recovering etherpad access