Skip to content

Some tests failed in container environments #4

Open

Description

@guoyunhe

We are happy to answer your questions about the code or discuss technical ideas.

Please complete the following checklist (by adding [x]):

  • I have searched open and closed issues for duplicates
  • This isn't a feature request
  • This is not a report about my app not working as expected

I am trying to updating this package on openSUSE RPM repository. Some of the tests are failing because the code cannot access /var/user in the container environment:

[    6s] tests/connection/test_vpnconfiguration.py:111: 
[    6s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[    6s] proton/vpn/connection/vpnconfiguration.py:64: in __enter__
[    6s]     self._delete_existing_configuration()
[    6s] proton/vpn/connection/vpnconfiguration.py:89: in _delete_existing_configuration
[    6s]     for file in self.__base_path:
[    6s] proton/vpn/connection/vpnconfiguration.py:99: in __base_path
[    6s]     return ExecutionEnvironment().path_runtime
[    6s] /usr/lib/python3.10/site-packages/proton/utils/environment.py:57: in path_runtime
[    6s]     self.generate_dirs(self._path_runtime)
[    6s] /usr/lib/python3.10/site-packages/proton/utils/environment.py:68: in generate_dirs
[    6s]     os.makedirs(path, mode=0o700, exist_ok=True)
[    6s] /usr/lib64/python3.10/os.py:215: in makedirs
[    6s]     makedirs(head, exist_ok=exist_ok)
[    6s] /usr/lib64/python3.10/os.py:215: in makedirs
[    6s]     makedirs(head, exist_ok=exist_ok)
[    6s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[    6s] 
[    6s] name = '/run/user', mode = 511, exist_ok = True
[    6s] 
[    6s]     def makedirs(name, mode=0o777, exist_ok=False):
[    6s]         """makedirs(name [, mode=0o777][, exist_ok=False])
[    6s]     
[    6s]         Super-mkdir; create a leaf directory and all intermediate ones.  Works like
[    6s]         mkdir, except that any intermediate path segment (not just the rightmost)
[    6s]         will be created if it does not exist. If the target directory already
[    6s]         exists, raise an OSError if exist_ok is False. Otherwise no exception is
[    6s]         raised.  This is recursive.
[    6s]     
[    6s]         """
[    6s]         head, tail = path.split(name)
[    6s]         if not tail:
[    6s]             head, tail = path.split(head)
[    6s]         if head and tail and not path.exists(head):
[    6s]             try:
[    6s]                 makedirs(head, exist_ok=exist_ok)
[    6s]             except FileExistsError:
[    6s]                 # Defeats race condition when another thread created the path
[    6s]                 pass
[    6s]             cdir = curdir
[    6s]             if isinstance(tail, bytes):
[    6s]                 cdir = bytes(curdir, 'ASCII')
[    6s]             if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
[    6s]                 return
[    6s]         try:
[    6s] >           mkdir(name, mode)
[    6s] E           PermissionError: [Errno 13] Permission denied: '/run/user'
[    6s] 
[    6s] /usr/lib64/python3.10/os.py:225: PermissionError

Any idea how to fix it?

Activity

  1. alexandrevicenzi commented on Nov 12, 2024

    @alexandrevicenzi

    Adding something like the following to DummyVPNConnection might fix the issue.

    def __base_path(self):
        return "/tmp/some/path/"

    The problem is that OBS does not allow access to certain things outside the build directory, so a patch needs to be added to the package.

    I did not test this, but I can test it later and submit an SR.

  2. raspher commented on Mar 27, 2025

    @raspher

    bump, as of version 0.42.3 those tests are failing:

    • Permission denied: '/run/user'
      • tests/connection/test_events.py
      • tests/connection/test_persistence.py
      • tests/connection/test_states.py
      • tests/connection/test_vpnconfiguration.py
      • tests/connection/test_vpnconnection.py
      • tests/core/refresher/test_certificate_refresher.py
      • tests/core/refresher/test_client_config_refresher.py
      • tests/core/refresher/test_feature_flags_refresher.py
      • tests/core/refresher/test_server_list_refresher.py
      • tests/core/refresher/test_vpn_data_refresher.py
      • tests/core/test_connection.py
      • tests/core/test_usage.py
    • ImportError: cannot import name 'Features' from partially initialized module 'proton.vpn.core.settings' (most likely due to a circular import)
      • tests/core/test_settings.py
  3. szotsaki commented on Jul 29, 2026

    @szotsaki

    I can confirm that the following patch allows most of the listed tests run:

    --- tests/connection/test_vpnconnection.py	2026-05-28 14:16:53.000000000 +0200
    +++ tests/connection/test_vpnconnection.py	2026-07-29 09:47:58.686957296 +0200
    @@ -92,6 +92,9 @@ class DummyVPNConnection(VPNConnection):
         def _get_connection(self):
             return None
     
    +    def __base_path(self):
    +        return "/tmp/proton-vpn-test-dummy-vpn/"
    +
         @classmethod
         def validate(cls) -> bool:
             return True

    The exceptions are:

    [    8s] ________________ ERROR collecting tests/core/test_connection.py ________________
    [    8s] tests/core/test_connection.py:23: in <module>
    [    8s]     from proton.vpn.core.vpnconnector import VPNConnector
    [    8s] proton/vpn/core/vpnconnector.py:52: in <module>
    [    8s]     from proton.vpn.core.cache_handlers import PortForwardFileHandler
    [    8s] proton/vpn/core/cache_handlers/__init__.py:21: in <module>
    [    8s]     from proton.vpn.core.cache_handlers.port_forward_file_handler import PortForwardFileHandler
    [    8s] proton/vpn/core/cache_handlers/port_forward_file_handler.py:27: in <module>
    [    8s]     VPNExecutionEnvironment().path_runtime, "forwarded_port"
    [    8s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    8s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:140: in path_runtime
    [    8s]     path = os.path.join(super().path_runtime, self.PRODUCT)
    [    8s]                         ^^^^^^^^^^^^^^^^^^^^
    [    8s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:57: in path_runtime
    [    8s]     self.generate_dirs(self._path_runtime)
    [    8s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    8s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    8s] <frozen os>:226: in makedirs
    [    8s]     ???
    [    8s] <frozen os>:226: in makedirs
    [    8s]     ???
    [    8s] <frozen os>:236: in makedirs
    [    8s]     ???
    [    8s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    
    [    9s] ==================================== ERRORS ====================================
    [    9s] _________ ERROR at setup of test_ensure_configuration_file_is_created __________
    [    9s] 
    [    9s]     @pytest.fixture
    [    9s]     def modified_exec_env():
    [    9s]         from proton.utils.environment import ExecutionEnvironment
    [    9s] >       m = ExecutionEnvironment().path_runtime
    [    9s]             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    9s] 
    [    9s] tests/connection/test_vpnconfiguration.py:45: 
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:57: in path_runtime
    [    9s]     self.generate_dirs(self._path_runtime)
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    9s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] 
    [    9s] name = '/run/user', mode = 511, exist_ok = True
    [    9s] 
    [    9s] >   ???
    [    9s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    [    9s] 
    [    9s] <frozen os>:236: PermissionError
    [    9s] _____________ ERROR at setup of test_ovpnconfig_with_settings[udp] _____________
    [    9s] 
    [    9s]     @pytest.fixture
    [    9s]     def modified_exec_env():
    [    9s]         from proton.utils.environment import ExecutionEnvironment
    [    9s] >       m = ExecutionEnvironment().path_runtime
    [    9s]             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    9s] 
    [    9s] tests/networkmanager/openvpn/test_openvpnconfiguration.py:52: 
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:57: in path_runtime
    [    9s]     self.generate_dirs(self._path_runtime)
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    9s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] 
    [    9s] name = '/run/user', mode = 511, exist_ok = True
    [    9s] 
    [    9s] >   ???
    [    9s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    [    9s] 
    [    9s] <frozen os>:236: PermissionError
    [    9s] _____________ ERROR at setup of test_ovpnconfig_with_settings[tcp] _____________
    [    9s] 
    [    9s]     @pytest.fixture
    [    9s]     def modified_exec_env():
    [    9s]         from proton.utils.environment import ExecutionEnvironment
    [    9s] >       m = ExecutionEnvironment().path_runtime
    [    9s]             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    9s] 
    [    9s] tests/networkmanager/openvpn/test_openvpnconfiguration.py:52: 
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:57: in path_runtime
    [    9s]     self.generate_dirs(self._path_runtime)
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    9s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] 
    [    9s] name = '/run/user', mode = 511, exist_ok = True
    [    9s] 
    [    9s] >   ???
    [    9s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    [    9s] 
    [    9s] <frozen os>:236: PermissionError
    [    9s] ___________ ERROR at setup of test_ovpnconfig_with_certificate[udp] ____________
    [    9s] 
    [    9s]     @pytest.fixture
    [    9s]     def modified_exec_env():
    [    9s]         from proton.utils.environment import ExecutionEnvironment
    [    9s] >       m = ExecutionEnvironment().path_runtime
    [    9s]             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    9s] 
    [    9s] tests/networkmanager/openvpn/test_openvpnconfiguration.py:52: 
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:57: in path_runtime
    [    9s]     self.generate_dirs(self._path_runtime)
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    9s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] 
    [    9s] name = '/run/user', mode = 511, exist_ok = True
    [    9s] 
    [    9s] >   ???
    [    9s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    [    9s] 
    [    9s] <frozen os>:236: PermissionError
    [    9s] ___________ ERROR at setup of test_ovpnconfig_with_certificate[tcp] ____________
    [    9s] 
    [    9s]     @pytest.fixture
    [    9s]     def modified_exec_env():
    [    9s]         from proton.utils.environment import ExecutionEnvironment
    [    9s] >       m = ExecutionEnvironment().path_runtime
    [    9s]             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    9s] 
    [    9s] tests/networkmanager/openvpn/test_openvpnconfiguration.py:52: 
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:57: in path_runtime
    [    9s]     self.generate_dirs(self._path_runtime)
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    9s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] 
    [    9s] name = '/run/user', mode = 511, exist_ok = True
    [    9s] 
    [    9s] >   ???
    [    9s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    [    9s] 
    [    9s] <frozen os>:236: PermissionError
    [    9s] =================================== FAILURES ===================================
    [    9s] __________________ test_ensure_configuration_file_is_deleted ___________________
    [    9s] 
    [    9s] vpn_server = VPNServer(server_ip='10.10.1.1', openvpn_ports=ProtocolPorts(udp=[445, 5995], tcp=[80, 1194], tls=[8080]), wireguard_p...3pMQQA2Z2Qnp5s5nIvTVO2...lRjxhx9DCAUM9uXfM2ZUFjzPXw==', server_name='TestServer#10', has_ipv6_support=False, label='0')
    [    9s] 
    [    9s]     def test_ensure_configuration_file_is_deleted(vpn_server):
    [    9s]         cfg = MockVpnConfiguration(vpn_server, MockVpnCredentials(), MockSettings())
    [    9s]         fp = None
    [    9s] >       with cfg as f:
    [    9s]              ^^^
    [    9s] 
    [    9s] tests/connection/test_vpnconfiguration.py:91: 
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] proton/vpn/connection/vpnconfiguration.py:48: in __enter__
    [    9s]     self._delete_existing_configuration()
    [    9s] proton/vpn/connection/vpnconfiguration.py:73: in _delete_existing_configuration
    [    9s]     for file in self.__base_path:
    [    9s]                 ^^^^^^^^^^^^^^^^
    [    9s] proton/vpn/connection/vpnconfiguration.py:85: in __base_path
    [    9s]     return ExecutionEnvironment().path_runtime
    [    9s]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:57: in path_runtime
    [    9s]     self.generate_dirs(self._path_runtime)
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    9s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] 
    [    9s] name = '/run/user', mode = 511, exist_ok = True
    [    9s] 
    [    9s] >   ???
    [    9s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    [    9s] 
    [    9s] <frozen os>:236: PermissionError
    [    9s] ______________ test_ensure_generate_is_returning_expected_content ______________
    [    9s] 
    [    9s] vpn_server = VPNServer(server_ip='10.10.1.1', openvpn_ports=ProtocolPorts(udp=[445, 5995], tcp=[80, 1194], tls=[8080]), wireguard_p...3pMQQA2Z2Qnp5s5nIvTVO2...lRjxhx9DCAUM9uXfM2ZUFjzPXw==', server_name='TestServer#10', has_ipv6_support=False, label='0')
    [    9s] 
    [    9s]     def test_ensure_generate_is_returning_expected_content(vpn_server):
    [    9s]         cfg = MockVpnConfiguration(vpn_server, MockVpnCredentials(), MockSettings())
    [    9s] >       with cfg as f:
    [    9s]              ^^^
    [    9s] 
    [    9s] tests/connection/test_vpnconfiguration.py:100: 
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] proton/vpn/connection/vpnconfiguration.py:48: in __enter__
    [    9s]     self._delete_existing_configuration()
    [    9s] proton/vpn/connection/vpnconfiguration.py:73: in _delete_existing_configuration
    [    9s]     for file in self.__base_path:
    [    9s]                 ^^^^^^^^^^^^^^^^
    [    9s] proton/vpn/connection/vpnconfiguration.py:85: in __base_path
    [    9s]     return ExecutionEnvironment().path_runtime
    [    9s]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:57: in path_runtime
    [    9s]     self.generate_dirs(self._path_runtime)
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    9s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] 
    [    9s] name = '/run/user', mode = 511, exist_ok = True
    [    9s] 
    [    9s] >   ???
    [    9s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    [    9s] 
    [    9s] <frozen os>:236: PermissionError
    [    9s] ___________ test_ensure_same_configuration_file_in_case_of_duplicate ___________
    [    9s] 
    [    9s] vpn_server = VPNServer(server_ip='10.10.1.1', openvpn_ports=ProtocolPorts(udp=[445, 5995], tcp=[80, 1194], tls=[8080]), wireguard_p...3pMQQA2Z2Qnp5s5nIvTVO2...lRjxhx9DCAUM9uXfM2ZUFjzPXw==', server_name='TestServer#10', has_ipv6_support=False, label='0')
    [    9s] 
    [    9s]     def test_ensure_same_configuration_file_in_case_of_duplicate(vpn_server):
    [    9s]         cfg = MockVpnConfiguration(vpn_server, MockVpnCredentials(), MockSettings())
    [    9s] >       with cfg as f:
    [    9s]              ^^^
    [    9s] 
    [    9s] tests/connection/test_vpnconfiguration.py:109: 
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] proton/vpn/connection/vpnconfiguration.py:48: in __enter__
    [    9s]     self._delete_existing_configuration()
    [    9s] proton/vpn/connection/vpnconfiguration.py:73: in _delete_existing_configuration
    [    9s]     for file in self.__base_path:
    [    9s]                 ^^^^^^^^^^^^^^^^
    [    9s] proton/vpn/connection/vpnconfiguration.py:85: in __base_path
    [    9s]     return ExecutionEnvironment().path_runtime
    [    9s]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:57: in path_runtime
    [    9s]     self.generate_dirs(self._path_runtime)
    [    9s] /usr/lib/python3.14/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    9s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] <frozen os>:226: in makedirs
    [    9s]     ???
    [    9s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    [    9s] 
    [    9s] name = '/run/user', mode = 511, exist_ok = True
    [    9s] 
    [    9s] >   ???
    [    9s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    [    9s] 
    [    9s] <frozen os>:236: PermissionError
    

    @alexandrevicenzi, do you know if these tests could also be fixed with some override?

  4. szotsaki commented on Jul 29, 2026

    @szotsaki

    It seems the same error happens in the proton-vpn-cli package:

    [    6s] _____________________ ERROR collecting tests/unit/commands _____________________
    [    6s] /usr/lib64/python3.13/importlib/__init__.py:88: in import_module
    [    6s]     return _bootstrap._gcd_import(name[level:], package, level)
    [    6s]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    6s] <frozen importlib._bootstrap>:1395: in _gcd_import
    [    6s]     ???
    [    6s] <frozen importlib._bootstrap>:1360: in _find_and_load
    [    6s]     ???
    [    6s] <frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    [    6s]     ???
    [    6s] <frozen importlib._bootstrap>:935: in _load_unlocked
    [    6s]     ???
    [    6s] /usr/lib/python3.13/site-packages/_pytest/assertion/rewrite.py:197: in exec_module
    [    6s]     exec(co, module.__dict__)
    [    6s] tests/unit/commands/conftest.py:25: in <module>
    [    6s]     from proton.vpn.cli import app as app_cmd
    [    6s] ../BUILDROOT/usr/lib/python3.13/site-packages/proton/vpn/cli/__init__.py:35: in <module>
    [    6s]     from proton.vpn.cli.commands.account import signin, signout, info
    [    6s] ../BUILDROOT/usr/lib/python3.13/site-packages/proton/vpn/cli/commands/account.py:27: in <module>
    [    6s]     from proton.vpn.cli.core.controller import Controller
    [    6s] ../BUILDROOT/usr/lib/python3.13/site-packages/proton/vpn/cli/core/controller.py:51: in <module>
    [    6s]     from proton.vpn.core.api import ProtonVPNAPI
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/api.py:28: in <module>
    [    6s]     from proton.vpn.core.vpnconnector import VPNConnector
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/vpnconnector.py:52: in <module>
    [    6s]     from proton.vpn.core.cache_handlers import PortForwardFileHandler
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/cache_handlers/__init__.py:21: in <module>
    [    6s]     from proton.vpn.core.cache_handlers.port_forward_file_handler import PortForwardFileHandler
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/cache_handlers/port_forward_file_handler.py:27: in <module>
    [    6s]     VPNExecutionEnvironment().path_runtime, "forwarded_port"
    [    6s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    6s] /usr/lib/python3.13/site-packages/proton/utils/environment.py:140: in path_runtime
    [    6s]     path = os.path.join(super().path_runtime, self.PRODUCT)
    [    6s]                         ^^^^^^^^^^^^^^^^^^^^
    [    6s] /usr/lib/python3.13/site-packages/proton/utils/environment.py:57: in path_runtime
    [    6s]     self.generate_dirs(self._path_runtime)
    [    6s] /usr/lib/python3.13/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    6s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    6s] <frozen os>:218: in makedirs
    [    6s]     ???
    [    6s] <frozen os>:218: in makedirs
    [    6s]     ???
    [    6s] <frozen os>:228: in makedirs
    [    6s]     ???
    [    6s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    [    6s] ________________ ERROR collecting tests/unit/test_controller.py ________________
    [    6s] tests/unit/test_controller.py:24: in <module>
    [    6s]     from proton.vpn.cli.core.controller import Controller, Params, Feature
    [    6s] ../BUILDROOT/usr/lib/python3.13/site-packages/proton/vpn/cli/core/controller.py:51: in <module>
    [    6s]     from proton.vpn.core.api import ProtonVPNAPI
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/api.py:28: in <module>
    [    6s]     from proton.vpn.core.vpnconnector import VPNConnector
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/vpnconnector.py:52: in <module>
    [    6s]     from proton.vpn.core.cache_handlers import PortForwardFileHandler
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/cache_handlers/__init__.py:21: in <module>
    [    6s]     from proton.vpn.core.cache_handlers.port_forward_file_handler import PortForwardFileHandler
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/cache_handlers/port_forward_file_handler.py:27: in <module>
    [    6s]     VPNExecutionEnvironment().path_runtime, "forwarded_port"
    [    6s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    6s] /usr/lib/python3.13/site-packages/proton/utils/environment.py:140: in path_runtime
    [    6s]     path = os.path.join(super().path_runtime, self.PRODUCT)
    [    6s]                         ^^^^^^^^^^^^^^^^^^^^
    [    6s] /usr/lib/python3.13/site-packages/proton/utils/environment.py:57: in path_runtime
    [    6s]     self.generate_dirs(self._path_runtime)
    [    6s] /usr/lib/python3.13/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    6s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    6s] <frozen os>:218: in makedirs
    [    6s]     ???
    [    6s] <frozen os>:218: in makedirs
    [    6s]     ???
    [    6s] <frozen os>:228: in makedirs
    [    6s]     ???
    [    6s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    
    [    6s] ____________ ERROR collecting tests/unit/test_exception_handler.py _____________
    [    6s] tests/unit/test_exception_handler.py:24: in <module>
    [    6s]     from proton.vpn.cli.core.exception_handler import ExceptionHandler
    [    6s] ../BUILDROOT/usr/lib/python3.13/site-packages/proton/vpn/cli/__init__.py:35: in <module>
    [    6s]     from proton.vpn.cli.commands.account import signin, signout, info
    [    6s] ../BUILDROOT/usr/lib/python3.13/site-packages/proton/vpn/cli/commands/account.py:27: in <module>
    [    6s]     from proton.vpn.cli.core.controller import Controller
    [    6s] ../BUILDROOT/usr/lib/python3.13/site-packages/proton/vpn/cli/core/controller.py:51: in <module>
    [    6s]     from proton.vpn.core.api import ProtonVPNAPI
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/api.py:28: in <module>
    [    6s]     from proton.vpn.core.vpnconnector import VPNConnector
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/vpnconnector.py:52: in <module>
    [    6s]     from proton.vpn.core.cache_handlers import PortForwardFileHandler
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/cache_handlers/__init__.py:21: in <module>
    [    6s]     from proton.vpn.core.cache_handlers.port_forward_file_handler import PortForwardFileHandler
    [    6s] /usr/lib/python3.13/site-packages/proton/vpn/core/cache_handlers/port_forward_file_handler.py:27: in <module>
    [    6s]     VPNExecutionEnvironment().path_runtime, "forwarded_port"
    [    6s]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [    6s] /usr/lib/python3.13/site-packages/proton/utils/environment.py:140: in path_runtime
    [    6s]     path = os.path.join(super().path_runtime, self.PRODUCT)
    [    6s]                         ^^^^^^^^^^^^^^^^^^^^
    [    6s] /usr/lib/python3.13/site-packages/proton/utils/environment.py:57: in path_runtime
    [    6s]     self.generate_dirs(self._path_runtime)
    [    6s] /usr/lib/python3.13/site-packages/proton/utils/environment.py:68: in generate_dirs
    [    6s]     os.makedirs(path, mode=0o700, exist_ok=True)
    [    6s] <frozen os>:218: in makedirs
    [    6s]     ???
    [    6s] <frozen os>:218: in makedirs
    [    6s]     ???
    [    6s] <frozen os>:228: in makedirs
    [    6s]     ???
    [    6s] E   PermissionError: [Errno 13] Permission denied: '/run/user'
    
  5. szotsaki commented on Jul 30, 2026

    @szotsaki

    The same issue, Permission denied: '/run/user', happens also for proton-vpn-gtk-app and the following tests had to be disabled:

    [   10s] ERROR tests/unit/services/reconnector/test_network_monitor.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   10s] ERROR tests/unit/services/reconnector/test_reconnector.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/services/reconnector/test_vpn_monitor.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/test_controller.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/utils/test_exception_handler.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/split_tunneling/app/test_app_select_window.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/split_tunneling/app/test_data_structures.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/split_tunneling/app/test_installed_apps.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/split_tunneling/app/test_selected_app_list.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/split_tunneling/app/test_settings.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/split_tunneling/test_mode.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/split_tunneling/test_split_tunneling.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/test_account_settings.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/test_common.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/test_connection_settings.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/test_custom_dns.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/test_early_access.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/test_feature_settings.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/test_general_settings.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/settings/test_settings_window.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/headerbar/menu/test_menu.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/login/test_login_form.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/login/test_login_stack.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/login/test_login_widget.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/login/two_factor_auth/test_authenticator_app_form.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/login/two_factor_auth/test_security_key_form.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/login/two_factor_auth/test_two_factor_auth_stack.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/login/two_factor_auth/test_two_factor_auth_widget.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/main/pull_notifications/test_nps_survey_modal.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/main/test_main_widget.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/main/test_main_window.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/main/test_tray_indicator.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/serverlist/city_view/test_country_row.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/serverlist/city_view/test_hover_stack.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/serverlist/city_view/test_location_row.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/serverlist/city_view/test_row_content.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/serverlist/city_view/test_row_view_model.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/serverlist/city_view/test_secure_core_row.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/serverlist/city_view/test_server_list.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/serverlist/city_view/test_server_load.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/test_connection_status_widget.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/test_port_forward_widget.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/test_quick_connect_widget.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    [   11s] ERROR tests/unit/widgets/vpn/test_vpn_widget.py - PermissionError: [Errno 13] Permission denied: '/run/user'
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions