yuletide / nitterbot

A mastodon bot to replace twitter links with Nitter links to view without ads or tracking
https://botsin.space/@nitterbot
9 stars 3 forks source link

Crash report: mastodon.errors.MastodonNetworkError: Server ceased communication #14

Open yuletide opened 1 year ago

yuletide commented 1 year ago
 main()

2023-01-03T04:01:35.267 app[c2c6b821] sjc [info] File "/app/nitterbot/__main__.py", line 13, in main

2023-01-03T04:01:35.268 app[c2c6b821] sjc [info] mastodon.stream_user(listener)

2023-01-03T04:01:35.268 app[c2c6b821] sjc [info] File "/usr/local/lib/python3.9/site-packages/decorator.py", line 232, in fun

2023-01-03T04:01:35.269 app[c2c6b821] sjc [info] return caller(func, *(extras + args), **kw)

2023-01-03T04:01:35.269 app[c2c6b821] sjc [info] File "/usr/local/lib/python3.9/site-packages/mastodon/utility.py", line 47, in wrapper

2023-01-03T04:01:35.269 app[c2c6b821] sjc [info] return function(self, *args, **kwargs)

2023-01-03T04:01:35.269 app[c2c6b821] sjc [info] File "/usr/local/lib/python3.9/site-packages/mastodon/streaming_endpoints.py", line 20, in stream_user

2023-01-03T04:01:35.270 app[c2c6b821] sjc [info] return self.__stream('/api/v1/streaming/user', listener, run_async=run_async, timeout=timeout, reconnect_async=reconnect_async, reconnect_async_wait_sec=reconnect_async_wait_sec)

2023-01-03T04:01:35.270 app[c2c6b821] sjc [info] File "/usr/local/lib/python3.9/site-packages/mastodon/internals.py", line 544, in __stream

2023-01-03T04:01:35.270 app[c2c6b821] sjc [info] listener.handle_stream(r)

2023-01-03T04:01:35.271 app[c2c6b821] sjc [info] File "/usr/local/lib/python3.9/site-packages/mastodon/streaming.py", line 135, in handle_stream

2023-01-03T04:01:35.271 app[c2c6b821] sjc [info] six.raise_from(

2023-01-03T04:01:35.271 app[c2c6b821] sjc [info] File "<string>", line 3, in raise_from

2023-01-03T04:01:35.271 app[c2c6b821] sjc [info] mastodon.errors.MastodonNetworkError: Server ceased communication.
yuletide commented 1 year ago

Still crashing

2023-01-04T17:47:57Z app[31dc4085] sjc [info]checking parent
2023-01-05T02:01:28Z app[31dc4085] sjc [info]Network error, reinitializing Server ceased communication.
2023-01-05T02:01:28Z app[31dc4085] sjc [info]**listening**
2023-01-05T02:01:28Z app[31dc4085] sjc [info]client secret found
2023-01-05T02:01:28Z app[31dc4085] sjc [info]user token already found
2023-01-05T02:01:28Z app[31dc4085] sjc [info]client secret found
2023-01-05T02:01:28Z app[31dc4085] sjc [info]user token already found
2023-01-05T02:01:29Z app[31dc4085] sjc [info]Traceback (most recent call last):
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 761, in _update_chunk_length
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    self.chunk_left = int(line, 16)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]ValueError: invalid literal for int() with base 16: b''
2023-01-05T02:01:29Z app[31dc4085] sjc [info]During handling of the above exception, another exception occurred:
2023-01-05T02:01:29Z app[31dc4085] sjc [info]Traceback (most recent call last):
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 444, in _error_catcher
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    yield
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 828, in read_chunked
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    self._update_chunk_length()
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 765, in _update_chunk_length
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    raise InvalidChunkLength(self, line)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]urllib3.exceptions.InvalidChunkLength: InvalidChunkLength(got length b'', 0 bytes read)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]During handling of the above exception, another exception occurred:
2023-01-05T02:01:29Z app[31dc4085] sjc [info]Traceback (most recent call last):
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 816, in generate
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    yield from self.raw.stream(chunk_size, decode_content=True)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 624, in stream
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    for line in self.read_chunked(amt, decode_content=decode_content):
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 857, in read_chunked
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    self._original_response.close()
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    self.gen.throw(typ, value, traceback)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 461, in _error_catcher
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    raise ProtocolError("Connection broken: %r" % e, e)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]urllib3.exceptions.ProtocolError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))
2023-01-05T02:01:29Z app[31dc4085] sjc [info]During handling of the above exception, another exception occurred:
2023-01-05T02:01:29Z app[31dc4085] sjc [info]Traceback (most recent call last):
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/mastodon/streaming.py", line 109, in handle_stream
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    for chunk in response.iter_content(chunk_size=1):
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 818, in generate
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    raise ChunkedEncodingError(e)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))
2023-01-05T02:01:29Z app[31dc4085] sjc [info]The above exception was the direct cause of the following exception:
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/app/nitterbot/__main__.py
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/app/nitterbot/__main__.py
, line 18, in main
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    mastodon.stream_user(listener)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/decorator.py", line 232, in fun
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    return caller(func, *(extras + args), **kw)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/mastodon/utility.py", line 47, in wrapper
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    return function(self, *args, **kwargs)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/mastodon/streaming_endpoints.py", line 20, in stream_user
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    return self.__stream('/api/v1/streaming/user', listener, run_async=run_async, timeout=timeout, reconnect_async=reconnect_async, reconnect_async_wait_sec=reconnect_async_wait_sec)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/mastodon/internals.py", line 544, in __stream
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    listener.handle_stream(r)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/mastodon/streaming.py", line 135, in handle_stream
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    six.raise_from(
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "<string>", line 3, in raise_from
2023-01-05T02:01:29Z app[31dc4085] sjc [info]mastodon.errors.MastodonNetworkError: Server ceased communication.
2023-01-05T02:01:29Z app[31dc4085] sjc [info]During handling of the above exception, another exception occurred:
2023-01-05T02:01:29Z app[31dc4085] sjc [info]Traceback (most recent call last):
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    return _run_code(code, main_globals, None,
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    exec(code, run_globals)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/app/nitterbot/__main__.py", line 24, in <module>
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    main()
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/app/nitterbot/__main__.py", line 21, in main
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    main()  # this needs real refactoring to have proper retries forever, should we re-use the client or listener?
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/app/nitterbot/__main__.py", line 13, in main
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    mastodon.status_post(
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/decorator.py", line 232, in fun
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    return caller(func, *(extras + args), **kw)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/mastodon/utility.py", line 47, in wrapper
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    return function(self, *args, **kwargs)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/mastodon/statuses.py", line 253, in status_post
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    return self.__status_internal(
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/mastodon/statuses.py", line 187, in __status_internal
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    return self.__api_request('POST', '/api/v1/statuses', params, headers=headers, use_json=use_json)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]  File "/usr/local/lib/python3.9/site-packages/mastodon/internals.py", line 299, in __api_request
2023-01-05T02:01:29Z app[31dc4085] sjc [info]    raise ex_type('Mastodon API returned error', response_object.status_code, response_object.reason, error_msg)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]mastodon.errors.MastodonInternalServerError: ('Mastodon API returned error', 500, 'Internal Server Error', None)
2023-01-05T02:01:29Z app[31dc4085] sjc [info]Starting clean up.
2023-01-05T02:01:36Z runner[31dc4085] sjc [info]Starting instance
2023-01-05T02:01:37Z runner[31dc4085] sjc [info]Configuring virtual machine