Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

huge download did not extract properly and the chunks got deleted (I did a temporary scratch patch that helped to workaround only, not to commit) #20

Open
AquariusPower opened this issue Oct 17, 2021 · 1 comment

Comments

@AquariusPower
Copy link

AquariusPower commented Oct 17, 2021

after downloading more than 30 assets w/o a problem,
the infiltrator demo, 7.7GB in chunks files became 7.2GB after extracted,
the problem was out of free HD space, so many files were missing in the end,
there is no validation neither check for free space prior to extraction.

if it could trash instead of delete the files,
or just do not delete them, I could just retry extracting.
I had to re-download everything (took me 5 hours) as in the ext4 filesystem (linux) it is impossible to recover deleted files.

I patched like this on epicApi.js:

    function onExtractionComplete()
    {
        //console.log("Deleting chunks after extraction");
        console.log("NOT deleting chunks after extraction");
        ///TODO: Delete chunks as they are not needed (but a chunk can be used more than once).
        //deleteDir(chunkBasePath, function ondel()
        //{
            //assetsData[id][appId].extracted = true;
            //saveAssetsData(ondone);
        //});
        assetsData[id][appId].extracted = true;
        saveAssetsData(ondone);
    }
@AquariusPower
Copy link
Author

AquariusPower commented Oct 18, 2021

it works, the chunks remained there after extraction,
now, to be able to re-download I had to edit assets.json and, for the infiltrator demo, change to:
"downloaded":false,"extracted":false
before restarting this launcher.

The kept downloaded chunks can be used for re-extracting, we just need to set:
"downloaded":true,"extracted":false before restarting this launcher,
and you need to be online (a patch could let we do it offline too I guess).

Btw, if weird errors happen, most are related to connection problems, just retry a few times the download (I suggest at least 5 times), and/or restart the launcher a few times too, or try another time or day.
Also, make it sure the asset version you want is really available online, if you ask for and there is nothing to UE4.27, only for UE4.26, it will fail.

It is better now I think,
I can keep the compressed chunks to re-extract again later if I want,
and now I can move (instead of copy) the extracted folder!

If you are going to try this, better move the folders
UE4LauncherUnnoficial/UE4Launcher/cache/assets to UE4LauncherUnnoficial/assets and
UE4LauncherUnnoficial/UE4Launcher/node_modules to UE4LauncherUnnoficial/node_modules and
then symlink them to their original places.
This way you can create small backups of the UE4LauncherUnnoficial/UE4Launcher/ folder to easily restore if something weird happens.

This could be a nice patch:

  • keep the compressed chunks
  • let the chunks be extracted offline

@AquariusPower AquariusPower changed the title huge download did not extract properly and the chunks got deleted huge download did not extract properly and the chunks got deleted (I did a temporary scratch patch that helped to workaround only, not to commit) Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant