Skip to content

Fix crash on captive portal Wi-Fi by ensuring NMConnection is fully initialized#354

Merged
stsdc merged 2 commits intoelementary:masterfrom
barunespadhy:master
Nov 23, 2025
Merged

Fix crash on captive portal Wi-Fi by ensuring NMConnection is fully initialized#354
stsdc merged 2 commits intoelementary:masterfrom
barunespadhy:master

Conversation

@barunespadhy
Copy link
Contributor

Fixes #351

Crash happens because the indicator sometimes creates an NM.SimpleConnection without a NM.SettingConnection, which causes libnma’s NMA.WifiDialog to assert and abort wingpanel.

The fix was to ensure that every connection passed to NMA.WifiDialog has both NM.SettingConnection and NM.SettingWireless attached, and only uses the dialog for secured networks. For open networks, it skips the dialog and directly activates the connection.

The inspiration for this fix was me trying to match the behavior of the Network settings plug, because things work fine there.

@barunespadhy
Copy link
Contributor Author

barunespadhy commented Nov 16, 2025

NOTE: I tested this fix by creating a captive portal using my laptop's hotspot and nodogsplash , which I connected to with my PC. I never really saw a captive portal window, but it effectively did simulate the bug because it crashed my wingpanel everytime I would try to connect to it.

@danirabbit danirabbit requested a review from a team November 19, 2025 19:39
@danirabbit danirabbit moved this to Needs review in OS 8.1.0 Nov 19, 2025
Copy link
Member

@stsdc stsdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm the solution works. Tested with a public free WiFi in Poland.
Good job, this bug was annoying!

@danirabbit danirabbit requested a review from stsdc November 23, 2025 18:36
@stsdc stsdc merged commit 4245f6a into elementary:master Nov 23, 2025
4 checks passed
@github-project-automation github-project-automation bot moved this from Needs review to Done in OS 8.1.0 Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

public train wifi crashes panel

2 participants