frappe / translator

Translation Portal for Frappe
Other
27 stars 52 forks source link

SSL certificate expired #216

Open aheart opened 1 year ago

aheart commented 1 year ago

image This is causing the Translation Tool to fail in ERPNext

request.js:457 Traceback (most recent call last):
  File "env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 714, in urlopen
    httplib_response = self._make_request(
  File "env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 403, in _make_request
    self._validate_conn(conn)
  File "env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1053, in _validate_conn
    conn.connect()
  File "env/lib/python3.10/site-packages/urllib3/connection.py", line 419, in connect
    self.sock = ssl_wrap_socket(
  File "env/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "env/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/lib/python3.10/ssl.py", line 1071, in _create
    self.do_handshake()
  File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1007)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "env/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 798, in urlopen
    retries = retries.increment(
  File "env/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='translate.erpnext.com', port=443): Max retries exceeded with url: /api/method/translator.api.get_strings_for_translation?language=en&start=0&page_length=100&search_text=&FrappeClient=%3Cclass+%27frappe.frappeclient.FrappeClient%27%3E&translator=%3Cfrappe.frappeclient.FrappeClient+object+at+0x7f7a68717be0%3E (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1007)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 95, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 47, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1622, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/translate.py", line 1234, in get_messages
    translated_dict = translator.post_api(
  File "apps/frappe/frappe/frappeclient.py", line 341, in post_api
    res = self.session.post(
  File "env/lib/python3.10/site-packages/requests/sessions.py", line 637, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "env/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "env/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "env/lib/python3.10/site-packages/requests/adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='translate.erpnext.com', port=443): Max retries exceeded with url: /api/method/translator.api.get_strings_for_translation?language=en&start=0&page_length=100&search_text=&FrappeClient=%3Cclass+%27frappe.frappeclient.FrappeClient%27%3E&translator=%3Cfrappe.frappeclient.FrappeClient+object+at+0x7f7a68717be0%3E (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1007)')))
Marcus1Pierce commented 9 months ago

Still have this issue. Is the dev still support the translation?

coela-oss commented 8 months ago

When I run ERPNext locally using bench, only some translation files are included in the assets after build. Is this related?

sihma commented 3 months ago

Bumping. The site is using HSTS and there isn't a way to bypass it. So far I love ERPNext, and I want to improve the French translations, but if the portal is consistently buggy and ignored, I simply can't use ERPNext for my use case. Please solve this if possible! Thanks for your work.