Davincible / goinsta

Unofficial Instagram API written in Golang (v2022)
MIT License
183 stars 56 forks source link

Couldn't able to pass challenge in a headless browser #34

Open Dentrax opened 2 years ago

Dentrax commented 2 years ago

Hey, thanks for maintaining this project! I was trying to figure it out login process using this library. I correctly implemented the login logic: when I run my function, a headless browser appears, and it sends a verification code to my mail address. When I type in the verification code and submit it, after a while I get the following error:

Request Status Code 400: fail, challenge_required
Encountered a captcha challenge, goinsta will attempt to open the challenge in a headless chromium browser, and take a screenshot. Please report the details in a github issue.
Found button on challenge page: Submit

Saved a screenshot of the challenge 'https://i.instagram.com/challenge/REDACTED/' to challenge-screenshot-1663437586.png, please report it in a github issue so the challenge can be solved automatiaclly.

2022/09/17 21:04:47 login: failed to process challenge automatically with: failed to solve challenge automatically

Any ideas on this?

Davincible commented 2 years ago

Can you open up dev tools and check the request that submits the code, does it return without error & status code 200?

Dentrax commented 2 years ago

Actually, it gets stuck in submitting state:

Screen Shot 2022-09-17 at 22 50 53

Requests:

Screen Shot 2022-09-17 at 22 50 39

Davincible commented 2 years ago

As in, it's never actually sending the code ?

Dentrax commented 2 years ago

It seems like, yes, probably. What should I do in this case?

Davincible commented 2 years ago

For now login on a phone, solve the challenge there, and then try to login again on goinsta

asvsfs commented 2 years ago

Hi ! I got the same issue and can't resolve the challenge , i have account opened in a private window on my laptop and even get a login attempt message and i approve by (This was me ) but its not saved in Login Activity and same problem happens everytime i try to login use Insta.LoginI() i don't even have the chrome staying open , it closes immediately after being opened. and sometimes in a loop ( opening many chrome instances.)

asvsfs commented 2 years ago

Ok in my case it seems to be something with Proxy .. chromedp sends back PROXY NOT SUPPORTED but its weird as it was working!

asvsfs commented 2 years ago

Also i get context canceled shortly after chromedp.run even though context timeout seems to be 300 secs

wu56781234 commented 1 year ago

Actually, it gets stuck in submitting state:

Screen Shot 2022-09-17 at 22 50 53

Requests:

Screen Shot 2022-09-17 at 22 50 39 same problem, any solution?