Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error - "Error with matching keys" #35

Closed
tr1p0p opened this issue Feb 22, 2025 · 14 comments · Fixed by #37 or #39
Closed

Installation error - "Error with matching keys" #35

tr1p0p opened this issue Feb 22, 2025 · 14 comments · Fixed by #37 or #39

Comments

@tr1p0p
Copy link

tr1p0p commented Feb 22, 2025

Cannot install on my OVH VPS on debian 12 it seem.

Here's the log : https://paste.yunohost.org/raw/uhebemaroh

Seem it's around some error with matching keys, something like that ?

Hope it get fixed soon. Thanks.

@looowizz
Copy link
Contributor

Hmm weird. Seems to be related to this pnpm issue. Their solution seems to be to run sudo npm install --global corepack@latest before installing, so maybe try that? :)

@Dazeilad
Copy link

Hello, I had this issue a few days ago, and now with this issue being solved, I could just now install it.

@tr1p0p
Copy link
Author

tr1p0p commented Feb 23, 2025

Hmm weird. Seems to be related to this pnpm issue. Their solution seems to be to run sudo npm install --global corepack@latest before installing, so maybe try that? :)

I try that, and still the same error when installing sharkey...

Still this error, and no fix working.

 corepack enable
Info: DEBUG - + corepack enable
Info: DEBUG - + corepack prepare pnpm@latest --activate
Info: DEBUG - Preparing pnpm@latest for immediate activation...
Info: DEBUG - Internal Error: Cannot find matching keyid: {"signatures":[{"sig":"MEYCIQDbcyRXEEpUvMj22WsicmOsvx+ctqHZv1vLScf3/247EAIhANfMkRDNAHdtTDNZ34BVH2z2z0Ef8o5VK4osH6ES9RHW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}
Info: DEBUG -     at verifySignature (/opt/node_n/n/versions/node/22.12.0/lib/node_modules/corepack/dist/lib/corepack.cjs:21535:47)
Info: DEBUG -     at installVersion (/opt/node_n/n/versions/node/22.12.0/lib/node_modules/corepack/dist/lib/corepack.cjs:21882:7)
Info: DEBUG -     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Info: DEBUG -     at async Engine.ensurePackageManager (/opt/node_n/n/versions/node/22.12.0/lib/node_modules/corepack/dist/lib/corepack.cjs:22310:32)
Info: DEBUG -     at async PrepareCommand.execute (/opt/node_n/n/versions/node/22.12.0/lib/node_modules/corepack/dist/lib/corepack.cjs:23019:27)
Info: DEBUG -     at async PrepareCommand.validateAndExecute (/opt/node_n/n/versions/node/22.12.0/lib/node_modules/corepack/dist/lib/corepack.cjs:19835:22)
Info: DEBUG -     at async _Cli.run (/opt/node_n/n/versions/node/22.12.0/lib/node_modules/corepack/dist/lib/corepack.cjs:20772:18)
Info: DEBUG -     at async Object.runMain (/opt/node_n/n/versions/node/22.12.0/lib/node_modules/corepack/dist/lib/corepack.cjs:23091:19)

@looowizz
Copy link
Contributor

Umm, could you give the output of this command, just to check that pnpm is actually installed on your VPS?
sudo ls /opt/node_n/n/versions/node/22/bin/

@tr1p0p
Copy link
Author

tr1p0p commented Feb 23, 2025

Well, i have to install npm before (obviously) and it show that, so it's not that i think..

sudo ls /opt/node_n/n/versions/node/22/bin/
corepack  node  npm  npx  pnpm  pnpx  yarn  yarnpkg

EDIT : And, still the same error when installing Sharkey. Maybe it's coming from the way yunohost build and install npm during the install ? Logs here : https://paste.yunohost.org/raw/ifekajeniw

@looowizz
Copy link
Contributor

looowizz commented Feb 23, 2025

Yea, I'm really not sure. I don't think yunohost is installing or building npm during install as it's already installed on your system it looks like, not very familiar with how npm/pnpm works though. This is all it is running in relation to npm/pnpm:

ynh_hide_warnings corepack enable && corepack prepare pnpm@latest --activate
ynh_hide_warnings ynh_exec_as_app COREPACK_ENABLE_DOWNLOAD_PROMPT=0 NODE_OPTIONS="--max-old-space-size=3000" pnpm install --frozen-lockfile
ynh_hide_warnings ynh_exec_as_app NODE_ENV=production NODE_OPTIONS="--max-old-space-size=3000" pnpm build
ynh_hide_warnings ynh_exec_as_app pnpm run init

It seems to be getting issues running the second command (pnpm install --frozen-lockfile) which just installs sharkey's dependencies (see here)

@tr1p0p
Copy link
Author

tr1p0p commented Feb 24, 2025

Yunohost install app in the separate user and maybe in and sandbox kind of way ?

I only have npm install because you tell me to do a sudo npm install command. But it was not install the first time. What i said is, it seem the npm from the admin user not connected to the npm of the script.

@belatedly
Copy link

I just tried to install and came here because I had the same issue

https://paste.yunohost.org/raw/avusizowab

@looowizz
Copy link
Contributor

Yunohost install app in the separate user and maybe in and sandbox kind of way ?

I only have npm install because you tell me to do a sudo npm install command. But it was not install the first time. What i said is, it seem the npm from the admin user not connected to the npm of the script.

Ah yea i see. I think the error is coming from the admin's npm install though, as seen in the log, where it seems to suggest the error is originating from the globally installed npm:

2025-02-23 12:27:42,115: DEBUG - /opt/node_n/n/versions/node/22.12.0/lib/node_modules/corepack/dist/lib/corepack.cjs:21535
2025-02-23 12:27:42,115: DEBUG -   if (key == null || signature == null) throw new Error(`Cannot find matching keyid: ${JSON.stringify({ signatures, keys })}`);

Would either of you be able to try installing a patch I've made, essentially just adding my previously mentioned attempted fix to the install script, to see if that helps at all?

You can do this by running the command:

sudo yunohost app install https://github.com/looowizz/sharkey_ynh/tree/key-error-fix --debug

@belatedly
Copy link

Yep no prob, I am running it now

@belatedly
Copy link

It worked without issue! There were a couple of new version FYIs but I don't know if that's in Sharkey or on YH's side (I assume the former)

Update available! 9.6.0 → 10.5.0. │
143673 DEBUG │ Changelog: https://github.com/pnpm/pnpm/releases/tag/v10.5.0
143673 DEBUG │ Run "corepack install -g [email protected]" to update. │
143673 DEBUG │ │
143673 DEBUG │ Follow @pnpmjs for updates: https://x.com/pnpmjs

DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
240960 DEBUG .../node_modules/@nestjs/core postinstall: (Use node --trace-deprecation ... to show where the warning was created)

@looowizz
Copy link
Contributor

Oo yay! I'd probs have to see the full log to check whether those pnpm updates are for sharkey or Yunohost but it's probably fine :)

Will just wait for @tr1p0p's results just to double check this wasn't like a random success.

@tr1p0p
Copy link
Author

tr1p0p commented Feb 26, 2025

Yeah i confirm the fix work, and installation finished (if you have enough memory left), great ! Thanks !

Should i close the issue then now or i let you do that ?

@looowizz
Copy link
Contributor

looowizz commented Feb 27, 2025

Great! I'll just make a pull request which should close the issue automatically when merged. Can leave the issue open for now in case anyone else comes across the same thing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants