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

It does not show the percentage while downloading. #27

Closed
CleoMenezesJr opened this issue Jan 10, 2021 · 35 comments
Closed

It does not show the percentage while downloading. #27

CleoMenezesJr opened this issue Jan 10, 2021 · 35 comments

Comments

@CleoMenezesJr
Copy link

Hey! Good job, I realy appreciate it. Take a look at this little problem.
So nice brand new interface.
image

@KaffeinatedKat
Copy link

Im having this issue also, but upon checking the system moniter legendary is using the network and writing to the disk so it is downloading just not showing up on the app

@CleoMenezesJr
Copy link
Author

Before closing it showed a pop up saying that the download would be canceled. Then I realized that it was just a frontend problem.

@CleoMenezesJr CleoMenezesJr changed the title It does not install and only the percent sign appears. It does not show the percentage while downloading. Jan 10, 2021
@mandalsayantan
Copy link

Yup! Same problem here! But otherwise excellent work! Keep it coming!

@flavioislima
Copy link
Member

Hi!
I cannot reproduce the issue. This is happening just after clicking install or it shows the percentage and then after leaving and returning back to the game page?

@flavioislima
Copy link
Member

Can you check if a file is being created on the .config/legendary with the installation log?
Right now the percentage works like this:

  • You click install
  • Then heroic calls legendary install game and outputs it to a log file on .config/legendary folder with the appName (not the title) and the log extension.
  • Then on the frontend, I call a function to read this log every two seconds.
  • The function is a very simple shell command:
  • tail .config/legendary/appName.log | grep 'Progress: ' | awk '{print $5}'

Unless your system does not have these commands, that I think every Linux system has, I mean: tail, grep and awk. It should work.
But it worth the check.

@intelligentgaming
Copy link

I can confirm it does not show a percentage when downloading a game, but it definitely works since it created the installation folder, and legendary processes are running whilst the game is downloading, plus the game launched when the process was completed.

I replicated this behaviour using the appimage and .deb installation.

Kubuntu 20.10

@flavioislima
Copy link
Member

@intelligentgaming can you check the things I asked above?

@flavioislima
Copy link
Member

Check if the behavior is something like this, it can take a few seconds before starting updating the percentage:
https://user-images.githubusercontent.com/26871415/104132415-71c9cc80-537d-11eb-900b-52cdbadf0668.mp4

@intelligentgaming
Copy link

intelligentgaming commented Jan 10, 2021

@intelligentgaming can you check the things I asked above?

Yes, although your bash command does not work for me.

See below for the process from start to finish, the game downloads correctly using Legendary, just as OP mentions, the progress percentage is just not there.

https://1drv.ms/u/s!Ap93cujfk9D8zwkOacTnB1bGNxJh?e=OxirLQ

@mandalsayantan
Copy link

mandalsayantan commented Jan 10, 2021 via email

@intelligentgaming
Copy link

intelligentgaming commented Jan 10, 2021

Also, I found that I am losing frames when the game is installed and launched through Heroic! This problem seems to disappear when launched through Epic + Lutris!

That's not surprising if you are using system Wine, as the version used by Lutris uses a version of Wine optimised for gaming.

If you choose the Lutris version of Wine through the Settings menu, does it resolve the issue (see below)?

image

@mandalsayantan
Copy link

mandalsayantan commented Jan 10, 2021 via email

@CleoMenezesJr
Copy link
Author

So, I Installed the new version and it keeps with the same issue. ;/

@CleoMenezesJr
Copy link
Author

I about to realize that thais percent appers then install too.
image

@flavioislima
Copy link
Member

@intelligentgaming can you check the things I asked above?

Yes, although your bash command does not work for me.

See below for the process from start to finish, the game downloads correctly using Legendary, just as OP mentions, the progress percentage is just not there.

https://1drv.ms/u/s!Ap93cujfk9D8zwkOacTnB1bGNxJh?e=OxirLQ

I see, good to know then that not all distros have those 3 commands. Can you check which one is not working, I imagine is awk, but just to be sure, put awk on the terminal to check. I guess grep and tail exists, right? So I'll need to investigate the package that installs those things and add as a dependency. On Manjaro all 3 comes installed by default so that's why I can't see the bug.

@flavioislima
Copy link
Member

@CleoMenezes which Distro are you using?

@flavioislima
Copy link
Member

Can you both install the package called gawk and see if the issue is solved?
It's this package that provides the command I'm using to get the percentage out of the log:
https://packages.ubuntu.com/search?keywords=gawk

@intelligentgaming
Copy link

@intelligentgaming can you check the things I asked above?

Yes, although your bash command does not work for me.
See below for the process from start to finish, the game downloads correctly using Legendary, just as OP mentions, the progress percentage is just not there.
https://1drv.ms/u/s!Ap93cujfk9D8zwkOacTnB1bGNxJh?e=OxirLQ

I see, good to know then that not all distros have those 3 commands. Can you check which one is not working, I imagine is awk, but just to be sure, put awk on the terminal to check. I guess grep and tail exists, right? So I'll need to investigate the package that installs those things and add as a dependency. On Manjaro all 3 comes installed by default so that's why I can't see the bug.

That might explain it, I'm using Kubuntu 20.10, but just checked on my Garuda installation, and all three do come preinstalled.

@intelligentgaming
Copy link

Can you both install the package called gawk and see if the issue is solved?
It's this package that provides the command I'm using to get the percentage out of the log:
https://packages.ubuntu.com/search?keywords=gawk

Will do, once I'm home tonight.

@Beanow
Copy link

Beanow commented Jan 11, 2021

Can you check if a file is being created on the .config/legendary with the installation log?

@flavioislima I'm having the same issue.
For me the log files are being created, but they remain 0 bytes all the way until after completing the install.
Tail, grep and awk are available, there just aren't any logs being output there.

@intelligentgaming
Copy link

Installed gawk, but the issue is not resolved.

@MrAn0nym
Copy link

Having the same issue on ubuntu

@flavioislima
Copy link
Member

Can you try on new release? I did some changes. Also, try running it from the terminal and let me know if the progress is being show there. Because if it works on the terminal then it is something on the frontend.

I'm also preparing a Ubuntu VM to test it because the issue seems to be only with distros related wit it.

@MequeLovin
Copy link

Same problem, Ubuntu 20.10, Heroic 1.1.0, gawk already installed.

image
whenever I try to install, it just says "installing"

This is the output I get, before cancelling the installation:

Installing Morganite with: /opt/heroic/resources/app.asar.unpacked/build/bin/legendary install Morganite --base-path ~/Games/Heroic -y &> /home/user/.config/heroic/GamesConfig/Morganite.log
Install Progress:
Install Progress:
Install Progress:
Install Progress:
Install Progress:
Install Progress:
Install Progress:
Install Progress:
Install Progress:
Install Progress:
killing Morganite

It just keeps showing "Install Progress: " without any numbers or percentage attached to it.

This is the output I get after cancelling the installation:

{
stdout: '',
stderr: '[Core] INFO: Trying to re-use existing login session...\n' +
'[cli] INFO: Preparing download...\n' +
'[Core] INFO: Parsing game manifest...\n' +
'[Core] INFO: Install path: /home/user/Games/Heroic/SludgeLife\n' +
'[DLM] INFO: Found previously interrupted download. Download will be resumed if possible.\n' +
'[DLM] INFO: Skipping 149 files based on resume data.\n' +
'[cli] INFO: Install size: 690.20 MiB\n' +
'[cli] INFO: Download size: 294.72 MiB (Compression savings: 19.9%)\n' +
'[cli] INFO: Reusable size: 0.00 MiB (chunks) / 326.06 MiB (unchanged / skipped)\n' +
'[cli] INFO: Downloads are resumable, you can interrupt the download with CTRL-C and resume it using the same command later on.\n' +
'[DLManager] INFO: Download Manager running with process-id: 38230\n' +
'[DLManager] INFO: Starting download workers...\n' +
'[DLManager] INFO: Starting file writing worker...\n' +
'[DLManager] INFO: = Progress: 0.00% (0/379), Running for 00:00:00, ETA: 00:00:00\n' +
'[DLManager] INFO: - Downloaded: 0.00 MiB, Written: 0.00 MiB\n' +
'[DLManager] INFO: - Cache usage: 2.0 MiB, active tasks: 1\n' +
'[DLManager] INFO: + Download\t- 0.00 MiB/s (raw) / 0.00 MiB/s (decompressed)\n' +
'[DLManager] INFO: + Disk\t- 0.00 MiB/s (write) / 0.00 MiB/s (read)\n' +
'[DLManager] INFO: = Progress: 0.00% (0/379), Running for 00:00:00, ETA: 00:00:00\n' +
'[DLManager] INFO: - Downloaded: 0.96 MiB, Written: 0.00 MiB\n' +
'[DLManager] INFO: - Cache usage: 33.0 MiB, active tasks: 32\n' +
'[DLManager] INFO: + Download\t- 0.96 MiB/s (raw) / 1.00 MiB/s (decompressed)\n' +
'[DLManager] INFO: + Disk\t- 0.00 MiB/s (write) / 0.00 MiB/s (read)\n' +
'[DLManager] INFO: = Progress: 0.00% (0/379), Running for 00:00:00, ETA: 00:00:00\n' +
'[DLManager] INFO: - Downloaded: 2.64 MiB, Written: 0.00 MiB\n' +
'[DLManager] INFO: - Cache usage: 35.0 MiB, active tasks: 32\n' +
'[DLManager] INFO: + Download\t- 1.68 MiB/s (raw) / 2.00 MiB/s (decompressed)\n' +
'[DLManager] INFO: + Disk\t- 0.00 MiB/s (write) / 0.00 MiB/s (read)\n' +
'[DLManager] INFO: = Progress: 0.53% (2/379), Running for 00:00:03, ETA: 00:09:26\n' +
'[DLManager] INFO: - Downloaded: 10.06 MiB, Written: 1.69 MiB\n' +
'[DLManager] INFO: - Cache usage: 41.0 MiB, active tasks: 32\n' +
'[DLManager] INFO: + Download\t- 7.41 MiB/s (raw) / 7.99 MiB/s (decompressed)\n' +
'[DLManager] INFO: + Disk\t- 1.68 MiB/s (write) / 0.00 MiB/s (read)\n' +
'[DLManager] INFO: = Progress: 4.22% (16/379), Running for 00:00:04, ETA: 00:01:30\n' +
'[DLManager] INFO: - Downloaded: 18.99 MiB, Written: 15.69 MiB\n' +
'[DLManager] INFO: - Cache usage: 36.0 MiB, active tasks: 32\n' +
'[DLManager] INFO: + Download\t- 8.92 MiB/s (raw) / 8.99 MiB/s (decompressed)\n' +
'[DLManager] INFO: + Disk\t- 13.98 MiB/s (write) / 0.00 MiB/s (read)\n' +
'[DLManager] INFO: = Progress: 4.22% (16/379), Running for 00:00:05, ETA: 00:01:53\n' +
'[DLManager] INFO: - Downloaded: 21.81 MiB, Written: 15.69 MiB\n' +
'[DLManager] INFO: - Cache usage: 39.0 MiB, active tasks: 32\n' +
'[DLManager] INFO: + Download\t- 2.82 MiB/s (raw) / 3.00 MiB/s (decompressed)\n' +
'[DLManager] INFO: + Disk\t- 0.00 MiB/s (write) / 0.00 MiB/s (read)\n' +
'[DLManager] INFO: = Progress: 4.22% (16/379), Running for 00:00:06, ETA: 00:02:16\n' +
'[DLManager] INFO: - Downloaded: 29.44 MiB, Written: 15.69 MiB\n' +
'[DLManager] INFO: - Cache usage: 47.0 MiB, active tasks: 32\n' +
'[DLManager] INFO: + Download\t- 7.62 MiB/s (raw) / 7.99 MiB/s (decompressed)\n' +
'[DLManager] INFO: + Disk\t- 0.00 MiB/s (write) / 0.00 MiB/s (read)\n' +
'[DLManager] INFO: = Progress: 4.22% (16/379), Running for 00:00:07, ETA: 00:02:39\n' +
'[DLManager] INFO: - Downloaded: 31.19 MiB, Written: 15.69 MiB\n' +
'[DLManager] INFO: - Cache usage: 49.0 MiB, active tasks: 32\n' +
'[DLManager] INFO: + Download\t- 1.75 MiB/s (raw) / 2.00 MiB/s (decompressed)\n' +
'[DLManager] INFO: + Disk\t- 0.00 MiB/s (write) / 0.00 MiB/s (read)\n' +
'[DLManager] INFO: = Progress: 8.71% (33/379), Running for 00:00:08, ETA: 00:01:24\n' +
'[DLManager] INFO: - Downloaded: 45.07 MiB, Written: 32.69 MiB\n' +
'[DLManager] INFO: - Cache usage: 47.0 MiB, active tasks: 32\n' +
'[DLManager] INFO: + Download\t- 13.86 MiB/s (raw) / 14.98 MiB/s (decompressed)\n' +
'[DLManager] INFO: + Disk\t- 16.98 MiB/s (write) / 0.00 MiB/s (read)\n' +
'multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown\n'
}

@flavioislima
Copy link
Member

@MequeLovin Can you upload the installation log here? You can find it on your .config/heroic/GamesConfig.

And also do the following command on your terminal:
tail .config/heroic/GamesConfig/*.log | grep 'Progress: ' | awk '{print $5}'

@MequeLovin
Copy link

I can, but there are many logs in the folder, all of them with seemingly irrelevant info. Can you tell me which one of them you want?

Ran the command you asked, but nothing happened, I think that's because there were no "Progress" in any of the logs.

@flavioislima
Copy link
Member

check the latest one. The installation logs are named only: 'something'.log. The others .log are play logs.
You can pick any of those 'something'.log this something is the internal game name.

@MequeLovin
Copy link

I'm afraid my "something.log" (1fe19232c0f7476a8e99fd8752e800c2.log) is empty, can't even upload it.

@flavioislima
Copy link
Member

That might be the issue. For some reason, the logs aren't being stored on a file on some distros. I"m finishing setting up a Ubuntu VM to investigate it more. So far, only ubuntu based distros seems to have the issue.

Because, on Heroic what I do is to store the output of the installation in those log files and then every one second I read it to get the percentage, so if the log is empty, it will return nothing on the frontend as well. Even though the game is installing.

@flavioislima
Copy link
Member

Using a Ubuntu VM I was able to find the issue. I'll release a new version later with the fix.

@intelligentgaming
Copy link

Using a Ubuntu VM I was able to find the issue. I'll release a new version later with the fix.

Sweet, thanks for taking your time to do this, it's not a deal breaker since the tool still works, but good to know you care about feedback.

@flavioislima
Copy link
Member

Can you try now with the new version:
https://github.com/flavioislima/HeroicGamesLauncher/releases/tag/v1.1.1
?

Thanks

@flavioislima flavioislima moved this from In progress to Done in General Tasks Jan 17, 2021
@MequeLovin
Copy link

Checked it now, when I clicked download I got the same results from before, but when I reloaded the game page, it worked as intended, many thanks!

@flavioislima
Copy link
Member

But it should have worked right away. It can take a few seconds to update, no need to refresh the game page.
On my ubuntu VM it worked the same way as on my Manjaro, where I develop the app.

@MrAn0nym @intelligentgaming @CleoMenezes can you try as well?

@CleoMenezesJr
Copy link
Author

CleoMenezesJr commented Jan 17, 2021

Hey good news!
I purge all the old files and instaled the new version. It is working prety well.
I will keep trying and let will let you know.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
General Tasks
  
Done
Development

No branches or pull requests

8 participants