Xpl0itU / WiiUDownloader

Allows to download encrypted wiiu files from nintendo's official servers
GNU General Public License v3.0
696 stars 16 forks source link

Misleading decrypt error - claims filename too long, but actually corrupt/incomplete encrypted file #54

Closed andrew-hill closed 12 months ago

andrew-hill commented 1 year ago

Testing this out on a larger download (~9GB), I encountered an error while decrypting. It occurred several times as I tried again and again (mostly not quite sure of what was truly going wrong):

The path specified for this download might be too long, please try downloading the files to a shorter path and try again

Except the base path was D:\ so I didn't believe it, the longest files were no more than 150 characters (and long filenames was enabled anyway).

After deleting some of the .app/.h3 files at a time, and re-downloading + decrypting, it would fail at a different point, and eventually succeeded. I don't know if I actually needed to delete files (as it would often re-download some files even if I didn't delete any), but clearly there was an issue with some of the .app/.h3 files, and the decryption step was failing because of these.

So I think there's two issues here:

  1. the error message above is potentially misleading, and perhaps could be improved (e.g. check the path length before writing; catch the decryption error separately; or at least amend the error message to say maybe try again). Perhaps most useful would be logging the file names in the error messages, especially the .app files as they're processed (assuming it's somewhat sequential), so one could identify and delete a corrupt .app file.

2) the download process can fail in some (unknown?) way - I don't have any way of checking if each file is the right size, nor could I see any download errors in the log file (there's only an INFO message if the file exists and is >= the remote/source file), but perhaps some more logging would help; or a check to see if the file downloaded is the expected size; or a warning/summary of any files that didn't match at the end so users can manually re-try?)

If I re-try, without deleting any files manually, I see some of the .app files re-downloaded each time it fails. So I expect the info you have available before downloading (size of remote/source file, and size of file on disk) is sufficient to resolve this.

Xpl0itU commented 1 year ago

What version of WiiUDownloader are you using? I fixed that issue on the latest version, corrupted file downloads shouldn’t happen, please update

andrew-hill commented 1 year ago

I downloaded the app for the first time today, from the link below - v1.32 for Windows. As best I can tell it's the latest version, right?

https://github.com/Xpl0itU/WiiUDownloader/releases/download/v1.32/WiiUDownloader-Windows.zip

I did notice the message in the changelog about that, but assumed it was relating to pausing downloads (which I wasn't doing), so assumed it must be a different download corruption issue.

GdenVan commented 1 year ago

im having the same issue, theres a file damaged somewhere but im not sure which. Even after redownloading and trying to manually decrypt, it tells me the same error for the game and updates, but not the DLC

Xpl0itU commented 12 months ago

Should be fixed with v2.0