System status checks page stopped working with the last update

Hey all. Is anybody else seeing this? “The system status checks” page has started reporting “Error Something went wrong, sorry.” every time it loads since the update to 0.21b.

Where can I find logs to report what could be the problem?

Edit: I checked syslog when loading the status page and got the following log entry:

Dec  8 12:24:43 mailbox Exception on /system/status [POST]#012multiprocessing.pool.RemoteTraceback: #012"""#012Traceback (most recent call last):#012  File "/usr/lib/python3.4/multiprocessing/pool.py", line 119, in worker#012    result = (True, func(*args, **kwds))#012  File "/usr/lib/python3.4/multiprocessing/pool.py", line 47, in starmapstar#012    return list(itertools.starmap(args[0], args[1]))#012  File "/home/mark/mailinabox/management/status_checks.py", line 332, in run_domain_checks_on_domain#012    ssl_certificates = get_ssl_certificates(env)#012  File "/home/mark/mailinabox/management/ssl_certificates.py", line 47, in get_ssl_certificates#012    pem = load_pem(load_cert_chain(fn)[0])#012  File "/home/mark/mailinabox/management/ssl_certificates.py", line 765, in load_pem#012    return serialization.load_pem_private_key(pem, password=None, backend=default_backend())#012  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/backends/__init__.py", line 71, in default_backend#012    _default_backend = MultiBackend(_available_backends())#012  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/backends/__init__.py", line 28, in _available_backends#012    "cryptography.backends"#012  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/backends/__init__.py", line 27, in <listcomp>#012    for ep in pkg_resources.iter_entry_points(#012  File "/usr/local/lib/python3.4/dist-packages/pkg_resources/__init__.py", line 2297, in resolve#012    module = __import__(self.module_name, fromlist=['__name__'], level=0)#012  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/backends/openssl/__init__.py", line 7, in <module>#012    from cryptography.hazmat.backends.openssl.backend import backend#012  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/backends/openssl/backend.py", line 48, in <module>#012    from cryptography.hazmat.bindings.openssl import binding#012  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 207, in <module>#012    Binding.init_static_locks()#012  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 178, in init_static_locks#012    cls._ensure_ffi_initialized()#012  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 165, in _ensure_ffi_initialized#012    cls.lib = build_conditional_library(lib, CONDITIONAL_NAMES)#012  File "/usr/local/lib/python3.4/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 104, in build_conditional_library#012    if not getattr(lib, condition):#012AttributeError: cffi library '_openssl' has no function, constant or global variable named 'Cryptography_HAS_NPN_NEGOTIATED'#012"""#012#012The above exception was the direct cause of the following exception:#012#012Traceback (most recent call last):#012  File "/usr/lib/python3/dist-packages/flask/app.py", line 1817, in wsgi_app#012    response = self.full_dispatch_request()#012  File "/usr/lib/python3/dist-packages/flask/app.py", line 1477, in full_dispatch_request#012    rv = self.handle_user_exception(e)#012  File "/usr/lib/python3/dist-packages/flask/app.py", line 1381, in handle_user_exception#012    reraise(exc_type, exc_value, tb)#012  File "/usr/lib/python3/dist-packages/flask/_compat.py", line 33, in reraise#012    raise value#012  File "/usr/lib/python3/dist-packages/flask/app.py", line 1475, in full_dispatch_request#012    rv = self.dispatch_request()#012  File "/usr/lib/python3/dist-packages/flask/app.py", line 1461, in dispatch_request#012    return self.view_functions[rule.endpoint](**req.view_args)#012  File "/usr/local/bin/mailinabox-daemon", line 55, in newview#012    return viewfunc(*args, **kwargs)#012  File "/usr/local/bin/mailinabox-daemon", line 442, in system_status#012    run_checks(False, env, output, pool)#012  File "/home/mark/mailinabox/management/status_checks.py", line 65, in run_checks#012    run_domain_checks(rounded_values, env, output, pool)#012  File "/home/mark/mailinabox/management/status_checks.py", line 323, in run_domain_checks#012    ret = pool.starmap(run_domain_checks_on_domain, args, chunksize=1)#012  File "/usr/lib/python3.4/multiprocessing/pool.py", line 268, in starmap#012    return self._map_async(func, iterable, starmapstar, chunksize).get()#012  File "/usr/lib/python3.4/multiprocessing/pool.py", line 599, in get#012    raise self._value#012AttributeError: cffi library '_openssl' has no function, constant or global variable named 'Cryptography_HAS_NPN_NEGOTIATED'

I get similar entries in syslog when I try to load the TLS cert page or the external DNS page, too.

I have the same issue after upgrading. "Error Something went wrong, sorry."
I tried running sudo mailinabox again and it throws an error from running pip3 install email-validator>=1.0.0

Traceback (most recent call last):
...
AttributeError: cffi library '_openssl' has no function, constant or global variable named 'Cryptography_HAS_SET_ECDH_AUTO'

The last part changes sometimes if you try to run it again or just in general tries to run pip3. Another example is:

AttributeError: cffi library '_openssl' has no function, constant or global variable named 'Cryptography_HAS_SCRYPT'

I then found a bug report on launchpad that was kinda similar, which had a workaround of upgrading the cffi package in python using easy_install so I attempted to run sudo easy_install3 cffi, which upgraded cffi, but the error is still there.
I then tried to upgrade using sudo apt install python3-cffi which did install new packages, but didn’t resolve the issue.

Should also have read this

Oops. You are totally right. Josh’s solution worked for me but I had reinstall python3-openssl (sudo apt-get install python3-openssl) like another user posted before I could get the mailinabox script to run without errors.

All good here.