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

DoesNotOwnMinecraftError within auth_session.refresh() #193

Open
dakiba opened this issue Dec 11, 2023 · 2 comments
Open

DoesNotOwnMinecraftError within auth_session.refresh() #193

dakiba opened this issue Dec 11, 2023 · 2 comments
Labels
triage We are trying to categorize this issue or missing info to do so

Comments

@dakiba
Copy link

dakiba commented Dec 11, 2023

Some user get now the DoesNotOwnMinecraftError Exception, then they want refresh the session:

        from portablemc.fabric import FabricVersion
        from portablemc.standard import Context

        if data.get("auth_mails").get(email, {}).get("auth"):
            auth_session = data.get("auth_mails").get(email, {}).get("auth")
            if not auth_session.validate():
                auth_session.refresh()
Traceback (most recent call last):
  File "site-packages\portablemc\http.py", line 95, in http_request
  File "urllib\request.py", line 222, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 641, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 503, in _call_chain
  File "urllib\request.py", line 649, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\portablemc\auth.py", line 323, in authenticate_base
  File "site-packages\portablemc\auth.py", line 349, in mc_request_profile
  File "site-packages\portablemc\http.py", line 98, in http_request
portablemc.http.HttpError: (<HttpResponse 404>, 'GET', 'https://api.minecraftservices.com/minecraft/profile', <HTTPError 404: 'Not Found'>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "minecraft.py", line 121, in start
  File "site-packages\portablemc\auth.py", line 226, in refresh
  File "site-packages\portablemc\auth.py", line 326, in authenticate_base
portablemc.auth.DoesNotOwnMinecraftError

Line 121 is the auth_session.refresh()

@dakiba
Copy link
Author

dakiba commented Dec 11, 2023

Reset the session didn't worked. After we did login to the mojang website in the browser, the error was gone. We had now 2 users with that issue. Microsoft is so ......

@mindstorm38
Copy link
Owner

I'm afraid of Microsoft API honestly

@mindstorm38 mindstorm38 added the triage We are trying to categorize this issue or missing info to do so label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage We are trying to categorize this issue or missing info to do so
Projects
None yet
Development

No branches or pull requests

2 participants