[BUG] - Unable to deserialize cloned data
Describe the bug When downloading Wesley's Moons in Lethal Company (this may also be an issue with other mods), an error saying 'Unable to deserialize cloned data' appears.
To Reproduce Steps to reproduce the behavior:
- Open the mod manager on Lethal Company
- Download Wesleys_Moons
- Error when the download finishes
Expected behavior The mod finishes downloading, and I can run the game without issues.
Screenshots
Additional context System is running on CachyOS, no launch options on r2modman I (reycko) am not the one experiencing the issue, but my friend, I am opening this issue on his behalf
Log files relating to the bug:
8:26:05 PM [ERROR]: [Failed to download mod Magic_Wesley-Wesleys_Moons-6.9.6]: Uncaught Error: Unable to deserialize cloned data.
8:26:30 PM [ERROR]: [Failed to download mod Magic_Wesley-Wesleys_Moons-6.9.6]: Uncaught Error: Unable to deserialize cloned data.
8:26:58 PM [INFO]: Steam folder is: /home/<user>/.local/share/Steam
Same problem on Linux Mint 21.
Same here Cachy OS 6.17
To note, I do not have this happen on my machine, which is running arch linux We both have r2modman from AUR package 'r2modman-bin' This only happens to my friend
I was able to work around this by copying the BepInEx/plugins/Magic_Wesley-Wesleys_Moons folder from a friend and by modifying mods.yml after installing the dependencies.
Another work around is to put it in cache manually.
I may found the issue. It looks like the error is caused by const buf: Buffer = Buffer.from(response.data); in BetterThunderstoreDownloader.ts (L82), likely due to the buffer limit.
I would suggtest streaming the response into a file rather than loading the response into memory first.
Is the file larger than 2GBs? If so, it's not supported.
There is a half fix here, but it'll proceed to fail because zip libraries (that are secure) don't stream (and so 2GB is attempted to get loaded into memory again) https://github.com/ebkr/r2modmanPlus/pull/1765
Is the file larger than 2GBs? If so, it's not supported.
There is a half fix here, but it'll proceed to fail because zip libraries (that are secure) don't stream (and so 2GB is attempted to get loaded into memory again) #1765
It's 1.2 gigs
I believe it actually depends on the memory use of the application at that point. I'd imagine there's some objects still stored in memory that haven't yet been cleared up from downloading, but the running application overhead.
Once the overall memory use exceeds 2GBs, that's when the issue occurs. So it's not that the file has to be 2GB, it's just that it's the general limit.
I believe it actually depends on the memory use of the application at that point. I'd imagine there's some objects still stored in memory that haven't yet been cleared up from downloading, but the running application overhead.
Once the overall memory use exceeds 2GBs, that's when the issue occurs. So it's not that the file has to be 2GB, it's just that it's the general limit.
But even just downloading it on a fresh session doesn't work and produces the same error ? (By fresh session I mean r2modman that was just opened very recently)
What I've tried: -Updating my system -Updating r2modman -Reinstalling r2modman -Deleting cache folder -Chowning everything in r2modman -Restarting r2modman -Restarting my system -Installing only the mod on a new profile
Only thing that worked was putting the files manually in ~/.config/r2modman-plus/cache/[folder name]/[version]
But even just downloading it on a fresh session doesn't work and produces the same error ? (By fresh session I mean r2modman that was just opened very recently)
Again, it's memory related. It's also why the other things you've tried wouldn't resolve it.
Only thing that worked was putting the files manually in ~/.config/r2modman-plus/cache/[folder name]/[version]
That's because it looks up from the cache if it's already installed. It skips the download and extract phase.
There is no other workaround for this at the moment, and it's fairly high effort. Given there are like two packages that cause this, it's not a primary concern right now.