HarryBleckert / ep_adminpads3

Etherpad plugin for admins to list, search, and delete pads. Pad lists can be sorted by last edited, size and number of revisions.
MIT License
0 stars 0 forks source link

docker: Cannot GET /admin/pads #15

Open RefurioAnachro opened 4 months ago

RefurioAnachro commented 4 months ago

I'm running the docker release "etherpad/etherpad" behind an ninx-proxy / acme-companion combo. I have installed adminpads3 V3.0.22 via the admin page. I'm logged in there and when I enter the path /admin/pads in the URL I get the following error message:

Cannot GET /admin/pads

I feel stupid, is there some additional documentation I should have looked at?

RefurioAnachro commented 4 months ago

Here is an error message I found using docker logs:

[2024-02-21T22:02:41.417] [ERROR] settings - Failed to load hook function "/opt/etherpad-lite/plugin_packages/ep_adminpads3:eejsBlock_adminMenu" for plugin "ep_adminpads3" part "ep_adminpads3" hook set "hooks" hook "eejsBlock_adminMenu": Error: Cannot find module 'cheerio' Require stack:

RefurioAnachro commented 4 months ago

Troubleshooting information says I'm running Version number: 1.9.7

HarryBleckert commented 4 months ago

According to the error message you posted above, "Cannot find module 'cheerio'", adminpads3 was not successfully installed and thus doesn't work.

klardotsh commented 4 months ago

For what it's worth, this is currently my UX when I go to the plugins manager of Etherpad and click "install" on this plugin. Even installing cheerio as an NPM dependency in my Docker container doesn't appear to solve the issue, which is somewhat surprising.

Put more simply, clicking install on this plugin in a stock Etherpad Lite admin panel currently does not produce a working installation of the plugin for me.

HarryBleckert commented 4 months ago

Hey Josh

Sorry, but I can't help resolving this problem, as I am not really an experienced nodejs developer, but simply forked adminpads2 because it lacked sortable columns and some other features I wanted to have. However, I just tried again and I can uninstall and install adminpads3 using Etherpad 1.97 plugin manager.

Kind Regards Harry

RefurioAnachro commented 3 months ago

How can I tell if it has installed properly? You seem to have a working copy, can we compare notes?

The files seem to be there:

$ ls -F /opt/etherpad-lite/plugin_packages/cheerio
LICENSE       Readme.md     lib/          package.json

$ ls -F /opt/etherpad-lite/plugin_packages/ep_adminpads3/
CONTRIBUTING.md  README.md        ep.json          locales/         static/
LICENSE          docs/            index.js         package.json     templates/

Other than in this directory adminpads3 is mentioned once:

$ find . -type f | grep -v ./plugin_packages/ep_adminpads3 | xargs grep ep_adminpads3 2>/dev/null
./var/installed_plugins.json:{"plugins":[{"name":"ep_prometheus_exporter","version":"0.0.6"},{"name":"ep_adminpads3","version":"3.0.22"},{"name":"ep_etherpad-lite","version":"1.9.7"}]}
RefurioAnachro commented 3 months ago

Errors all look like this

[2024-03-06T20:53:26.982] [ERROR] settings - Failed to load hook function "/opt/etherpad-lite/plugin_packages/ep_adminpads3:socketio" for plugin "ep_adminpads3" part "ep_adminpads3" hook set "hooks" hook "socketio": Error: Cannot find module 'cheerio'

Where the relevant bit is the second message, that it can't find the module cheerio. The difference between the lines is the function name, we get two messages like this for each socketio, padRemove, padCreate, and eejsBlock_adminMenu.

Searching for the last hook function seemed to find only files under plugin_packages/ep_adminpads3, but looking at the admin page's Troubleshooting Information, it seems at least the other hooks are used by other components, so that's okay... I guess.

Maybe it works with an older version of etherpad, here's a similar sounding problem from its upstream:

https://github.com/ether/etherpad-lite/issues/6182

RefurioAnachro commented 3 months ago

I just checked, it works fine with 1.9.6

RefurioAnachro commented 3 months ago

Maybe they'll fix it. Or someone keep an eye on that issue to see how the extension needs to be fixed. Or take a look at the changelog between 1.9.6 and 1.9.7 for more hints.

JeremyRand commented 3 months ago

1.9.7 added this PR that wasn't in 1.9.6: https://github.com/ether/etherpad-lite/pull/6018

Seems potentially relevant?

SamTV12345 commented 3 months ago

It's fixed just to let you know :)