tripleee / sloshy

Sloshy the Thawman, a simple chatbot to keep rooms alive on Stack Overflow / Stack Exchange
6 stars 11 forks source link

Nightly failed: Login rejected #73

Closed tripleee closed 7 months ago

tripleee commented 7 months ago

Hoping this is a one off; but creating a ticket to remind myself.

https://github.com/tripleee/sloshy/actions/runs/7924954071/job/21637348561

Successfully installed BeautifulSoup4-4.12.3 ChatExchange-0.0.3 blessed-1.20.0 bpython-0.24 coverage-7.4.1 curtsies-0.4.2 cwcwidth-0.1.9 epydoc-3.0.1 exceptiongroup-1.2.0 greenlet-3.0.3 httmock-1.4.0 iniconfig-2.0.0 pluggy-1.4.0 py-1.11.0 pytest-8.0.0 pytest-timeout-2.2.0 pyxdg-0.28 soupsieve-2.5 wcwidth-0.2.13 websocket-client-1.7.0
Traceback (most recent call last):
  File "/home/runner/work/sloshy/sloshy/./run.py", line 19, in <module>
    sloshy.test_rooms()
  File "/home/runner/work/sloshy/sloshy/sloshy.py", line 397, in test_rooms
    self.startup_notice(self.homeroom, announce or "room test")
  File "/home/runner/work/sloshy/sloshy/sloshy.py", line 356, in startup_notice
    self.send_chat_message(
  File "/home/runner/work/sloshy/sloshy/sloshy.py", line 346, in send_chat_message
    room.send_message(message)
  File "/home/runner/work/sloshy/sloshy/sloshy.py", line 168, in send_message
    chat = self.clients.get_client_for_server(self.server)
  File "/home/runner/work/sloshy/sloshy/sloshy.py", line 104, in get_client_for_server
    client.login(self.email, self.password)
  File "/home/runner/.local/lib/python3.10/site-packages/chatexchange/client.py", line 169, in login
    cookies = self._br.login_site(self.host, email, password)
  File "/home/runner/.local/lib/python3.10/site-packages/chatexchange/browser.py", line 151, in login_site
    self._se_openid_login_with_fkey(
  File "/home/runner/.local/lib/python3.10/site-packages/chatexchange/browser.py", line 189, in _se_openid_login_with_fkey
    fkey_soup = self.get_soup(fkey_url, with_chat_root=False)
  File "/home/runner/.local/lib/python3.10/site-packages/chatexchange/browser.py", line [119](https://github.com/tripleee/sloshy/actions/runs/7924954071/job/21637348561#step:3:120), in get_soup
    response = self.get(url, data, headers, with_chat_root)
  File "/home/runner/.local/lib/python3.10/site-packages/chatexchange/browser.py", line 113, in get
    return self._request('get', url, data, headers, with_chat_root)
  File "/home/runner/.local/lib/python3.10/site-packages/chatexchange/browser.py", line 105, in _request
    response.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://stackoverflow.com/users/login?returnurl%20=%20%2F
Error: Process completed with exit code 1.
tripleee commented 7 months ago

(Nice timing; it was the second one to run with the new healthchecks.io integration. For the record, I did get a notification, about half an hour ago.)

tripleee commented 7 months ago

This has been recurring for several nights now. I have been assuming it is related to https://meta.stackexchange.com/questions/396674/cloudflare-protection-is-triggering-on-stack-overflow-authentication-api-routes but I have not investigated.

tripleee commented 7 months ago

Turns out Sloshy's reputation on Stack Overflow had decreased below 30. I guess one of the edits I submitted was for a post which was ultimately removed and so the rep was lost. I have proceeded to make a few new edits from the bot's account.

tripleee commented 7 months ago

Rep recovered. Thanks to whoever approved the suggested edits! (-:

tripleee commented 7 months ago

Actually, turns out the reputation explanation was bogus; the chat privilege is at 20 rep, not 30 like I incorrectly remembered. The root problem remains #75