Skip to content

VPN retry fails while an earlier browser login is still waiting #4366

Open

Description

@benabraham

Compositor

Niri

Distribution

NixOS

If Other, please specify

No response

Select your Installation Method

Source

Was this your original Installation method?

Yes

If no, specify

No response

dms doctor -vC

Click to expand ## DMS Doctor Report

System

  • [ok] Operating System: NixOS 26.05 (Yarara)
    • Supported for runtime (install via NixOS module or Flake)
  • [ok] Architecture: amd64
  • [ok] Display Server: Wayland
    • WAYLAND_DISPLAY=wayland-1

Versions

  • [ok] DMS CLI: dms 2.2-beta+date=2026-11-21_ed8c047
    • /nix/store/cyryl7rk6rny84w7191322in6h6zwfh0-dms-shell-2.2-beta+date=2026-11-21_ed8c047/bin/.dms-wrapped
  • [ok] Quickshell: Quickshell 0.4.72 (revision 75d4524dc5e678ca4b64a1f862dd7509ca6852b1, distributed by Nix)
    • /home/srb/.cache/dms/qtbase/709c68b7663e1a20/libdux-qt-base.so.0
  • [ok] DMS Shell: 2.2-beta+date=2026-11-21_ed8c047
    • /nix/store/cyryl7rk6rny84w7191322in6h6zwfh0-dms-shell-2.2-beta+date=2026-11-21_ed8c047/share/quickshell/dms

Installation

  • [ok] DMS Configuration: Found
    • /nix/store/cyryl7rk6rny84w7191322in6h6zwfh0-dms-shell-2.2-beta+date=2026-11-21_ed8c047/share/quickshell/dms
  • [ok] shell.qml: Present
    • /nix/store/cyryl7rk6rny84w7191322in6h6zwfh0-dms-shell-2.2-beta+date=2026-11-21_ed8c047/share/quickshell/dms/shell.qml
  • [info] Install Type: Nix store
    • /nix/store/cyryl7rk6rny84w7191322in6h6zwfh0-dms-shell-2.2-beta+date=2026-11-21_ed8c047/share/quickshell/dms

Compositor

  • [ok] niri: niri unstable 2026-11-10 (commit 7f81a7f77b0e93464645232bd15ba2dc43ca3782)
    • /run/current-system/sw/bin/niri
  • [info] Active: niri
  • [ok] Background Blur: Supported
    • Compositor supports ext-background-effect-v1

Quickshell Features

  • [ok] Polkit: Available
    • Authentication prompts
  • [ok] IdleMonitor: Available
    • Idle detection
  • [ok] IdleInhibitor: Available
    • Prevent idle/sleep
  • [ok] ShortcutInhibitor: Available
    • Allow shortcut management (niri)
  • [ok] BackgroundBlur: Available
    • Background blur API support in Quickshell

Optional Features

  • [warn] accountsservice: Not available
    • User accounts
  • [warn] power-profiles-daemon: Not available
    • Power profile management
  • [ok] logind: Available
    • Session management
  • [ok] cups-pk-helper: Available
    • Printer management
  • [ok] I2C/DDC: 2 monitor(s) detected
    • External monitor brightness control
  • [ok] qt6-imageformats: Installed (3 formats)
    • Formats: WebP, TIFF, ICNS (/nix/store/h71cj0q28chr7s03q9ah96dfsf8dh2ia-qtimageformats-6.12.0/lib/qt-6/plugins/imageformats)
  • [ok] kimageformats: Installed (4 formats)
    • Formats: AVIF, HEIF, JXL, EXR (/nix/store/p2l1q96w2ahn3h22vjn18xp32iwca15q-kimageformats-6.31.0/lib/qt-6/plugins/imageformats)
  • [ok] Terminal: kitty
  • [ok] Network: NetworkManager
    • NetworkManager present. Using NM API.
  • [warn] matugen: Missing
    • Dynamic theming
  • [ok] cava: Installed
    • Audio visualizer
  • [info] khal: Not installed
    • Calendar events
  • [info] dux-search: Not installed
    • File search
  • [info] dux-calendar: Not installed
    • Calendar app
  • [info] dux-files: Not installed
    • File manager
  • [info] fprintd: Not installed
    • Fingerprint auth
  • [ok] adw-gtk3: Installed
    • GTK3 dynamic theming (system copy, applied on next theme apply)
  • [info] fcitx5: Not installed
    • Input Method Framework support

