Bug 355067 - Can only connect once to wireless network
Summary: Can only connect once to wireless network
Status: RESOLVED FIXED
Alias: None
Product: plasma-nm
Classification: Plasma
Component: applet (show other bugs)
Version: 5.4.2
Platform: Kubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
: 355501 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-09 02:39 UTC by Chris Vanden Berghe
Modified: 2015-11-25 16:05 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Log from DBUS as requested (35.65 KB, text/x-log)
2015-11-09 16:32 UTC, soeren_h
Details
Network-manager log as requested (29.92 KB, text/x-log)
2015-11-09 16:33 UTC, soeren_h
Details
Plasma-nm log as requested (37.23 KB, text/x-log)
2015-11-09 16:33 UTC, soeren_h
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Vanden Berghe 2015-11-09 02:39:57 UTC
After upgrading from 15.04 to 15.10 plasma-nm no longer autoconnects to existing networks. In fact, even clicking on 'connect' in network manager yields no result. The only way to join a network is to remove the existing network and readd it. On adding it will connect to the network. Every subsequent connection attempt requires the same steps (remove network and readd). In 'Configure network connections' I'm not able to edit existing networks. The window abruptly closes when I do that.

Everything worked just fine under 15.04 although I did initially have an issue on upgrade from 14.10 to 15.04 in which I had to edit existing wireless networks to enable autoconnect (something along the lines of allow/enable connection for all users). I only had to this once for each existing network, though.

https://bugs.launchpad.net/ubuntu/+source/plasma-nm/+bug/1509140

Reproducible: Always

Steps to Reproduce:
1. try to unsuccessfully connect to existing network
2. remove network
3. re-add network
4. successfully connect to network

Actual Results:  
No connection to existing networks.

Expected Results:  
Auto-connects to existing networks.
Comment 1 Jan Grulich 2015-11-09 06:40:23 UTC
Please provide information from https://techbase.kde.org/Projects/Solid/Plasma-nm#My_connection_in_the_applet_shows_wrong_information and from https://techbase.kde.org/Projects/Solid/Plasma-nm#Plasma-nm_fails_to_activate_my_connection. This looks like a problem in NetworkManager unless we do something wrong with connection path.
Comment 2 soeren_h 2015-11-09 16:31:35 UTC
I got the same issue here.
Hope the attached logs do help to solve the issue.
Comment 3 soeren_h 2015-11-09 16:32:40 UTC
Created attachment 95405 [details]
Log from DBUS as requested
Comment 4 soeren_h 2015-11-09 16:33:22 UTC
Created attachment 95406 [details]
Network-manager log as requested
Comment 5 soeren_h 2015-11-09 16:33:50 UTC
Created attachment 95407 [details]
Plasma-nm log as requested
Comment 6 Jan Grulich 2015-11-10 09:23:37 UTC
Hmm, according to the logs it fails due to missing secrets, which means there is something wrong either with our secret agent or with KWallet. I'm not able to reproduce it on fresh Kubuntu 15.10 so probably something went wrong during update from Kubuntu 15.04. Check please your KWallet configuration, if it's enabled and if plasma-nm is doesn't have denied access. Also  please provide info from https://techbase.kde.org/Projects/Solid/Plasma-nm#Plasma-nm_doesn.27t_remember_my_password. As a workaround try to save your secrets to NetworkManager, just check "All users may connect to this network" in configuration when creating or editing your connection.
Comment 7 Chris Vanden Berghe 2015-11-10 11:29:48 UTC
Hi Jan,

# if `qdbus org.kde.kded5 /kded org.kde.kded5.loadedModules | grep networkmanagement > /dev/null`; then echo "running"; else echo "not running"; fi
not running

I killed and restarted kded5 and then got 'running'. Unfortunately I'm still unable to connect to the network except for the first time.

Your suggestion to allow all users does not work as the connection editor crashes without error message when I edit a connection (might need to raise a separate bug for this?).

I might be able to experiment a bit more tomorrow morning.
Comment 8 Jan Grulich 2015-11-10 11:45:01 UTC
Our kded module (secret agent) is needed for providing and storing secrets. Does it work when you run the module and create your connection again? If it's not running and you create a new connection then secrets are not stored into KWallet and NM expect them to be there and thus fails.

