Repository navigation
Open
Description
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?
Metadata
Metadata
Assignees
Labels
No labels
Activity
alexandrevicenzi commentedon Nov 12, 2024
Adding something like the following to
DummyVPNConnectionmight fix the issue.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.
raspher commentedon Mar 27, 2025
bump, as of version
0.42.3those tests are failing:Permission denied: '/run/user'tests/connection/test_events.pytests/connection/test_persistence.pytests/connection/test_states.pytests/connection/test_vpnconfiguration.pytests/connection/test_vpnconnection.pytests/core/refresher/test_certificate_refresher.pytests/core/refresher/test_client_config_refresher.pytests/core/refresher/test_feature_flags_refresher.pytests/core/refresher/test_server_list_refresher.pytests/core/refresher/test_vpn_data_refresher.pytests/core/test_connection.pytests/core/test_usage.pyImportError: cannot import name 'Features' from partially initialized module 'proton.vpn.core.settings' (most likely due to a circular import)tests/core/test_settings.pyszotsaki commentedon Jul 29, 2026
I can confirm that the following patch allows most of the listed tests run:
The exceptions are:
@alexandrevicenzi, do you know if these tests could also be fixed with some override?
szotsaki commentedon Jul 29, 2026
It seems the same error happens in the
proton-vpn-clipackage:szotsaki commentedon Jul 30, 2026
The same issue,
Permission denied: '/run/user', happens also for proton-vpn-gtk-app and the following tests had to be disabled: