ChatExchange icon indicating copy to clipboard operation
ChatExchange copied to clipboard

Intermittent login failure

Open Manishearth opened this issue 10 years ago • 12 comments

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

Manishearth avatar Apr 27 '14 21:04 Manishearth

It seems a little more than intermittent to me.

vampjaz avatar May 08 '14 15:05 vampjaz

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.

banksJeremy avatar May 08 '14 15:05 banksJeremy

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

vampjaz avatar May 10 '14 04:05 vampjaz

@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.

Manishearth avatar May 10 '14 04:05 Manishearth

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

vampjaz avatar May 10 '14 04:05 vampjaz

@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.

Manishearth avatar May 10 '14 04:05 Manishearth

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

vampjaz avatar May 10 '14 13:05 vampjaz

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/Manishearth/ChatExchange/issues/8#issuecomment-42742332 .

Manishearth avatar May 10 '14 13:05 Manishearth

@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__'

vampjaz avatar May 10 '14 14:05 vampjaz

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.

Manishearth avatar May 10 '14 14:05 Manishearth

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__'

AWegnerGitHub avatar Jan 29 '15 03:01 AWegnerGitHub

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.

Filnor avatar Nov 23 '18 12:11 Filnor