Score:-2

Couldn't launch proton vpn

in flag

If I try to open proton via clicking on the icon,nothing happens whereas if I use the terminal and type protonvpn I get page full of exception and errors.

Traceback (most recent call last):
  File "/usr/bin/protonvpn", line 11, in <module>
    load_entry_point('protonvpn-gui==1.12.0', 'console_scripts', 'protonvpn')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/protonvpn_gui/main.py", line 14, in <module>
    from proton.constants import VERSION as proton_version
  File "/usr/lib/python3/dist-packages/proton/__init__.py", line 1, in <module>
    from .api import Session # noqa
  File "/usr/lib/python3/dist-packages/proton/api.py", line 6, in <module>
    import requests
  File "/usr/lib/python3/dist-packages/requests/__init__.py", line 95, in <module>
    from urllib3.contrib import pyopenssl
  File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in <module>
    class X509StoreFlags(object):
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 32, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 12, in <module>
    import os, glob, subprocess, os.path, time, pwd, sys, requests_unixsocket
  File "/usr/lib/python3/dist-packages/requests_unixsocket/__init__.py", line 1, in <module>
    import requests
  File "/usr/lib/python3/dist-packages/requests/__init__.py", line 95, in <module>
    from urllib3.contrib import pyopenssl
  File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in <module>
    class X509StoreFlags(object):
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/protonvpn", line 11, in <module>
    load_entry_point('protonvpn-gui==1.12.0', 'console_scripts', 'protonvpn')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/python3/dist-packages/protonvpn_gui/main.py", line 14, in <module>
    from proton.constants import VERSION as proton_version
  File "/usr/lib/python3/dist-packages/proton/__init__.py", line 1, in <module>
    from .api import Session # noqa
  File "/usr/lib/python3/dist-packages/proton/api.py", line 6, in <module>
    import requests
  File "/usr/lib/python3/dist-packages/requests/__init__.py", line 95, in <module>
    from urllib3.contrib import pyopenssl
  File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in <module>
    class X509StoreFlags(object):
  File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

I have tried reinstalling it, the same issue persists.

UPDATE: I have updated pyopenssl after which the app launched. But now the GUI says "Error Loading Servers" "Nonetype object has no attribute get"

So I checked the log files and found:

2023-01-17 06:02:56,525 — dashboard.py — ERROR —check_if_events_should_be_displayed:221 — 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/protonvpn_gui/view_model/dashboard.py", line 215, in check_if_events_should_be_displayed
    all_notitications = protonvpn.get_session().get_all_notifications()
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/session/session.py", line 883, in get_all_notifications
    self._notifications.get_all_notifications()
  File "/usr/lib/python3/dist-packages/protonvpn_nm_lib/core/notification/notifications.py", line 47, in get_all_notifications
    notifications = self.__data.get("Notifications", None)
AttributeError: 'NoneType' object has no attribute 'get'
2023-01-17 06:04:32,980 — main.py — INFO —do_startup:75 — 
Score:0
ao flag

maybe you should checkout the dependencies of protonvpn, from protonvpn-nm-lib on github

make sure the packages on your server matches.

Sahil Ahmed avatar
in flag
The packages match, this issue exists in other apps startup as well. If I try to run pip or ubuntu software and updates on terminal the same error comes up. I think it has to do with some python file dependency but I cant seem to find which one and its difficult to install python packages without pip running.
Score:0
in flag

This happened due to pyOpenSSL package version 22 causing an issue with the cryptography package(2.8). I downgraded pyOpenSSL to version 19 and now proton is running fine.

This caused issues for other apps to launch as well, like software and updates livepatch, ubuntu software center etc, moreover running pip would throw the same error, I had installed pip with the apt package manager with command,

sudo apt install python3-pip

and pip won't work.

Finally, I removed that package and install it via-

$ curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python get-pip.py

and this installation was fine since after it pip worked fine and I was able to manage packages easily.

karel avatar
sa flag
Please click the gray check mark beside your answer to mark it as accepted and help other Ask Ubuntu users to find your accepted answer more easily. The check symbol will change its color from gray to green when it is clicked.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.