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

trackma crashes at startup with "Remote end closed connection without response" #680

Open
v-fox opened this issue Mar 21, 2023 · 1 comment
Assignees

Comments

@v-fox
Copy link

v-fox commented Mar 21, 2023

While changing an episode count on one series trackma crashed and does so on every startup now with:

libanilist: Downloading list...
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/trackma/ui/qt/workers.py", line 181, in run
    ret = self.function(*self.args, **self.kwargs)
  File "/usr/lib/python3.10/site-packages/trackma/ui/qt/workers.py", line 157, in _start
    self.engine.start()
  File "/usr/lib/python3.10/site-packages/trackma/engine.py", line 249, in start
    (self.api_info, self.mediainfo) = self.data_handler.start()
  File "/usr/lib/python3.10/site-packages/trackma/data.py", line 178, in start
    self.download_data()
  File "/usr/lib/python3.10/site-packages/trackma/data.py", line 548, in download_data
    self.showlist = self.api.fetch_list()
  File "/usr/lib/python3.10/site-packages/trackma/lib/libanilist.py", line 268, in fetch_list
    data = self._request(query, variables)['data']['MediaListCollection']
  File "/usr/lib/python3.10/site-packages/trackma/lib/libanilist.py", line 202, in _request
    return self._raw_request('POST', self.query_url, jsonpost=data, auth=True)
  File "/usr/lib/python3.10/site-packages/trackma/lib/libanilist.py", line 184, in _raw_request
    response = self.opener.open(request, timeout=10)
  File "/usr/lib64/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/usr/lib64/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib64/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.10/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib64/python3.10/urllib/request.py", line 1352, in do_open
    r = h.getresponse()
  File "/usr/lib64/python3.10/http/client.py", line 1374, in getresponse
    response.begin()
  File "/usr/lib64/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python3.10/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
[1]    26172 IOT instruction (core dumped)  trackma-qt

At the same time I couldn't open https://anilist.co in a browser directly until enabling Tor's proxy once. So I suspect shenanigans from their admin, hoster or my ISP. But trackma still gives out same error.
Running PROXY_ENABLED=yes HTTP_PROXY="127.0.0.1:8080" HTTPS_PROXY="127.0.0.1:8080" trackma-qt (where the address is tor-socks5->privoxy-http gateway) works around that and starts it up.

Either way, trackma should allow at least browsing local lists on connectivity loss instead of just crashing.

@z411
Copy link
Owner

z411 commented Mar 26, 2023

Either way, trackma should allow at least browsing local lists on connectivity loss instead of just crashing.

It should. If it's trying to retrieve your list either your autoretrieve time passed or it never got to download the list at all. That said, you're right, an http error should be handled as an APIError (which should get seen as a warning by the Engine).

@z411 z411 self-assigned this Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants