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

auth problem #69

Open
R3n3r0 opened this issue Jun 4, 2024 · 21 comments
Open

auth problem #69

R3n3r0 opened this issue Jun 4, 2024 · 21 comments
Assignees
Labels
bug Something isn't working

Comments

@R3n3r0
Copy link

R3n3r0 commented Jun 4, 2024

On linux i get authentication error even after generating the cookie. below is the error log:

`
Status 429: Too many requests
Ignore 429: Continue login
Traceback (most recent call last):
File "/tmp/IGFI/venv/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 298, in _send_private_request
response.raise_for_status()
File "/tmp/IGFI/venv/lib/python3.10/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/login/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/tmp/IGFI/igfi.py", line 648, in
main(username=args.username.strip().lower(), password=args.password.strip(), session=args.session.strip().replace('\', '/'))
File "/tmp/IGFI/igfi.py", line 348, in main
login = client.login(username, password)
File "/tmp/IGFI/venv/lib/python3.10/site-packages/instagrapi/mixins/auth.py", line 391, in login
logged = self.private_request("accounts/login/", data, login=True)
File "/tmp/IGFI/venv/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 445, in private_request
raise e
File "/tmp/IGFI/venv/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 432, in private_request
self._send_private_request(endpoint, **kwargs)
File "/tmp/IGFI/venv/lib/python3.10/site-packages/instagrapi/mixins/private.py", line 354, in _send_private_request
raise UnknownError(**last_json)
instagrapi.exceptions.UnknownError: You'll need to update Instagram to the latest version before you can use the app.
`

@new92 new92 self-assigned this Jun 4, 2024
@new92 new92 added the bug Something isn't working label Jun 4, 2024
@new92
Copy link
Owner

new92 commented Jun 4, 2024

Hey @R3n3r0 try the following:

  1. Updating your browser in the latest version
  2. Updating your Instagram app
  3. Logout from your Instagram account (from the browser) and login again

@bruise24
Copy link

bruise24 commented Jun 5, 2024

Same here to me! already done what you said and nothing occurs =\

@new92
Copy link
Owner

new92 commented Jun 8, 2024

Hmm, ok let me check it and I'll get back to you ! @bruise24 you too are using Linux correct ?

@bruise24
Copy link

bruise24 commented Jun 8, 2024

Curiously I'm on Windows. But error is the same. Thank you

@new92
Copy link
Owner

new92 commented Jun 8, 2024

Ok and both @R3n3r0 @bruise24 are using Firefox correct ?

@R3n3r0
Copy link
Author

R3n3r0 commented Jun 8, 2024

Yes

@bruise24
Copy link

bruise24 commented Jun 8, 2024

Yes I'm using it too.

@new92
Copy link
Owner

new92 commented Jun 8, 2024

Ok got it

@bruise24
Copy link

bruise24 commented Jun 8, 2024

Thank you!

@new92
Copy link
Owner

new92 commented Jun 21, 2024

@R3n3r0 @bruise24 Can you try using it one more time ? I made some changes and hopefuly they resolved the issue.

@bruise24
Copy link

Still give me this error friend:

Traceback (most recent call last):
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 298, in _send_private_request
response.raise_for_status()
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\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://i.instagram.com/api/v1/accounts/login/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\USUARIO\Desktop\IGFI\igfi.py", line 648, in
main(username=args.username.strip().lower(), password=args.password.strip(), session=args.session.strip().replace('\', '/'))
File "C:\Users\USUARIO\Desktop\IGFI\igfi.py", line 348, in main
login = client.login(username, password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\auth.py", line 391, in login
logged = self.private_request("accounts/login/", data, login=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 445, in private_request
raise e
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 432, in private_request
self._send_private_request(endpoint, **kwargs)
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 354, in _send_private_request
raise UnknownError(**last_json)
instagrapi.exceptions.UnknownError: You'll need to update Instagram to the latest version before you can use the app.

@new92
Copy link
Owner

new92 commented Jun 23, 2024

@bruise24 I see, try entering this command: pip install --upgrade instagrapi

@bruise24
Copy link

@bruise24 I see, try entering this command: pip install --upgrade instagrapi

Working now! Thank you so much for your effort

@bruise24
Copy link

Hello friend.

It worked one time. Now it just doesn't seem to log in.

Don't pass from here:

[+] Attempting to login using.....

@new92
Copy link
Owner

new92 commented Jun 24, 2024

Hi,

Ok that's a tough one. I reviewed the code and can't figure out why's acting that way. After the message you mentioned it should print something like: "[✔] Login successful !" or "[✘] Failed to login." . Maybe you modified the source code in any way ? Or you're using an older version of IGFI. If that's the case try these commands:

cd IGFI
git pull

And then repeat the process from the beginning. (python3 cookies.py etc.). And let me know if that works.

@bruise24
Copy link

It worked friend!

Now is this one =( :

[+] Following Real Madrid...
[✔] Ok
[+] Following Champions League...
[✔] Ok
Traceback (most recent call last):
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 359, in _send_private_request
response.raise_for_status()
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://i.instagram.com/api/v1/friendships/create/29394004/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\USUARIO\Desktop\IGFI\igfi.py", line 648, in
main(username=args.username.strip().lower(), password=args.password.strip(), session=args.session.strip().replace('\', '/'))
File "C:\Users\USUARIO\Desktop\IGFI\igfi.py", line 401, in main
client.user_follow(users[NAMES[j]])
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\user.py", line 821, in user_follow
result = self.private_request(f"friendships/create/{user_id}/", data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 541, in private_request
raise e
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 526, in private_request
self._send_private_request(endpoint, **kwargs)
File "C:\Users\USUARIO\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\instagrapi\mixins\private.py", line 385, in _send_private_request
raise LoginRequired(response=e.response, **last_json)
instagrapi.exceptions.LoginRequired: login_required

@new92
Copy link
Owner

new92 commented Jun 25, 2024

Great ! Ok that's a common one. All you have to do is login to your Instagram account via your browser preferably Firefox. Then execute again IGFI.

@lukaszflorczak
Copy link

Hi @new92. I upgraded instagrapi and now have this problem:

Status 429: Too many requests
Ignore 429: Continue login
Traceback (most recent call last):
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 298, in _send_private_request
    response.raise_for_status()
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/login/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/lukaszflorczak/ig/IGFI/./igfi.py", line 648, in <module>
    main(username=args.username.strip().lower(), password=args.password.strip(), session=args.session.strip().replace('\\', '/'))
  File "/Users/lukaszflorczak/ig/IGFI/./igfi.py", line 348, in main
    login = client.login(username, password)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/instagrapi/mixins/auth.py", line 391, in login
    logged = self.private_request("accounts/login/", data, login=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 445, in private_request
    raise e
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 432, in private_request
    self._send_private_request(endpoint, **kwargs)
  File "/Users/lukaszflorczak/.venv/lib/python3.12/site-packages/instagrapi/mixins/private.py", line 354, in _send_private_request
    raise UnknownError(**last_json)
instagrapi.exceptions.UnknownError: You'll need to update Instagram to the latest version before you can use the app.

I'm logged in Firefox. I use Mac OS

@new92
Copy link
Owner

new92 commented Jul 7, 2024

Hey @lukaszflorczak ok try updating also the instaloader module in its latest version and run again IGFI.

@new92
Copy link
Owner

new92 commented Jul 13, 2024

@lukaszflorczak did it work ?

@lukaszflorczak
Copy link

Nope

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

4 participants