[Finished] 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

Hello,

thanks for the suggest but all node.js is broken.

I tried an upgrade to testing version.
Had only this error.

oct. 12 10:09:14 sudeducation78.org run.sh[3218735]: [2024-10-12T10:09:14.998] [ERROR] settings - Error reading package.json Error: ENOENT: no such file or directory, open '/var/www/etherpad_mypads/src/plugin_packages/@types/ldapjs/package.json' for file:///var/www/etherpad_mypads/src/plugin_packages/@types/ldapjs/package.json
oct. 12 10:09:14 sudeducation78.org run.sh[3218735]: [2024-10-12T10:09:14.999] [ERROR] settings - Error reading package.json Error: ENOENT: no such file or directory, open '/var/www/etherpad_mypads/src/plugin_packages/@types/node/package.json' for file:///var/www/etherpad_mypads/src/plugin_packages/@types/node/package.json

Service claims being successfully running

823823 DEBUG Checking that required services are up and running...
825459 SUCCESS etherpad_mypads mis à jour
825466 DEBUG Pour voir le journal de cette opération 'Mettre à jour l'application 'etherpad_mypads'', utilisez la commande 'yunohost log show 20241012-072634-app_upgrade-etherpad_mypads'
825490 DEBUG The permission database has been resynchronized
825586 DEBUG La configuration de SSOwat a été regénérée
825595 SUCCESS Mise à jour terminée
825596 DEBUG action [3193277.1] executed in 825.363s
825596 DEBUG lock has been released

metadata: 
  ended_at: 2024-10-12 09:38:35
  env: 
    YNH_APP_ACTION: upgrade
    YNH_APP_BASEDIR: /var/cache/yunohost/app_tmp_work_dirs/app_p9dcd2mi
    YNH_APP_CURRENT_VERSION: 1.9.1~ynh3
    YNH_APP_ID: etherpad_mypads
    YNH_APP_INSTANCE_NAME: etherpad_mypads
    YNH_APP_INSTANCE_NUMBER: 1
    YNH_APP_MANIFEST_VERSION: 2.2.5~ynh1
    YNH_APP_PACKAGING_FORMAT: 2.0
    YNH_APP_UPGRADE_TYPE: UPGRADE_APP
    YNH_ARCH: amd64
    YNH_DEBIAN_VERSION: bullseye
    YNH_HELPERS_VERSION: 2
  error: None
  interface: cli
  operation: app_upgrade
  parent: None
  related_to: 
    - app
    - etherpad_mypads
  started_at: 2024-10-12 09:26:34
  success: True
  yunohost_version: 11.2.30.2

But when clicking on tile nothing appears.

In admin interface service shows running but is not. It tries infinitely to start with this error.

oct. 12 10:09:14 sudeducation78.org run.sh[3218735]: [2024-10-12T10:09:14.998] [ERROR] settings - Error reading package.json Error: ENOENT: no such file or directory, open '/var/www/etherpad_mypads/src/plugin_packages/@types/ldapjs/package.json' for file:///var/www/etherpad_mypads/src/plugin_packages/@types/ldapjs/package.json
oct. 12 10:09:14 sudeducation78.org run.sh[3218735]: [2024-10-12T10:09:14.999] [ERROR] settings - Error reading package.json Error: ENOENT: no such file or directory, open '/var/www/etherpad_mypads/src/plugin_packages/@types/node/package.json' for file:///var/www/etherpad_mypads/src/plugin_packages/@types/node/package.json

ldapjs directory exists

sudo ls -ahl /var/www/etherpad_mypads/src/plugin_packages/ldapjs/package.json
-rw-r--r-- 1 etherpad_mypads etherpad_mypads 1,5K 11 janv.  2018 /var/www/etherpad_mypads/src/plugin_packages/ldapjs/package.json

but no “node” directory.

Ok,

finding no solution to restart app, I uninstalled it and reinstalled after saving DB with PHPmyAdmin.

Problem 1 :
App is blocked in “Maintenance mode”.

Problem 2 :
I’m not able to import DB.
I had a 413 error with nginx, so I modified /etc/nginx/conf.d/_domain_.d/phpmyadmin.conf. Now import fails in PHPmyAdmin.

Must I a change php.ini file ? post_max_size = 8M ?
Witch one ? In cli directory or in fpm directory ?

Thanks for help…

Hello again,

DB possibly restored.
I uploaded sql file width scp.

Removed store table with PHPMyadmin
Then
mysql -u etherpad_mypads -p etherpad_mypads < etherpad_mypads.sql
DB password is in
/etc/yunohost/apps/etherpad_mypads/settings.yml

Ok,

maintenance_mode removed.

App works but pads are all lost. :frowning:
DB has 93 MB but after connection, My_pads desktop is empty :frowning:

If MariaDB database is saved with PHPmyAdmin, all pads can be found in the sql file.

Perhaps restoring does not work because of the ldap connection.

Most important is that I am able to restore the pads even if it’s manually.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.