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

v9.2.0 error when negotiating with Blessing Skin auth server #50

Open
1 task done
TechnoSparks opened this issue Jan 12, 2025 · 5 comments
Open
1 task done

v9.2.0 error when negotiating with Blessing Skin auth server #50

TechnoSparks opened this issue Jan 12, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@TechnoSparks
Copy link

TechnoSparks commented Jan 12, 2025

Operating System

Windows

Version of Fjord Launcher

v9.2.0

Version of Qt

v6.7.3

Description of bug

When launching an instance using an account of a Blessing Skin instance, the game fails to launch with this error:
image

Upon checking the logs, i get this: (true domain name is removed to prevent unwanted to request to my server)

0.586 D | [launcher.task.net.upload]: "{e8a0d3c0-4f61-4925-aeaa-04b27ead0034}" Runninng  "https://example.com/api/yggdrasil/authserver/refresh"
0.597 D | Dir changed: "C:/Users/TechnoSparks/AppData/Roaming/FjordLauncher/translations"
0.677 D | Dir changed: "C:/Users/TechnoSparks/AppData/Roaming/FjordLauncher/translations"
0.678 D | Got translations index!
0.931 C | [launcher.task.net.upload]: "{e8a0d3c0-4f61-4925-aeaa-04b27ead0034}" Failed "https://example.com/api/yggdrasil/authserver/refresh" with reason QNetworkReply::ProtocolInvalidOperationError
0.931 C | [launcher.task.net.upload]: "{e8a0d3c0-4f61-4925-aeaa-04b27ead0034}" HTTP Status 400 ;error "Error transferring https://example.com/api/yggdrasil/authserver/refresh - server replied: Bad Request"
0.931 D | [launcher.task.net.upload]: "{e8a0d3c0-4f61-4925-aeaa-04b27ead0034}" Request failed in previous step: "https://example.com/api/yggdrasil/authserver/refresh"
0.931 D | Yggdrasil request done
0.931 D | RefreshSchedule: Background account refresh failed:  "Authentication operation failed due to a network error: Error transferring https://example.com/api/yggdrasil/authserver/refresh - server replied: Bad Request (302)"
  • This does not happen when I revert to 9.1.0 means my blessing skin auth server is not the underlying cause.
  • I tried removing and readding the account.
    • Addition succeeds, with column "Status" saying "Ready". See log [2] below
    • But when I hit button "Refresh", "Status" turns into "Errored"

LOG 2

699.017 D | [launcher.task.net.upload]: "{be4b7ca0-027d-425e-8611-b45868c27ff4}" Runninng  "https://example.com/api/yggdrasil"
699.317 D | [launcher.task.net.upload]: "{be4b7ca0-027d-425e-8611-b45868c27ff4}" Request succeeded: "https://example.com/api/yggdrasil"
699.317 D | AuthFlow: "Logging in with Yggdrasil."
699.317 D | [launcher.task.net.upload]: "{3b10bd5e-531d-49ae-997a-1ec22ae2e0dd}" Runninng  "https://example.com/api/yggdrasil/authserver/authenticate"
699.662 D | [launcher.task.net.upload]: "{3b10bd5e-531d-49ae-997a-1ec22ae2e0dd}" Request succeeded: "https://example.com/api/yggdrasil/authserver/authenticate"
699.662 D | Yggdrasil request done
699.662 D | Getting access token.
699.662 D | AuthFlow: "Fetching the Minecraft profile."

Steps to reproduce

  • Set a drasl server account as default
  • Launch an instance
  • Observe error dialog
  • Check logs

Suspected cause

Possible bad/malformed URI request when Fjord Launcher contact the /request API endpoint

This issue is unique

  • I have searched the issue tracker and did not find an issue describing my bug.
@TechnoSparks TechnoSparks added the bug Something isn't working label Jan 12, 2025
@evan-goode
Copy link
Member

Strange, I couldn't reproduce it just now on 9.2.0 with an account on https://skin.prinzeugen.net. Does your BS account have multiple players?

I tried on another public Blessing Skin server, https://skin.meowserver.cn, and neither Fjord Launcher 9.1.0 nor 9.2.0 successfully refreshed after logging in. The server replied with code 400 and:

{
    "error": "IllegalArgumentException",
    "errorMessage": "The player requested doesn't match with that token."
}

so this could be a Blessing Skin bug.

I didn't notice anything different about the /refresh request between 9.1.0 and 9.2.0, and Ely.by and Drasl authenticate and refresh correctly on 9.2.0.

If it is indeed a regression, this could be the fault of #41. Could you double-check removing and re-adding the account on 9.1.0 and see if you get the same error?

If you are able, could you try man-in-the-middling the /authenticate and /refresh HTTP requests using mitmproxy or similar, and posting the request and response bodies?

@evan-goode
Copy link
Member

OK, this might be caused by sending selectedProfile in /refresh when we don't need to, I'll prepare a PR to fix that.

@TechnoSparks
Copy link
Author

TechnoSparks commented Jan 12, 2025

Strange, I couldn't reproduce it just now on 9.2.0 with an account on https://skin.prinzeugen.net. Does your BS account have multiple players?

You had just unlocked a forgotten memory! Initially when i set up the private auth server, yes, but due to some sporadic error when adding an account, I manage to nail down the problem to having multiple players. The error was basically I couldn't authenticate myself sometimes despite having the correct player name. Using email directly bypass this problem altogether, but the user will have no choice in which player to play. I cannot recall how BS choose which player if we use email login. To solve that I used "Single Player Limitation" plugin on my BS server and everything work well. So now the answer is no. Each account can only have 1 player.

Unfortunately I am unable to recall which version of Fjord Launcher i was using when I encountered this problem. I will test having multiple players again when I have the chance.

If it is indeed a regression, this could be the fault of #41. Could you double-check removing and re-adding the account on 9.1.0 and see if you get the same error?

I tried it just now and no I do not get any error. 9.1.0 works flawlessly.

If you are able, could you try man-in-the-middling the /authenticate and /refresh HTTP requests using mitmproxy or similar, and posting the request and response bodies?

I am not familiar with mitmproxy, so I will need some time to learn it and will report back to you.

evan-goode added a commit that referenced this issue Jan 13, 2025
Some authentication servers (Blessing Skin) care when selectedProfile is
sent on POST /refresh but the clientToken is already bound to a profile.
We should only include selectedProfile in POST /refresh during the
initial "Add authlib-injector account" process when selecting a profile
from multiple availableProfiles.

For #50
@evan-goode
Copy link
Member

Can you see whether #51 fixes this for you? I think there will be Windows builds with the patch available at https://github.com/unmojang/FjordLauncher/actions/runs/12740359805?pr=51 when the automated CI job finishes.

@evan-goode
Copy link
Member

Using email directly bypass this problem altogether, but the user will have no choice in which player to play.

By the way, this is fixed as of Fjord Launcher 9.2.0. There is now a dialog to select a player when there are multiple available players. (That same patchset is probably what broke Blessing Skin)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants