Giter Site home page Giter Site logo

Comments (18)

uetuluk avatar uetuluk commented on July 16, 2024 3

This change is the reason: https://help.minecraft.net/hc/en-us/articles/16254801392141

from voyager.

DeveloperHarris avatar DeveloperHarris commented on July 16, 2024 2

I went ahead and started diving into it, and at least for me, it seems to be an issue with the complete_login function of minecraft-launcher-lib. Specifically on line 355 in microsoft_account.py

account_request = authenticate_with_minecraft(userhash, xsts_token)

returns with a 403 FORBIDDEN.

I've tried completing the flow with and without the client secret, since it's now depreciated but no luck. Always {'path': '/authentication/login_with_xbox', 'error': 'FORBIDDEN'}. Will continue looking into it.

from voyager.

DeveloperHarris avatar DeveloperHarris commented on July 16, 2024 1

Unfortunately the login guide from minecraft-launcher-lib doesn't provide any help here so I ended up digging through the code to try and debug, and while I narrowed it down to the authenticate_with_minecraft() call, I couldn't find any reason why minecraft-launcher-lib was getting a 403 Forbidden error during the Minecraft Oauth2 flow, especially because it successfully authenticated with Microsoft & Xbox, but couldn't authenticate with Minecraft's API.

I'm using my Microsoft account (attached to my Gmail). I recently had to link my Minecraft account to my Microsoft account, so maybe it has something to do with that? Unsure. Either way, I ended up just using the mc_port method to get it to work.

More info on the oauth2 flow can be found at https://wiki.vg/Microsoft_Authentication_Scheme

from voyager.

lukaemon avatar lukaemon commented on July 16, 2024 1

Don't know the reason. I saw in other issue that the author mentioned you have to restart the process manually if the process is disconnected somehow with mc_port. Don't know if other factors are in the play.

from voyager.

DeveloperHarris avatar DeveloperHarris commented on July 16, 2024

Having this issue as well:

Traceback (most recent call last):
  File "/Users/harris/src/voyager-test/main.py", line 12, in <module>
    voyager = Voyager(
  File "/Users/harris/src/Voyager/voyager/voyager.py", line 104, in __init__
    self.env = VoyagerEnv(
  File "/Users/harris/src/Voyager/voyager/env/bridge.py", line 42, in __init__
    self.mc_instance = self.get_mc_instance()
  File "/Users/harris/src/Voyager/voyager/env/bridge.py", line 67, in get_mc_instance
    return MinecraftInstance(
  File "/Users/harris/src/Voyager/voyager/env/minecraft_launcher.py", line 36, in __init__
    self.mc_command = self.get_mc_command()
  File "/Users/harris/src/Voyager/voyager/env/minecraft_launcher.py", line 74, in get_mc_command
    code_url = input()
KeyboardInterrupt

Tried mobile & web but neither worked. Will dive into it to figure out why.

from voyager.

DeveloperHarris avatar DeveloperHarris commented on July 16, 2024

Turns out the error occurs on line 324 of the microsoft_account.py file in microsoft-launcher-lib. For some reason the get_authorization_token() function fails to return the expect JSON .

from voyager.

xieleo5 avatar xieleo5 commented on July 16, 2024

@DeveloperHarris Hi, thanks a lot for your investigation. Since I cannot reproduce this error on my machine. I cannot provide further help. Maybe you can try to read the original login guide from minecraft-launcher-lib or create an issue there. If you have any findings, welcome to share them here.

from voyager.

steppelord avatar steppelord commented on July 16, 2024

Also having this issue, curious are you using a third party microsoft account? E.g. through gmail

from voyager.

tegnike avatar tegnike commented on July 16, 2024

I have same issue.

C:\Users\xxxxx\anaconda3\lib\site-packages\minecraft_launcher_lib\microsoft_account.py

def authenticate_with_minecraft(userhash: str, xsts_token: str) -> MinecraftAuthenticateResponse:
    """
    Authenticate with Minecraft
    """
    parameters = {
        "identityToken": f"XBL3.0 x={userhash};{xsts_token}"
    }
    header = {
        "Content-Type": "application/json",
        "user-agent": get_user_agent(),
        "Accept": "application/json"
    }
    r = requests.post("https://api.minecraftservices.com/authentication/login_with_xbox", json=parameters, headers=header)
    import pdb; pdb.set_trace() 
    return r.json()
(Pdb) r
--Return--
> c:\users\xxxxx\anaconda3\lib\site-packages\minecraft_launcher_lib\microsoft_account.py(230)authenticate_with_minecraft()->{'error': 'FORBIDDEN', 'path': '/authenticat...gin_with_xbox'}
-> return r.json()

from voyager.

lukaemon avatar lukaemon commented on July 16, 2024

Got the same error as well with both web and Public client/native. Start digging.

from voyager.

tegnike avatar tegnike commented on July 16, 2024

yse, I tried both conditions, but it' doesn't work.

Why we got 403 error?
Which authentication we couldn't pass?

from voyager.

lukaemon avatar lukaemon commented on July 16, 2024

Gave up and use mc_port. Works.

from voyager.

GoingMyWay avatar GoingMyWay commented on July 16, 2024

Unfortunately the login guide from minecraft-launcher-lib doesn't provide any help here so I ended up digging through the code to try and debug, and while I narrowed it down to the authenticate_with_minecraft() call, I couldn't find any reason why minecraft-launcher-lib was getting a 403 Forbidden error during the Minecraft Oauth2 flow, especially because it successfully authenticated with Microsoft & Xbox, but couldn't authenticate with Minecraft's API.

I'm using my Microsoft account (attached to my Gmail). I recently had to link my Minecraft account to my Microsoft account, so maybe it has something to do with that? Unsure. Either way, I ended up just using the mc_port method to get it to work.

More info on the oauth2 flow can be found at https://wiki.vg/Microsoft_Authentication_Scheme

Hi, do you know how to make MC running in the backend via using the mc_port method? While running, I cannot move the mouse cursor out of the game.

from voyager.

tegnike avatar tegnike commented on July 16, 2024

@lukaemon
Thanks advice!! I counld start Voyager.

Do you know the difference of these ways to play? mc_port way is not recommended?

from voyager.

GoingMyWay avatar GoingMyWay commented on July 16, 2024

Don't know the reason. I saw in other issue that the author mentioned you have to restart the process manually if the process is disconnected somehow with mc_port. Don't know if other factors are in the play.

I guess that is the main reason. I ran all the iterations set in the code and did not reproduce the performance in the paper. BTW, did you manage to reproduce the results in the paper.

from voyager.

GoingMyWay avatar GoingMyWay commented on July 16, 2024

This change is the reason: https://help.minecraft.net/hc/en-us/articles/16254801392141

It seems we should apply for the permission.

from voyager.

github-actions avatar github-actions commented on July 16, 2024

This issue is stale because it has been open for 30 days with no activity.

from voyager.

github-actions avatar github-actions commented on July 16, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

from voyager.

Related Issues (20)

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.