GithubHelp home page GithubHelp logo

tpill90 / epic-lancache-prefill Goto Github PK

View Code? Open in Web Editor NEW
40.0 1.0 4.0 3.92 MB

CLI tool to automatically prime a Lancache with Epic Launcher games

Home Page: https://tpill90.github.io/epic-lancache-prefill/

License: MIT License

C# 93.73% PowerShell 3.32% Shell 2.14% Dockerfile 0.81%
epic-games epic-games-client epic-games-launcher lancache lancachenet

epic-lancache-prefill's Introduction

epic-lancache-prefill's People

Contributors

comfuzio avatar joly0 avatar nurtic-vibe avatar tpill90 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

epic-lancache-prefill's Issues

Fornite can't be downloaded

I added Fornite and get this error:

[4:37:22 PM] Starting Fortnite
[4:37:23 PM] Unexpected download error : Index was outside the bounds of the array. Skipping app...

Other apps work fine.

I worked after I a
./EpicPrefill clear-cache

"Cannot get the value of a token type 'Number' as a string"

Encountered this error upon first run of the select-apps command. Looks like the root error is "Cannot get the value of a token type 'Number' as a string"

System.Text.Json.JsonException: The JSON value could not be converted to System.Collections.Generic.List`1[
System.String]. Path: $[0] | LineNumber: 0 | BytePositionInLine: 8.
System.InvalidOperationException: Cannot get the value of a token type 'Number' as a string.
at string System.Text.Json.Utf8JsonReader.GetString()
at bool System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(ref Utf8JsonReader , Type ,
JsonSerializerOptions , ref ReadStack , out TCollection )
at bool System.Text.Json.Serialization.JsonConverter`1.TryRead(ref Utf8JsonReader , Type ,
JsonSerializerOptions , ref ReadStack , out T )
at T System.Text.Json.Serialization.JsonConverter`1.ReadCore(ref Utf8JsonReader , JsonSerializerOptions ,
ref ReadStack )
at void System.Text.Json.ThrowHelper.ReThrowWithPath(ref ReadStack , in Utf8JsonReader , Exception )
at T System.Text.Json.Serialization.JsonConverter`1.ReadCore(ref Utf8JsonReader , JsonSerializerOptions , ref
ReadStack )
at TValue System.Text.Json.JsonSerializer.ReadFromSpan(ReadOnlySpan , JsonTypeInfo , int? )
at TValue System.Text.Json.JsonSerializer.ReadFromSpan(ReadOnlySpan , JsonTypeInfo )
at TValue System.Text.Json.JsonSerializer.Deserialize(string , JsonTypeInfo )
at List EpicPrefill.EpicGamesManager.LoadPreviouslySelectedApps()
at async Task<List> EpicPrefill.CliCommands.SelectAppsCommand.BuildTuiAppModelsAsync(EpicGamesManager
epicManager)
at async ValueTask EpicPrefill.CliCommands.SelectAppsCommand.ExecuteAsync(IConsole console)
image

System.InvalidOperationException: Sequence contains no matching element

Describe the bug
When I run EpicPrefill prefill -f I get the error: "System.InvalidOperationException: Sequence contains no matching element"

Additional Details

  • Platform you are running EpicPrefill on:

Debian GNU/Linux 11

Linux lancache 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux on bare metal

  • Discord Username (if you are part of the Lancache Discord Server) : billcat
  • Region : Central US

Screenshots
user1@lancache:/EpicPrefill$ ./update.sh
Checking for latest version
Found latest version : 1.1.1
Downloading...
EpicPrefill-1.1.1-linux-x64.zip 100%[======================================================================================================================>] 12.67M --.-KB/s in 0.1s
Unzipping...
Complete!
user1@lancache:
/EpicPrefill$ ./EpicPrefill clear-cache
[10:25:49 AM] Found 3 cached files, totaling 2.61 MiB
[10:25:50 AM] Done!
user1@lancache:~/EpicPrefill$ ./EpicPrefill prefill -f
[10:26:06 AM] Reusing existing auth session...
[10:26:06 AM] Retrieving owned apps
[10:26:10 AM] Loaded new app metadata for 16 apps
[10:26:10 AM] Retrieved 16 apps 03.7645

[10:26:10 AM] Starting Satisfactory Early Access
[10:26:10 AM] Downloaded manifest 00.0498
[10:26:11 AM] Downloading 9.02 GiB
[10:26:11 AM] Detected Lancache server at localhost [127.0.0.1]
[10:26:17 AM] Finished in 06.3728 - 12.15 Gbit/s

[10:26:17 AM] Starting Satisfactory Experimental
[10:26:17 AM] Downloaded manifest 00.0437
[10:26:17 AM] Downloading 9.02 GiB
[10:26:23 AM] Finished in 05.9489 - 13.02 Gbit/s

ERROR
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 , Func2 )
at EpicPrefill.EpicGamesManager.DownloadMultipleAppsAsync(Boolean downloadAllOwnedGames, List1 manualIds) at EpicPrefill.CliCommands.PrefillCommand.ExecuteAsync(IConsole console) at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in /D:\a\CliFx\CliFx\CliFx\CliApplication.cs:147 at CliFx.CliApplication.RunAsync(IReadOnlyList1 commandLineArguments, IReadOnlyDictionary`2 environmentVariables) in /D:\a\CliFx\CliFx\CliFx\CliApplication.cs:191
user1@lancache:~/EpicPrefill$

epic prefill missing # of apps completed

Other prefill apps show the following at the end of each run:

Prefilled 3 apps in 25.8501

Suggest this be added to EpicPrefill so we can compare one vs the other. :)

Thanks again for the awesome work on this solid solution!

Login fails with 400 (Bad request)

When attempting to initially login with an Epic Games account using the select-apps option, it produces the following output:
:~/EpicPrefill-1.1.0-linux-x64$ ./EpicPrefill select-apps
[1:28:40 PM] Please login into Epic via your browser
[1:28:40 PM] If the web page did not open automatically, please manually open the following URL: https://legendary.gl/epiclogin
Please enter the authorizationCode from the JSON response: [redacted]
System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
at HttpResponseMessage System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at async Task EpicPrefill.Handlers.UserAccountManager.LoginAsync()
at async Task EpicPrefill.EpicGamesManager.InitializeAsync()
at async ValueTask EpicPrefill.CliCommands.SelectAppsCommand.ExecuteAsync(IConsole console)

I will update when I find out if the account has any additional MFA or other limitations that may be out of the ordinary.
When using a different account, login worked successfully.

Discord name: Ed/Megabeard

[Bug] Update script still looking for SteamPrefill

Hi, was trying to get this prefill working but before starting the program i started the update.sh script
I was presented with an error so i took a look into the script and found that the #unzip and below it is still looking for SteamPrefill instead off EpicPrefill:
# Unzip
echo -e "${Yellow} Unzipping... ${NC}"
unzip -q -j -o SteamPrefill-${LATEST_TAG}-linux-x64.zip

# Required so executable permissions don't get overwritten by unzip
chmod +x SteamPrefill update.sh

# Cleanup
rm SteamPrefill-${LATEST_TAG}-linux-x64.zip

When i change the SteamPrefill to EpicPrefill the script runs without errors :)

Switch docs over to using variable replacement

Describe the bug
A clear and concise description of what the bug is.

Additional Details

  • Platform you are running EpicPrefill on: [e.g Windows, Linux, Docker]
  • Discord Username (if you are part of the Lancache Discord Server) : [e.g username#0000]
  • Region : [e.g US East Coast, Germany, Australia]

Screenshots
If applicable, add screenshots to help explain your problem.

Unexpected download error : Response status code does not indicate success: 401 (Unauthorized). Skipping app...

After 8 hours of prefill. I get errors for the rest of the list.

[3:35:54 PM] Starting theHunter: Call of the WildT
[3:35:54 PM] Unexpected download error : Response status code does not indicate success: 401 (Unauthorized).  Skipping app...

[3:35:54 PM] Starting while True: learn()
[3:35:54 PM] Unexpected download error : Response status code does not indicate success: 401 (Unauthorized).  Skipping app...

[3:35:54 PM] Prefill complete!
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  Prefilled 269 apps in 8:15:52.46

   Updated โ”‚ Up To Date โ”‚ Failed
  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
     30    โ”‚     56     โ”‚  183

Getting 508 Response error

Describe the bug
Using the Docker image, fresh install today and showing the below error after running the select-apps option

[1:01:57 AM] Selected 13 apps to prefill!
[1:01:58 AM] Retrieving owned apps
[1:01:59 AM] Retrieved 41 apps                                   00.1535

[1:01:59 AM] Starting Destiny 2
[1:01:59 AM] Unexpected download error : Response status code does not indicate success: 508 ().
Skipping app...

Additional Details

  • Platform you are running EpicPrefill on: Docker
  • Discord Username:
  • Region :

Fortnite Download From Cache Only Completes to 28%

Describe the bug
When going through the LAN-Cache, Fortnite only completes to 28%. It doesn't matter which computer in the house I use. Epic Games launcher shows the download rate drop to 0 instantly once it reachs 28% downloaded. Filesystem was XFS on a 6TB HDD.

Additional Details

  • unRAID Server - Lancache, Lancache-DNS, and Lancache-Prefill in Docker
  • ZurkeyDurkey
  • Region : US West Coast

Screenshots
If applicable, add screenshots to help explain your problem.
access.log

update.sh always updates regardless of being up to date

Describe the bug
A clear and concise description of what the bug is.

Additional Details

  • Platform you are running EpicPrefill on: [e.g Windows, Linux, Docker]
  • Discord Username (if you are part of the Lancache Discord Server) : [e.g username#0000]
  • Region : [e.g US East Coast, Germany, Australia]

Screenshots
If applicable, add screenshots to help explain your problem.

download does not progress

Enviroment:

  • LanCache 192.168.1.30 running on Unraid
  • LanCacheDNS 192.168.1.33 running on Unraid
  • LanCachePrefill running on Unraid

What works:

  • Steam Prefill works fine
  • Battle.net Prefill works fine
  • All gamelaunchers (Epic, steam, EA, battlenet, GoG) work fine on my windows machines and use the LanCache. In the image below you can see the Epic Launcher download Fortnite which goes through the LanCache at the maximum speed of my internet connection (Fornite was not in the LanCache yet)

epic_launcher

What does not work:

While I can completelly configure EpicPrefill in both the Unraid Docker as well as the standanlone windows application, the prefill download does not progress and stays at 0% with no network traffic.

The bandwitdh value shown in the Unraid Docker version is "broken" as it shows several Gbps which my internet connection is not capable of - also there is no progress and no drive activity on my LanCache nvme.

Unraid_docker

The bandwitdh indicator in the windows build is more accurate as there is no traffic.

windows

LanCache Logs:
These are the logs from an attempt to prefill City Skylines

upstream-error.log
error.log
access.log
LanCache_access.log

Games tested with Unraid Prefill docker as well as the windows build:

  • Cities Skylines - fails/no progress
  • Fortnite - fails/no progress
  • Doom 64 - fails/no progress
  • Enter the Gungeon - fails/no progress
  • Rise of the Tomb Raider: 20 Year Celebration - fails/no progress

With the Epic Launcher I can download these games, even on the same machine where the EpicPrefill.exe does not produce any download traffic.

Use EpicPrefill on a game that is already in the LanCache

  1. I used the Epic Launcher to download Cities Skylines through the LanCache
  2. then I launched epicprefill.exe selected Cities Skylines and choose Yes to prefill

Result: EpicPrefill.exe "downloads" everything that the EpicLauncher put in the lancache.

cachedGame

Documentation Updates

  • Switch docs over to using variable replacement version of the documentation.
  • Add python script to generate .svg screenshots from .ansi files, and update readme with new images. See : tpill90/steam-lancache-prefill#308
  • Add copy button to MKdocs code snippets. See pull request tpill90/steam-lancache-prefill#309
  • Install section in readme should match SteamPrefill's install section.
  • FAQ
    • Can I download games that I don't own?
  • Write documentation for select-apps on detailed command usage page.
  • Remove references to SteamPrefill from documentation

Missing `--nocache`

Unlike BattleNetPrefill and SteamPrefill, EpicPrefill does not contain --nocache flag, and/or it is not working.

Consider a situation where one has a Lancache and for example deletes the cache, then runs ./EpicPrefill prefill, the prefill will just tell user "nothing to download", which is not true, as the actual cache is empty.

..or is the EpicPrefill so wise that it can deal with a situation as mentioned above? If so, then both BattleNetPrefill and SteamPrefill would need the same kind of brains.

image

Unexpected download error : A connection attempt failed because the connected party did not properly

[10:02:12 AM] Starting A Short Hike [10:02:34 AM] Unexpected download error : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (fastly-download.epicgames.com:443) Skipping app...

From a PCAP (172.16.1.40 is lancache instance):
36 3.755003 172.16.1.100 172.16.1.40 TCP 66 53437 โ†’ 443 [SYN] Seq=0 Win=62720 Len=0 MSS=8960 WS=256 SACK_PERM

Same instance works fine using epicprefill on OSX

Trying to see why its requesting port 443 on .exe but 80 on the OSX version

From OSX
104 10.082232 172.16.1.110 172.16.1.40 TCP 78 62416 โ†’ 80 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=64 TSval=2083870588 TSecr=0 SACK_PERM=1

Feature request - Total data downloaded

If you could, print this at the end of each run, then we could see what du -h shows and compare to see what's in the cache on disk vs just now downloaded.

Having this in all three programs would be great because then you can bash script running each of them and see what the total is.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.