Config Files

  • [ok] settings.json: Present
    • /home/srb/.config/dms/settings.json
  • [ok] clsettings.json: Present
    • /home/srb/.config/dms/clsettings.json
  • [ok] plugin_settings.json: Present
    • /home/srb/.config/dms/plugin_settings.json
  • [ok] session.json: Present
    • /home/srb/.local/state/dms/session.json
  • [ok] dms-colors.json: Present
    • /home/srb/.cache/dms/dms-colors.json

Services

  • [warn] dms.service: Disabled
    • Nothing starts dms.service with niri.service. Run 'dms systemd enable'.
  • [ok] greetd: enabled
  • [ok] xdg-desktop-portal: Settings portal reachable

Environment

  • [info] QT_QPA_PLATFORMTHEME: qt5ct
  • [info] qt5ct plugin (Qt5): Cannot verify (no qmake/qtpaths)
    • Install a Qt development package to let dms doctor check the plugin against the path Qt actually searches.
  • [info] QT_QPA_PLATFORMTHEME_QT6: Not set, Qt6 uses QT_QPA_PLATFORMTHEME
  • [info] QS_ICON_THEME: Not set
  • [info] XDG_MENU_PREFIX: Not set

Fonts

  • [ok] Normal Font: Inter Variable
    • Available via fontconfig
  • [ok] Monospace Font: JetBrains Mono
    • Available via fontconfig
  • [ok] Display Font: DM Serif Display
    • /nix/store/cyryl7rk6rny84w7191322in6h6zwfh0-dms-shell-2.2-beta+date=2026-11-21_ed8c047/share/quickshell/dms/DCommon/assets/fonts/dm-serif-display/DMSerifDisplay-Regular.ttf

Summary: 0 error(s), 4 warning(s), 34 ok

Description

A VPN that logs in through the browser (Fortinet SAML in my case) keeps waiting for that login in the background for 5 minutes. The VPN row in the control center stops showing "Connecting..." after 30 seconds, so the attempt looks dead.

Nothing shows that a login is still pending, and there is no way to cancel it.

A retry then starts a second attempt instead of replacing it but it cannot listen on the redirect port the first one still holds:

failed to connect VPN: SAML authentication failed for the Fortinet gateway: cannot listen for the SAML redirect on port 8020: listen tcp 127.0.0.1:8020: bind: address already in use

The retry works again only after the first attempt times out, 5 minutes after it started.

  • code: runFortinetSAMLAuth in core/internal/server/network/backend_networkmanager_fortinet_saml.go binds the port; ConnectVPN gives each login its own 5-minute timeout, with no link between attempts.
  • UI: vpnIsBusy in quickshell/Services/DMSNetworkService.qml resets after 30 s.

Expected Behavior

  • A new connect attempt cancels any attempt that is waiting.
  • A cancelled attempt ends quietly, without a "VPN connection failed" error.

Possible improvement: while a browser login waits, the VPN row could show: "Waiting for browser login" with the time left, plus buttons to open the login page again, give it more time or cancel.

Steps to Reproduce

  1. Set up a Fortinet VPN profile that uses SAML login.
  2. Connect from the control center. The browser opens the company login page.
  3. Close the browser tab without logging in (or let the login stall).
  4. Wait 30 seconds until the row stops showing "Connecting…".
  5. Connect again within 5 minutes of step 2.

Error Messages/Logs

No response

Screenshots/Recordings

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Fields

Ricrac

https://ricrac.app/dux/issue/DUX-975

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions