Skip to content

TimeoutError on all connections crashes application. #110

@thetacola

Description

@thetacola

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
  • [it very much is] This is not a report about my app not working as expected

I like how the bug report link to contact customer support leads to a page asking me to "upgrade to Proton Unlimited", with zero contact information for customer support... very classy...

I have been having a reoccurring issue where the application gets stuck connecting on launch. Usually this is due to a server going down (ex. if it wanted to connect to CA#30, but CA#30 no longer exists, it'd get stuck). Usually this could be fixed by deleting everything in ~/.cache/Proton/VPN, however this time that did not fix it. I removed the line in ~/.config/Proton/VPN/app-config.json that was making it auto-connect, so I can now at least start the application. However, connecting to any server crashes the application via a TimeoutError. There really should be some sort of catch for this (a crash is not a catch), as this is a rather common issue that happens with network connections, but I digress.

Here's the trace:

2025-05-21T03:27:25.621984+00:00 | proton.vpn.app.gtk.utils.exception_handler:257 | CRITICAL | APP:CRASH | Unexpected error.
Traceback (most recent call last):
  File "/usr/lib/python3.13/asyncio/tasks.py", line 507, in wait_for
    return await fut
           ^^^^^^^^^
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.13/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/lib/python3.13/site-packages/proton/vpn/core/connection.py", line 394, in connect
    await self._on_connection_event(
        events.Up(events.EventContext(connection=connection))
    )
  File "/usr/lib/python3.13/site-packages/proton/vpn/core/connection.py", line 463, in _on_connection_event
    event = await self._handle_on_event(event)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/proton/vpn/core/connection.py", line 448, in _handle_on_event
    return await self._update_state(new_state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/proton/vpn/core/connection.py", line 485, in _update_state
    new_event = await self._current_state.run_tasks()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/proton/vpn/connection/states.py", line 240, in run_tasks
    await self.context.kill_switch.enable(
    ...<2 lines>...
    )
  File "/usr/lib/python3.13/site-packages/proton/vpn/backend/linux/networkmanager/killswitch/wireguard/wgkillswitch.py", line 64, in enable
    await self._ks_handler.add_kill_switch_connection(permanent)
  File "/usr/lib/python3.13/site-packages/proton/vpn/backend/linux/networkmanager/killswitch/wireguard/killswitch_connection_handler.py", line 134, in add_kill_switch_connection
    await _wrap_future(
        self.nm_client.add_connection_async(kill_switch.connection, save_to_disk=permanent)
    )
  File "/usr/lib/python3.13/site-packages/proton/vpn/backend/linux/networkmanager/killswitch/wireguard/killswitch_connection_handler.py", line 56, in _wrap_future
    return await asyncio.wait_for(
           ^^^^^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
    )
    ^
  File "/usr/lib/python3.13/asyncio/tasks.py", line 506, in wait_for
    async with timeouts.timeout(timeout):
               ~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3.13/asyncio/timeouts.py", line 116, in __aexit__
    raise TimeoutError from exc_val
TimeoutError

This is on Arch Linux via the official proton-vpn-gtk-app package on version 4.9.6. I've seen some speculation that the API got shut down today. I suspect that may have something to do with this. I've also seen similar issues here involving IPv6 being disabled. IPv6 is enabled here, so that is not the issue.

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