InstaPy / InstaPy

📷 Instagram Bot - Tool for automated Instagram interactions
GNU General Public License v3.0
16.85k stars 3.78k forks source link

Wrong login data - Current configuration has issues with newest Chrome v62 on docker #852

Closed Radzam closed 5 years ago

Radzam commented 7 years ago

I have made a clean install of InstaPy and made some tests using docker microservices. I didnt have any issues with the old version that used previous chrome versions. Now with a clean install even if I updated the chrome driver to latest version (2.33) and even tried rebuilding the images, it is telling me that in most cases the login data is wrong and just closes the session. It is not and I can see it login correctly when VNC only to close the chrome window after that. It sometimes goes through and works just fine.

web_1       | Wrong login data!
selenium    | 10:44:55.911 INFO - Found handler: org.openqa.selenium.remote.server...
pilotdude commented 7 years ago

I've seen this issue occurring on previous versions of InstaPy as well, at somewhat random times. For me sometimes it goes through and sometimes it doesn't. Usually if I restart InstaPy it works fine.

Radzam commented 7 years ago

@pilotdude Thanks. It is very annoying. Do you know what causes it and did you find a solution for it?

pilotdude commented 7 years ago

Nope, no idea what is happening or why. Potentially related: is it normal for chrome to open two tabs on initialization? One for Instagram and one looking like this: image

josefhelie commented 7 years ago

Same same here on both my macbook and an fresh amazon E2 instance... any clue?

Radzam commented 7 years ago

Seems like a lot of people experience this issue, could you please take a look at it? @timgrossmann @converge

converge commented 7 years ago

just tested it in Chrome v62, it's ok. Unfortunately I don't have docker here at the moment to test it.

Radzam commented 7 years ago

@converge I think the issue happens to all of us using docker. Do you have any clue what it might be?

timgrossmann commented 7 years ago

@mojoego @Radzam The problem is that Instagram blocks you from logging in to your accounts...

The same happens sometimes when using it with a DigitalOcean server for the first time. In that case, the IP does not change after the first time, I think with docker it's a little bit different (Docker people correct me if I'm wrong, please)...

This means that if you log in to your account with your local machine (simply do it with the webpage), and then start the script (with docker), you should see a notification at one point that there was a "suspicious" login attempt. If you approve that as legit, then it should not ask you again (at least with DO it's that way)

Can any of you get what I say?

josefhelie commented 7 years ago

Thanks for you answer, for your work! The thing is I use docker on my laptop too... and I get the same error message even though I can login to instagram from any browser on the same mac without any message...

Radzam commented 7 years ago

@timgrossmann Thanks for answering but I dont think this is the case here. When using VNC I can actually see it login and start navigating on tags before it closes down and says that it's wrong login. So there is def some bugg when using the current docker setup, perhaps there is compatibility issues with the configured driver and selenium version? How would I do to switch to firefox with docker microservice setup?

converge commented 7 years ago

This happened to me while I was working in Windows, I added this line, and looks like it fixed, can anyone test it ?

sleep(1)

after input_username =

if this is a fix, we could use selenium wait()

josefhelie commented 7 years ago

In the login script, I tried the

wait()

as you wrote: same error.

Then I then tried to change :

if len(nav) == 1: return True else: return False

It seems to connect, the scripts starts, but nothing is liked or anything. Note that my IP is not blacklisted and my account is not ghosted...

converge commented 7 years ago

@mojoego tha'ts nice! I think we are almost there. What I really think will solve this issue is understand what InstaPy is doing wrong, I wish I had a scenario where it always happens so we could debug it.

Is there anyone with this issue that could give me remote access to it ? So I can debug it (I'm at Slack)

pigipi commented 7 years ago

I have the same problem on my mac and I use also Docker.

The script begins, and after connection it stops/crashes after login (I can see 'Wrong login data!' in the terminal, then it closes the session 'Session ended').

Sometimes it works, sometimes it doesn't. Unfortunately, and generally, it doesn't work...

josefhelie commented 7 years ago

Personally I move yesterday to a virtual machine to test with Ubuntu, it works flawlessly, so I just bought a Raspberry Pi 3 to install it on... Best move ever I think... so easier.

pigipi commented 7 years ago

In my case when I add wait(), it doesn't crash. But the script waits indefinitely. I'll do it without docker.

hestuppfodarn commented 7 years ago

I found a personal solution for my case. I downloaded the new chromedriver, now everything works frictionless.

pigipi commented 7 years ago

I did the update but no change on my case. So I don't use Docker.

tuxity commented 6 years ago

When I print the source code I can see I'm still on login page with the error message The username you entered doesn't belong to an account. Please check your username and try again. The form seems to be correctly fill with my username and password I'm sure of my creds, I've updated everything, I don't run it with docker just python3 quickstart.py directly into terminal

Changing to if len(nav) == 1: is a bad idea because the script runs but you aren't connected.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue