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

AIDS Fails to Authenticate Despite Correct Credentials #7

Open
GoAwayNow opened this issue Nov 1, 2022 · 1 comment
Open

AIDS Fails to Authenticate Despite Correct Credentials #7

GoAwayNow opened this issue Nov 1, 2022 · 1 comment

Comments

@GoAwayNow
Copy link

Just downloaded the tool and tried to use it.

aids-windows.bat scenarios -p aid
2022-11-01 01:22:01,932 [INFO] -- user_info.BaseClient: Aid successfully initialized.
2022-11-01 01:22:01,933 [INFO] -- user_info.BaseClient: Trying to log-in via file...
2022-11-01 01:22:02,211 [ERROR] -- user_info.Session:
                    Server URL: https://api.aidungeon.io/graphql,
                    failed with status code (400).
                    Errors: [{'message': 'Context creation failed: Not authorized [Heimdall]. Not authorized', 'extensions': {'code': 'UNAUTHENTICATED'}}].
                    Raw response: b'{"errors":[{"message":"Context creation failed: No'
                    Request payload: {"variables": {"identifier": "MY CORRECT EMAIL APPEARED HERE", "email": "MY CORRECT EMAIL APPEARED HERE", "password": "MY CORRECT PASSWORD APPEARED HERE"}, "query": "\nmutation ($identifier: String, $email: String, $password: String, $anonymousId: String) {\n    login(identifier: $identifier, email: $email, password: $password, anonymousId: $anonymousId) {\n        accessToken\n    }\n}\n"}

Traceback (most recent call last):
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\app\client.py", line 29, in inner_func
    response.raise_for_status()
  File "F:\x\games\aidungeon\venv\lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.aidungeon.io/graphql

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "F:\x\games\aidungeon\venv\Scripts\aids-windows.bat", line 4, in <module>
    get_command()
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\manage.py", line 41, in get_command
    platform = getattr(commands, cmd.platform)()
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\commands.py", line 34, in __init__
    self.login()
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\app\client.py", line 184, in login
    key = self.get_login_token(credentials)
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\app\client.py", line 282, in get_login_token
    res = self.session.post(self.url, data=json.dumps(self.aid_loginpayload)).json()
  File "F:\x\games\aidungeon\venv\lib\site-packages\requests\sessions.py", line 635, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "F:\x\games\aidungeon\venv\lib\site-packages\aids\app\client.py", line 65, in inner_func
    raise requests.exceptions.HTTPError from exc
requests.exceptions.HTTPError

Using Python 3.9.6 on Windows 10 Pro 21h2, with AIDS installed in a VENV.

@Moist-Cat
Copy link
Owner

Moist-Cat commented Nov 1, 2022

The error is probably caused by a change in aidungeon's back-end. I don't use AID so I'm not don't maintain this project anymore.
That said, the error says "Not authorized" so it might be a problem with your credentials. I see you used your email, you could try with your user; token... although I believe it's because AID is authenticating their users through their other site.

https://jtvjan.nl/aidungeon/

Check if this is still working.

In case everything else fails, you can try forking the project and see if you can make it work.

https://github.com/Moist-Cat/AIDScrapper/blob/main/app/client.py#L277

It's failing here.

@Moist-Cat Moist-Cat reopened this Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants