fn2006 / PollyMC

DRM-free Prism Launcher fork with support for custom auth servers.
GNU General Public License v3.0
754 stars 48 forks source link

Ely.by launch is immensely slow #80

Closed 4310V343k closed 7 months ago

4310V343k commented 1 year ago

Operating System

Windows

Version of PollyMC

PollyMC 7.1

Version of Qt

Qt 6.5.1

Description of bug

When trying to launch minecraft with an ely.by account it takes from very long time to launch to not launching at all. When i switch to an MS account the launch stops at "downloading assets", if I stop it and launch the game again it opens immediately.

Steps to reproduce

Suspected cause

No response

This issue is unique

4310V343k commented 1 year ago

Each first launch with an MS account results in this: image Then I press abort, launch it again and it launches instantly

So I think it is related to file downloading. If PollyMC can't download something related to ely.by (for example authlib-injector) it just stops there. And because there is no "Abort" button when launching through ely.by I can't just retry again

4310V343k commented 1 year ago

Got myself a debug build:

   718.369 D | [launcher.task]: Task "Net::Download(CACHE:https://authlib-injector.yushi.moe/artifact/latest.json ID: 2d970e4a-074e-43f4-a3a2-308278084942)" starting for the first time
   718.370 D | [launcher.task.net.download]: "{2d970e4a-074e-43f4-a3a2-308278084942}" Downloading  "https://authlib-injector.yushi.moe/artifact/latest.json"
   748.387 C | [launcher.task.net.download]: "{2d970e4a-074e-43f4-a3a2-308278084942}" Aborted  "https://authlib-injector.yushi.moe/artifact/latest.json"
   748.388 D | [launcher.task.net.download]: "{2d970e4a-074e-43f4-a3a2-308278084942}" Download aborted in previous step: "https://authlib-injector.yushi.moe/artifact/latest.json"

and it stops there

InjectAuthlib::onDownloadFailed is not called because the download is "aborted", not failed https://github.com/fn2006/PollyMC/blob/bae038846c11c6d2a068fe3623c61aee6fb5d521/launcher/net/Download.cpp#L294-L298

and injectauthlib is never subscribed to it

https://github.com/fn2006/PollyMC/blob/bae038846c11c6d2a068fe3623c61aee6fb5d521/launcher/minecraft/launch/InjectAuthlib.cpp#L120-L123

now to figure out why it can't download the damn json

upd: NetJob::aborted is not triggered at all, except when i press "kill instance" in pollymc (WHYYY)

4310V343k commented 1 year ago
     8.033 D | [launcher.task]: Task "Net::Download(CACHE:https://i18n.prismlauncher.org/index_v2.json ID: 830307ce-7b96-488a-a3a4-fa252bec8db5)" starting for the first time
     8.034 D | [launcher.task.net.download]: "{830307ce-7b96-488a-a3a4-fa252bec8db5}" Downloading  "https://i18n.prismlauncher.org/index_v2.json"
    22.363 D | [launcher.task]: Task "Net::Download(CACHE:https://authlib-injector.yushi.moe/artifact/latest.json ID: 28116a14-8a5b-4cf2-a124-4fe02562e1c6)" starting for the first time
    22.364 D | [launcher.task.net.download]: "{28116a14-8a5b-4cf2-a124-4fe02562e1c6}" Downloading  "https://authlib-injector.yushi.moe/artifact/latest.json"

    38.037 C | [launcher.task.net.download]: "{830307ce-7b96-488a-a3a4-fa252bec8db5}" Aborted  "https://i18n.prismlauncher.org/index_v2.json"
    38.037 D | [launcher.task.net.download]: "{830307ce-7b96-488a-a3a4-fa252bec8db5}" Download aborted in previous step: "https://i18n.prismlauncher.org/index_v2.json"
    52.399 C | [launcher.task.net.download]: "{28116a14-8a5b-4cf2-a124-4fe02562e1c6}" Aborted  "https://authlib-injector.yushi.moe/artifact/latest.json"
    52.399 D | [launcher.task.net.download]: "{28116a14-8a5b-4cf2-a124-4fe02562e1c6}" Download aborted in previous step: "https://authlib-injector.yushi.moe/artifact/latest.json"

   435.964 D | [launcher.task]: Task "Net::Download(CACHE:https://piston-meta.mojang.com/v1/packages/28680197f74e5e1d55054f6a63509c8298d428f9/1.16.json ID: 0347108a-6b3c-4ac2-88a3-7259a933002f)" starting for the first time
   435.970 D | [launcher.task.net.download]: "{0347108a-6b3c-4ac2-88a3-7259a933002f}" Downloading  "https://piston-meta.mojang.com/v1/packages/28680197f74e5e1d55054f6a63509c8298d428f9/1.16.json"
   465.979 C | [launcher.task.net.download]: "{0347108a-6b3c-4ac2-88a3-7259a933002f}" Aborted  "https://piston-meta.mojang.com/v1/packages/28680197f74e5e1d55054f6a63509c8298d428f9/1.16.json"
   465.986 D | [launcher.task.net.download]: "{0347108a-6b3c-4ac2-88a3-7259a933002f}" Download aborted in previous step: "https://piston-meta.mojang.com/v1/packages/28680197f74e5e1d55054f6a63509c8298d428f9/1.16.json"

damn jsons

4310V343k commented 1 year ago

downgraded to polly 6.3, the download took almost 90 seconds to complete but worked in the end in 7.x there is probably a timeout for downloads, which cancels them at 30 seconds, but why does it take so long to download a small json file in the first place

and again, just as with the msa login, once the download finishes one time, for subsequent launches jsons are brought from cache

fn2006 commented 9 months ago

This is still an issue.

fn2006 commented 7 months ago

Should be fixed as a side effect of the rewritten authlib-injector support.