geefr / beatsaber-linux-goodies

Mod installation scripts and other goodies to support Beat Saber on Linux
BSD 2-Clause "Simplified" License
132 stars 5 forks source link

Failure due to low disk space is not well communicated #64

Closed gyroninja closed 3 years ago

gyroninja commented 3 years ago

In the past, the graphical installer for .NET would tell you that you did not have enough space free to install it. This made it clear that you needed to free up space move the wine installation to a different drive. With the installation process of .NET made quiet in 105b81fcf46d0ca0d89211085ace79a290fae921 the wine setup no longer clearly communicates failure due to not enough disk space.

Maybe winetricks includes that the failure is due to low disk space but since the scripts redirects stderr to /dev/null it is not shown? Alternatively, the script could check the free space of the drive the wine install was on and issue a warning if it does not look like there is enough space to setup .NET.

geefr commented 3 years ago

Okay thanks for the report.

I'll acknowledge it as a usability issue, but if you're that low on space other tools are probably going to have problems very soon, or does winetricks need a huge amount of space for temporary/cache during installation? (I'd expect things like custom campaigns, song downloads etc to take a lot more space than .net itself).

One thing I've been thinking about (but haven't made much progress on yet) is removing winetricks/wine from the setup process completely. The blocker there is running ipa.exe during initial game patching, so been looking at doing a .net code/linux native port of bsipa.

So in short I'm not personally going to add a fix for this, but if you've got ideas I'm happy to discuss, and generally happy to merge sensible changes.

ominitay commented 3 years ago

bs-linux-setup-wine.sh does indeed redirect the winetricks output to /dev/null. Quiet mode shouldn't be disabled in my opinion, as it would go against the intentions of QBeat to be non-interactive (it could also break the workaround for certain versions of Wine which can't install dotnet properly, but I digress). Perhaps the script should just output the logs produced by winetricks if run with a DEBUG environment variable set?

gyroninja commented 3 years ago

I'll acknowledge it as a usability issue, but if you're that low on space other tools are probably going to have problems very soon, or does winetricks need a huge amount of space for temporary/cache during installation? (I'd expect things like custom campaigns, song downloads etc to take a lot more space than .net itself).

I ran into this after deleting my wine installation and recreating it after a beat saber update. The installation seems to require more space than it ends up taking in the end. A new custom song is going to only need like an extra 4MiB on average where that .NET installation needed a couple of GiB. Other tools on my computer like IntelliJ work fine when my /home drive only has a couple GiB free. This problem is kind of obvious in hindsight, but I just didn't think to check it immediately especially since it fit the old installation before.

So in short I'm not personally going to add a fix for this, but if you've got ideas I'm happy to discuss, and generally happy to merge sensible changes.

I would be happy if at least this issue serves as something that comes up in the search when trying to find out why it fails to install.

Quiet mode shouldn't be disabled in my opinion

I agree. This issue was more to point out that the nonquiet installer provides more information on why it can not be installed compared to the quiet version.

Perhaps the script should just output the logs produced by winetricks if run with a DEBUG environment variable set?

I just checked and the output of stderr is not useful. I just tried installing into a new directory to see the logs again. I tried to install it with 4.1GiB free and it failed. At the end of the log (this output is from stdout). We have:

warning: Note: command wine NDP46-KB3045557-x86-x64-AllOS-ENU.exe /q /c:install.exe /q returned status 236. Aborting.
------------------------------------------------------
ERROR: Failed to install .Net 4.6.1
WARN: A Wine prefix already exists at /home/redacted/.winetest. If you experience any issues, please delete the prefix, or use a different prefix.

FAILURE: Setup of wine prefix failed

I could not find what status 236 exactly means, but perhaps if we see it we could assume that the user does not have enough free space. We could then add a message when it fails with 236 saying that you should free up more space for your wine installation.

geefr commented 3 years ago

Hm, the 236 is probably documented somewhere, deep in the depths of windows installer/msi stuff, but they don't tend to document all the codes there (Like, 20 out of 20,000 are actually known...). Might also be a generic windows status for cache space, or could be wine-specific, difficult to know for sure.

I'll see where I get to with removing winetricks entirely (Should be testing something today), but if I don't have something in say a week I'll merge whatever workarounds are needed here for now.

Detecting 236 is probably a good idea, maybe just an extension to the existing failure check to say 'Setup failed. We got '236' and we think that means you're out of disk space.

geefr commented 3 years ago

Closing this one - All future dev will be beataroni/not wine based, so cause of this issue goes away.

If lack of disk space causes mod installs to fail in beataroni please re-open, I think it'll report the error in a semi-sensible manner already.