Skip to content

[Linux] Launcher downloads and discards files indefinitely #287

@KarmyDev

Description

@KarmyDev
  • Launcher Version: 2.2.2 (Unix version)
  • Operating system: Linux Mint 22.1 x86_64
  • Antivirus/Firewall (if any): None?
  • Wine/Mono Version (if any): wine-ge-8-26-x86_64 & wine-9.0 (Ubuntu 9.0~repack-4build3)

For some reason launcher successfully downloads GameFiles/.Launcher/Downloads/GameFiles.sbrwpack (~4 GB)
And when it tries to unpack it, computer takes a while (fans spinning are noticeable), then discards it and attempts to download resources again, removing previous file.

I've wasted many internet data just to be met with "DOWNLOAD ATTEMPT 1" and then "DOWNLOAD ATTEMPT 2", where each of the previous one would just failed to unpack, and decides to redownload again.

Enabling LZMA Downloader seems to fix the issue, GameFiles/ folder has finally become populated with folders and game files.

In my previous attempts I've also tried to just "catching" the GameFiles.sbrwpack file while it was finishing the download, and copying it before it's override and copied parts of launcher code to unpack it.
I was met with error informing about padding being invalid:

Unhandled exception. System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
   at System.Security.Cryptography.SymmetricPadding.GetPaddingLength(ReadOnlySpan`1 block, PaddingMode paddingMode, Int32 blockSize)
   at System.Security.Cryptography.UniversalCryptoDecryptor.UncheckedTransformFinalBlock(ReadOnlySpan`1 inputBuffer, Span`1 outputBuffer)
   at System.Security.Cryptography.UniversalCryptoDecryptor.UncheckedTransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.UniversalCryptoTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.CryptoStream.FlushFinalBlockAsync(Boolean useAsync, CancellationToken cancellationToken)
   at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
   at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at Program.UnpackSBRW(String sourceFile) in /home/karmy/dev/csharp/LZMADecompressNFSW/Program.cs:line 268
   at Program.Main(String[] args) in /home/karmy/dev/csharp/LZMADecompressNFSW/Program.cs:line 184
   at Program.<Main>(String[] args)

at this line of code:

FileStream fileStream = new FileStream(Path.Combine(OutputPath, oldFileName), FileMode.Create);
CryptoStream cryptoStream = new CryptoStream(fileStream, dESCryptoServiceProvider.CreateDecryptor(), CryptoStreamMode.Write);
BinaryWriter binaryFile = new BinaryWriter(cryptoStream);

using (BinaryReader reader = new BinaryReader(File.Open(getTempNa, FileMode.Open)))
{
	long numBytes = new FileInfo(getTempNa).Length;
	binaryFile.Write(reader.ReadBytes((int)numBytes));
-	binaryFile.Close();
}

However please do note that I unpacked the files manually using Archive Manager for GNOME (43.0) and was met with the following error upon extracting:

Image

So take that error with a grain of salt, my suspicion goes towards maybe wrong Encryption key?
A classic difference between linux's / and window's \ being used for folder in path?

Either way something causes the infinite download loop, LZMA Downloader was able to download files just fine:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions