Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Problem logging in #66

Closed
morris-of-orange opened this issue Jun 15, 2019 · 5 comments
Closed

Problem logging in #66

morris-of-orange opened this issue Jun 15, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@morris-of-orange
Copy link

Whenever I run the program, it goes to Facebook, and enters the login information. I copy the email, and URL from a firefox window, and the password from my password manager. It then sends the Chrome window to:
https://www.facebook.com/login/device-based/regular/login/?login_attempt=1&lwv=110

where I reenter the same login credentials (copy-paste) and then it logs in correctly however by then, the program hits an error.

I do not have 2FA enabled

Proposed solution: If it hits this webpage, then check the url every few seconds, until the user inputs the email-password manually and hits login. after that continue running the program

On line 100 of login.py add:

while Driver.getCurrentUrl()=="https://www.facebook.com/login/device-based/regular/login/?login_attempt=1&lwv=110":

time.sleep(5)

@weskerfoot
Copy link
Owner

weskerfoot commented Jun 15, 2019

Are you getting a "Save Browser" screen? I think this might be the same issue as this #38

I can look at adding this check to the end of the login function, although I think it might be more robust to do something like:

while "login/device-based/regular/login" in driver.getCurrentUrl():
    time.sleep(5)

That way it isn't depending on the exact query parameters being present.

Can you confirm this solves your issue?

Better yet, I might change the login function to go to this URL in the first place and avoid this issue, and the need to have a while loop.

It seems that if you aren't logged in, this page will reliably give you a login

image

@weskerfoot
Copy link
Owner

I'm going to try altering the login function to go to this page directly, which should hopefully avoid issues with logins.

It seems like #38 is a different issue which is going to be a bit more work to solve.

@weskerfoot weskerfoot added the bug Something isn't working label Jun 15, 2019
@weskerfoot weskerfoot self-assigned this Jun 15, 2019
@weskerfoot weskerfoot mentioned this issue Jun 16, 2019
@weskerfoot
Copy link
Owner

Fixed in #67

@morris-of-orange
Copy link
Author

This totally fixed it, thank you. Sorry I wasn't much of a help, I'm new to all this, so I couldn't be much help.

@weskerfoot
Copy link
Owner

weskerfoot commented Jun 16, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants