Difegue / LANraragi

Web application for archival and reading of manga/doujinshi. Lightweight and Docker-ready for NAS/servers.
https://lrr.tvc-16.science
MIT License
2.18k stars 153 forks source link

Impossible to downgrade to any older version after installing any version post 0.9.20 #1070

Closed soarpasser closed 3 weeks ago

soarpasser commented 4 weeks ago

On a Windows 10 system, if you install any version post 0.9.20 and want to go back to an older version after that - the older version will NOT work at all despite a clean install of both the program itself, and even WSL.

image This is the only error that shows up.

Difegue commented 4 weeks ago

Not sure if it's related, but I can confirm that the latest Windows MSI can't be uninstalled cleanly through Settings as it fucks up when unregistering the distro:

Action start 01:16:39: UnRegisterWslDistro.
SFXCA: Extracting custom action to temporary directory: C:\Users\_____\AppData\Local\Temp\MSI5743.tmp-\
SFXCA: Binding to CLR version v4.0.30319
Calling custom action WixSharp Setup!Setup.Program.UnRegisterWslDistro
Removing previous WSL Distro
System.ComponentModel.Win32Exception (0x80004005): Le fichier spécifié est introuvable
   à System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   à System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   à Setup.Program.<>c__DisplayClass2_0.<UnRegisterWslDistro>b__0() dans D:\a\LANraragi\LANraragi\tools\build\windows\Karen\Setup\Program.cs:ligne 136
   à WixSharp.Extensions.HandleErrors(Session session, Action action)
CustomAction UnRegisterWslDistro returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (A4:64) [01:16:41:311]: Note: 1: 2265 2:  3: -2147287035 
MSI (s) (A4:64) [01:16:41:311]: Machine policy value 'DisableRollback' is 0
MSI (s) (A4:64) [01:16:41:311]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
Action ended 01:16:41: UnRegisterWslDistro. Return value 3.
Difegue commented 4 weeks ago

In the meantime, there's always good old MsiZap: Windows Installer Clean Up.zip

soarpasser commented 4 weeks ago

Not sure if it's related, but I can confirm that the latest Windows MSI can't be uninstalled cleanly through Settings as it fucks up when unregistering the distro:

Action start 01:16:39: UnRegisterWslDistro.
SFXCA: Extracting custom action to temporary directory: C:\Users\_____\AppData\Local\Temp\MSI5743.tmp-\
SFXCA: Binding to CLR version v4.0.30319
Calling custom action WixSharp Setup!Setup.Program.UnRegisterWslDistro
Removing previous WSL Distro
System.ComponentModel.Win32Exception (0x80004005): Le fichier spécifié est introuvable
   à System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   à System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   à Setup.Program.<>c__DisplayClass2_0.<UnRegisterWslDistro>b__0() dans D:\a\LANraragi\LANraragi\tools\build\windows\Karen\Setup\Program.cs:ligne 136
   à WixSharp.Extensions.HandleErrors(Session session, Action action)
CustomAction UnRegisterWslDistro returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (A4:64) [01:16:41:311]: Note: 1: 2265 2:  3: -2147287035 
MSI (s) (A4:64) [01:16:41:311]: Machine policy value 'DisableRollback' is 0
MSI (s) (A4:64) [01:16:41:311]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
Action ended 01:16:41: UnRegisterWslDistro. Return value 3.

Well naturally I did use the msi installer and default uninstaller to uninstall everything... MULTIPLE times... So idk, maybe the issue. I'll try with the thing above and then reinstall to see if it works.

soarpasser commented 3 weeks ago

In the meantime, there's always good old MsiZap: Windows Installer Clean Up.zip

It didn't. Looks like redis just somehow got nukd when downgrading to the old version, but came back when using the new version. Do I recall that 0.9.20 seemed to switch to another version of redis? Could that be the problem?

soarpasser commented 3 weeks ago

image image image Found the issue. This is caused by a new version of redis writing the database to a format in a higher version which can't be read by the older version.

soarpasser commented 3 weeks ago

image After restoring an older database version, I can now downgrade successfully, however now THIS error pops up instead. Now I can't write any changes to the database.

Difegue commented 3 weeks ago

Which Redis version is this? The MISCONF error looks like the v7 issue multiple users saw on WSL1, which is what led me to deprecate WSL1 to begin with. I would suggest going back to a v5 RDB if possible if you want to remain on WSL1.
(https://github.com/Difegue/LANraragi/discussions/869#discussioncomment-7335036)

v5 will be used in either 0.8.9 or the recent WSL1 nightly MSIs.

The long and short of it:

The WSL1 builds provided in nightly have been moved back to use the "legacy" Dockerfile, which uses Alpine 3.12 + Redis 5.0.14, aka the 0.8.9 stack.
Now, I'll admit I had forgotten that the database downgrade would break WSL1 0.9.0 users, apologies for that. 🙇

However, 0.9.0 was the only version affected and that came with a big warning header for Windows - The subsequent nightly WSL1 builds are only provided as a courtesy and were never marked as production-ready, so I don't plan on fixing this.

I'll keep the issue open while I patch over the MSI uninstallation problem though.

soarpasser commented 3 weeks ago

Which Redis version is this? The MISCONF error looks like the v7 issue multiple users saw on WSL1, which is what led me to deprecate WSL1 to begin with. I would suggest going back to a v5 RDB if possible if you want to remain on WSL1. (#869 (comment))

The long and short of it:

* 0.9.0 bumped to Alpine 3.18, which ships Redis 7.0.14 (unstable on WSL1, MISCONF and/or RdbSaveRio unimplemented function)

* 0.9.1 moved up to Alpine 3.20 + Redis 7.2.5 -- I deprecated WSL1 here because I could not find a good fix for the unstability.

The WSL1 builds provided in nightly have been moved back to use the "legacy" Dockerfile, which uses Alpine 3.12 + Redis 5.0.14, aka the 0.8.9 stack. Now, I'll admit I had forgotten that the database downgrade would break WSL1 0.9.0 users, apologies for that. 🙇

However, 0.9.0 was the only version affected and that came with a big warning header for Windows - The subsequent nightly WSL1 builds are only provided as a courtesy and were never marked as production-ready, so I don't plan on fixing this.

I'll keep the issue open while I patch over the MSI uninstallation problem though.

This explains it then. My "working" build was a "0.9.10 WSL1 nightly", which sits between 0.9.0 and 0.9.10 and had Redis 7.0.14.

It was stable before, but likely after some shenanigans with the uninstaller problem, it became unstable and started giving these errors. Not even a system restore could fix that.

I never actually installed 0.9.0 from the releases at all, only restoring the nightly build that I used to have, so I skipped the warning. And obviously, I was affected by the database downgrade.

The next course of action to take is to probably see if I can go back and install 0.8.9 and try to restore a json file, as all my relevant rdb backups are long since redis 7+.

Difegue commented 3 weeks ago

Uninstall issue fixed.