For the crash you can report a new bug, but backtrace of the crash would be needed.
Comment 9 Chris Vanden Berghe 2015-11-11 01:52:09 UTC
This morning plasma-nm prompted me for a password for a known network and then, after entering the password, proceeded to auto-connect. Progress! So, for me at least, the issue is indeed most likely related to Secret agent/KWallet. One could argue that plasma-nm could provide a more graceful failure mode in case Secret agent is not running, though.

I have unsuccessfully looked for information on the relationship between KWallet and Secret agent, and their respective workings. Is there a way to completely erase their configuration and reinstall?

Regarding editor crash (which still happens): if you could point me to some documentation on how to generate said stacktrace then I will raise a new bug report.
Comment 10 Jan Grulich 2015-11-11 08:16:29 UTC
Prompt for a password means that our secret agent is running. Check if your password (or if any password) is stored in KWallet, run kwalletmanager5 and go into Network Management folder and maps. 

I don't know where is other KWallet configuration, but something is under $HOME/.config/kwallet* (removing those will not probably help).

First install debug symbols for plasma-nm and networkmanager-qt. Then run "gdb kde5-nm-connection-editor", in gdb shell type "r" to launch the editor and try to reproduce the issue and once it crashes (you should see that in gdb shell) type "bt" to get the backtrace.
Comment 11 Chris Vanden Berghe 2015-11-11 08:51:42 UTC
Good news! When download the dbg symbols I got the following error:

The following packages have unmet dependencies:
 libkf5networkmanagerqt6-dbg : Depends: libkf5networkmanagerqt6 (= 5.15.0-0ubuntu1) but 5.15.0+git20151020.0033+15.04-0 is to be installed

When I manually downloaded and installed the package from the Ubuntu website the editor started working as expected!

I was using a KDE updates PPA in 15.04 (which was disabled automatically on upgrade to 15.10) which must have been interfering with a few things.
Comment 12 Chris Vanden Berghe 2015-11-12 00:10:32 UTC
As mentioned on the Ubuntu bug report:

Ok, I can confirm that the issue is solved for me now. The issue was related to KWallet/Secret Agent not running. By restarting KDED things magically started working.

I *think* the root cause might be that I was using Kubuntu Updates (initially) and Kubuntu CI Stable (later on) PPAs on Vivid. All PPAs got automatically disabled on upgrade to Willy but did leave some files lingering (as they are at higher version than Willy).

I did the following steps (not all might be necessary):

- opened KWallet, created a new wallet and removed old one
- restarted KDED, added new wifi connection, disconnected from wifi, reconnected successfully (but connection editor still crashes on edit)
- used ppa-purge to downgrade all packages from above mentioned PPAs (need to readd PPAs first), used accepted answer on http://askubuntu.com/questions/363653/remove-all-packages-installed-from-a-ppa as guide
- confirmed that connection editor no longer crashes
- rebooted, wifi automatically connected, connection editor is working, KWallet shows connection I created

I'll leave the report open until other affected people confirm if this solution works for them as well.
Comment 13 soeren_h 2015-11-15 08:28:53 UTC
Deinstalling libkf5networkmanagerqt6 packages and reinstalling with all dependencies from Kubuntu 15.10 solved the problem for me as well.
Unfortunately now kmail crashes on every start up. But thats another story.
Comment 14 Jan Grulich 2015-11-17 20:05:28 UTC
*** Bug 355501 has been marked as a duplicate of this bug. ***
Comment 15 Peter Chibunna 2015-11-18 11:10:31 UTC
I tried to reinstall libkf5networkmanagerqt6, but it's trying to uninstall these as well:
kinfocenter libkf5networkmanagerqt6 plasma-desktop plasma-nm plasma-workspace sddm sddm-theme-breeze

I might not get a desktop if I proceed so I should go on?
Comment 16 Chris Vanden Berghe 2015-11-23 04:24:12 UTC
Peter, did you try the method I described a bit earlier in the bug report?
Comment 17 Peter Chibunna 2015-11-23 10:34:03 UTC
I did the uninstall of libkf5networkmanagerqt6 and allowed to pull anything it wants to uninstall [including plasma-workspace and sddm, ...] I made a note of those things that were uninstalled and then re-installed them while still connected to the wifi.

But before the re-installation, I did sudo apt-get update and then did the installation of libkf5networkmanagerqt6 and the other required components.

IT solved the problem.
Comment 18 Chris Vanden Berghe 2015-11-25 16:05:38 UTC
I'm closing this bug as it seems to be specific to the Kubuntu package and the solution described in the report seems to work.