shine-jayakumar / insta-likecom-bot

Automates likes and comments on an instagram account or tag
MIT License
136 stars 29 forks source link

Unable to login #77

Closed m-deane closed 1 year ago

m-deane commented 1 year ago

Hi, enjoying the code/tool.

At the moment consistently coming across this error:

[*] => Error: [LoginFailedError] - Failed to login. Incorrect username/password, or 2 factor verification is active.

But one problem - on chrome login, for the first time I need to save login information for later as this screen is causing the error related to invalid password/2-factor authentication. What's the best way to get the chromium web driver to save this information as every session that is launched is not saving any data/settings from the previous and is the reason why I think I am continuing to encounter this error.

Tried with and without headless browser but have the same issue - can anyone recommend a way around this?

Thanks

shine-jayakumar commented 1 year ago

Do you have 2-factor authentication activated for your account?

imakou commented 1 year ago

I cannot log in by loading enither profile nor typing Username/ password.

m-deane commented 1 year ago

Hi, I don't have 2 factor authentication activated. Been careful not to activate it

shine-jayakumar commented 1 year ago

I just checked with manually passing the username/password and also using a profile.json file. Both seems to be working for me. I have 2-factor authentication activated.

Please share the logs (hide the credentials)

shine-jayakumar commented 1 year ago

Hi, enjoying the code/tool.

At the moment consistently coming across this error:

[*] => Error: [LoginFailedError] - Failed to login. Incorrect username/password, or 2 factor verification is active.

But one problem - on chrome login, for the first time I need to save login information for later as this screen is causing the error related to invalid password/2-factor authentication. What's the best way to get the chromium web driver to save this information as every session that is launched is not saving any data/settings from the previous and is the reason why I think I am continuing to encounter this error.

Tried with and without headless browser but have the same issue - can anyone recommend a way around this?

Thanks

Please share the logs.

To save the username/password you can use the path to your browser profile (check the README). You must provide username, password, and a target even if you're using a browser profile. You use a profile.json for this too, like this:

python3 ilcbot.py -pr myprofile.json --brprofile '/home/mycomputer/.config/google-chrome/Profile 1'

Here, I have specified my username, password, target in myprofile.json file and using a Chrome profile. Script will automatically detect if a login is required or not.

imakou commented 1 year ago

hey @shine-jayakumar , I figure out the issue could be Webdriver. Somehow, the webdriver is very slow on my Macbook. And it would cause a timeout and then fail the login. Any chance you know how to solve this issue???

Thanks

shine-jayakumar commented 1 year ago

hey @shine-jayakumar , I figure out the issue could be Webdriver. Somehow, the webdriver is very slow on my Macbook. And it would cause a timeout and then fail the login. Any chance you know how to solve this issue???

Thanks

Never heard of Webdrivers running slow on a specific OS. You can share the log and we can figure out (remove the username from the log)

mohit-nigania commented 1 year ago

image you need to handle this pop up.. this causes ..

Traceback (most recent call last): File "E:\git_back\insta-likecom-bot\ilcbot.py", line 114, in raise LoginFailedError("Failed to login. Incorrect username/password, or 2 factor verification is active.") modules.exceptions.LoginFailedError: Failed to login. Incorrect username/password, or 2 factor verification is active. [*] => Total time taken: 11.7298 seconds

if i manually accept it.. everything works fine .. there wasnt any wait it take atleast 2-3 to accpt ...

time.sleep(2) self.wait.until(EC.element_to_be_clickable((By.XPATH, "//button[text()='Allow all cookies']"))).click()

adding 2lines in instafunc.py at line 264 works