Unmanic / unmanic

Unmanic - Library Optimiser
GNU General Public License v3.0
1.41k stars 84 forks source link

Plugins error 500 #436

Closed damongolding closed 6 months ago

damongolding commented 6 months ago

Description

When refreshing repositories I receive a 500 error for the "refresh" api call. This is a fresh install and no plugins (not even the official ones) are present

Steps to Reproduce

  1. Open settings>plugins>install plugin from repo
  2. click "refreshing repositories"

Expected behavior: Plugins to update and appear

Actual behaviour: Error notification saying "Unable to update your configured repositories. Perhaps there is an error in one of the URLs? " shows

Reproduces how often: 100%

Versions

Version: [0.2.4~7339f8b]

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

Installation Method Used

Docker

Additional Information

Having the same issue on my other install of Unmanic which is running the same version.

Below is the 500 response from the refresh api call

{
    "error": "500: HTTPSConnectionPool(host='api.unmanic.app', port=443): Read timed out. (read timeout=5)",
    "messages": {},
    "traceback": [
        "Traceback (most recent call last):\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py\", line 536, in _make_request\n    response = conn.getresponse()\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/urllib3/connection.py\", line 454, in getresponse\n    httplib_response = super().getresponse()\n",
        "  File \"/usr/lib/python3.8/http/client.py\", line 1348, in getresponse\n    response.begin()\n",
        "  File \"/usr/lib/python3.8/http/client.py\", line 316, in begin\n    version, status, reason = self._read_status()\n",
        "  File \"/usr/lib/python3.8/http/client.py\", line 277, in _read_status\n    line = str(self.fp.readline(_MAXLINE + 1), \"iso-8859-1\")\n",
        "  File \"/usr/lib/python3.8/socket.py\", line 669, in readinto\n    return self._sock.recv_into(b)\n",
        "  File \"/usr/lib/python3.8/ssl.py\", line 1241, in recv_into\n    return self.read(nbytes, buffer)\n",
        "  File \"/usr/lib/python3.8/ssl.py\", line 1099, in read\n    return self._sslobj.read(len, buffer)\n",
        "socket.timeout: The read operation timed out\n",
        "\nThe above exception was the direct cause of the following exception:\n\n",
        "Traceback (most recent call last):\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/requests/adapters.py\", line 486, in send\n    resp = conn.urlopen(\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py\", line 844, in urlopen\n    retries = retries.increment(\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/urllib3/util/retry.py\", line 470, in increment\n    raise reraise(type(error), error, _stacktrace)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/urllib3/util/util.py\", line 39, in reraise\n    raise value\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py\", line 790, in urlopen\n    response = self._make_request(\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py\", line 538, in _make_request\n    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py\", line 370, in _raise_timeout\n    raise ReadTimeoutError(\n",
        "urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.unmanic.app', port=443): Read timed out. (read timeout=5)\n",
        "\nDuring handling of the above exception, another exception occurred:\n\n",
        "Traceback (most recent call last):\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/unmanic/webserver/api_v2/plugins_api.py\", line 1108, in reload_repo_data\n    if not plugins.reload_plugin_repos_data():\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/unmanic/webserver/helpers/plugins.py\", line 539, in reload_plugin_repos_data\n    return plugins.update_plugin_repos()\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/unmanic/libs/plugins.py\", line 162, in update_plugin_repos\n    repo_data = self.fetch_remote_repo_data(repo_path)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/unmanic/libs/plugins.py\", line 145, in fetch_remote_repo_data\n    return session.api_post(1, 'unmanic-plugin-repo/uuid/{}'.format(uuid), post_data)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/unmanic/libs/session.py\", line 263, in api_post\n    r = requests.post(u, json=data, timeout=self.timeout)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/requests/api.py\", line 115, in post\n    return request(\"post\", url, data=data, json=json, **kwargs)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/requests/api.py\", line 59, in request\n    return session.request(method=method, url=url, **kwargs)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/requests/sessions.py\", line 589, in request\n    resp = self.send(prep, **send_kwargs)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/requests/sessions.py\", line 703, in send\n    r = adapter.send(request, **kwargs)\n",
        "  File \"/usr/local/lib/python3.8/dist-packages/requests/adapters.py\", line 532, in send\n    raise ReadTimeout(e, request=request)\n",
        "requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.unmanic.app', port=443): Read timed out. (read timeout=5)\n"
    ]
}