Misskey upgrade from 12.109.2 to 12.110.0 fails with error

Hardware: Root Server by Netcup
YunoHost version: 4.3.6.3 (stable)
I have access to my server : Through SSH | through the webadmin | webmin | VNC
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : Changed SSH port.

Description of my issue

Successful Misskey upgrade on test server (VirtualBox test environment), but fails on productive server (Debian 10 Buster).

[Error] Upgrade failed.
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
This action broke dpkg/APT (the system package managers)... You can try to solve this issue by connecting through SSH and running `sudo apt install --fix-broken` and/or `sudo dpkg --configure -a`.

No changes after runnig 'sudo apt install --fix-broken': 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
and 'sudo dpkg --configure -a'

Second upgrade also fails.

I also uninstalled two apps (Plume and Invidious) for testing because they also access the Postgres server. No changes.

Logfile: https://paste.yunohost.org/raw/olidifival

Most important log entries (I think):

2022-04-12 10:30:40,047: DEBUG - CannotExecuteNotConnectedError: Cannot execute operation on "default" connection because connection is not yet established.
2022-04-12 10:30:40,048: DEBUG -     at DataSource.destroy (/var/www/misskey/packages/backend/node_modules/typeorm/data-source/DataSource.js:169:19)
2022-04-12 10:30:40,048: DEBUG -     at Object.handler (/var/www/misskey/packages/backend/node_modules/typeorm/commands/MigrationRunCommand.js:67:34)

Also, no changes after @jarods PR ( adding “ynh_use_nodejs” to the upgrade script).

Hi @Memo
I’m sorry, I didn’t take the time to look into the entire log (I have so little free time these days.)
I see this

The operation 'Remove the 'misskey' app' could not be completed

It’s the remove script that failed, see what is installed (in the install script) that didn’t get removed in the remove script. Reverse the order (what’s installed first should be removed last).
Good luck

Thanks for this hint @jarod5001, but I’m pretty new to YunoHost, so I’m afraid that’s beyond my knowledge.

But what I don’t understand with my little knowledge is why it worked on my test instance (installed according to the instruction on Install YunoHost | Yunohost Documentation)
but not on my productive server ¯_(ツ)_/¯

Just a thought: One difference between my productive server and the Virtual-Box YunoHost installation is that all Debian packages are up to date on the productive server.

The Virtual-Box YunoHost installation was tested without Debian updates.

I don’t know if it’s relevant, but I updated Yarn just before:

Upgrade: yarn:amd64 (1.22.17-1, 1.22.18-1)

In the VM or the server?

On the production server.
If there’s a way to undo this upgrade and go back to the latest one later, I’ll test it, but I don’t know how.

I think this update changed the yarn package from auto to manual. You can fix it with apt-mark

Nope. It is still marked as auto.

Johann (misskey-dev) sent a hint, this might be an issue in TypeORM:

No I don’t think this is related to the update issue.
Since you have updated yarn, it’s may be what broke it.
Try making a backup of misskey, remove it, remove yarn, restore backup and launch the update.

Made a backup, removed app Misskey, no yarn to remove on server, restored backup, update fails again.

This solution might help:

But the upgrade script would have to be revised for that?

1 Like

It’s working now. @ericg fixed it and the ci test passed. Can you confirm that the upgrade is OK for you?

No, unfortunately not. Exactly the same error messages :slightly_frowning_face:

I called the upgrade with:

sudo yunohost app upgrade misskey -u https://github.com/YunoHost-Apps/misskey_ynh/tree/testing --debug

Correct?

You need to upgrade from the upgrade-fix branch

sudo yunohost app upgrade misskey -u 
https://github.com/YunoHost-Apps/misskey_ynh/tree/upgrade-fix --force
1 Like

That worked perfectly. Thanks :+1: :grinning: :+1:

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