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

Intermittent login failure #8

Open
Manishearth opened this issue Apr 27, 2014 · 12 comments
Open

Intermittent login failure #8

Manishearth opened this issue Apr 27, 2014 · 12 comments
Labels

Comments

@Manishearth
Copy link
Owner

Traceback (most recent call last):
  File "report.py", line 18, in <module>
    wrap.login(username,password)
  File "SEChatWrapper.py", line 49, in login
    self.br.loginChatSE()
  File "SEChatBrowser.py", line 67, in loginChatSE
    authToken = chatlogin.find('input', {"name": "authToken"})['value']
TypeError: 'NoneType' object has no attribute '__getitem__'

Probably due to throttling

@banksJeremy banksJeremy added the bug label May 4, 2014
@vampjaz
Copy link

vampjaz commented May 8, 2014

It seems a little more than intermittent to me.

@banksJeremy
Copy link
Collaborator

It seems to get better and worse over time. I've gone more than a day without hitting it, then hit it almost constantly for a while, then had it go away again.

We can handle the error more gracefully (a LoginError rather than a TypeError), but the real solution is going to be when we generalize our retrying logic, so it can automatically back off and try again.

@vampjaz
Copy link

vampjaz commented May 10, 2014

I have never gotten this to work because of this error.

@Manishearth
Copy link
Owner Author

@Red-Green maybe it's a different issue? Are you providing the correct login, and how?

Also, if your IP is not stable, this can easily happen, since SE's login requires a stable IP for a small amount of time.

@vampjaz
Copy link

vampjaz commented May 10, 2014

@Manishearth I'm not sure. Do i use my Email, or my username, or my display name?

@Manishearth
Copy link
Owner Author

@Red-Green You use your StackExchange openid credentials. (email+password). Try it out here

GMail login is not yet implemented. You can create a StackExchange openid and attach it to your account by the "my logins" link on your profile.

@vampjaz
Copy link

vampjaz commented May 10, 2014

@Manishearth I can confirm that I am logging in by looking at the SE OpenID website. The app crashes after a successful login.

@Manishearth
Copy link
Owner Author

Crashes with what message?

-Manish Goregaokar

On Sat, May 10, 2014 at 7:24 PM, red-green [email protected] wrote:

@Manishearth https://github.com/Manishearth I can confirm that I am
logging in by looking at the SE OpenID website. The app crashes after a
successful login.


Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-42742332
.

@vampjaz
Copy link

vampjaz commented May 10, 2014

@Manishearth It crashes before it sends a message. Here is the full output of the chat.py example:

INFO:chatexchange.wrapper.SEChatWraper:Logging in.
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): openid.stackexchange.com
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): stackexchange.com
Traceback (most recent call last):
  File "main.py", line 77, in <module>
    main(*sys.argv[1:])
  File "main.py", line 29, in main
    wrapper.login(username,password)
  File "/home/ubuntu/tardisbot/ChatExchange/chatexchange/wrapper.py", line 88, in login
    self.br.loginChatSE()
  File "/home/ubuntu/tardisbot/ChatExchange/chatexchange/browser.py", line 125, in loginChatSE
    authToken = chatlogin.find('input', {"name": "authToken"})['value']
    TypeError: 'NoneType' object has no attribute '__getitem__'

@Manishearth
Copy link
Owner Author

So this has to do with SE's login mechanism. Go to Stackexchange.com, and instead of using the SE login, enter https://openid.stackexchange.com in the "custom openid" box. You will have to authorize it to use the openid.

This API isn't yet ready for public consumption, these kinks are still present. We'll sort these out as time passes.

@AWegnerGitHub
Copy link
Contributor

I receive this error as well (with adjusted line numbers, presumably because of 9 months of development from when this issue was originally open). Prior to today, I was able to log in and have been utilizing this project for about 6 months with no login issues.

  File "H:\Dev\Git\SE_Chatbot\ChatExchange\chatexchange\client.py", line 140, in login
    self._br.login_se_chat()
  File "H:\Dev\Git\SE_Chatbot\ChatExchange\chatexchange\browser.py", line 202, in login_se_chat
    auth_token = start_login_soup.find('input', {'name': 'authToken'})['value']
TypeError: 'NoneType' object has no attribute '__getitem__'

@Filnor
Copy link

Filnor commented Nov 23, 2018

Kinda invalided by now as OpenID is now replaced. But on the new login, you may run into a captcha after too many recent logins which blocks you for 5 - 10 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants