After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724779 - network-agent : cannot connect to new AP (password UI not showing up)
network-agent : cannot connect to new AP (password UI not showing up)
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-02-20 07:35 UTC by Alban Browaeys
Modified: 2014-03-03 14:18 UTC
See Also:
GNOME target: 3.12
GNOME version: ---


Attachments
0001-NetworkAgent-fix-initial-secrets-requests-after-1772.patch (2.66 KB, patch)
2014-02-20 21:13 UTC, Dan Williams
reviewed Details | Review
0001-NetworkAgent-fix-initial-secrets-requests-after-1772.patch (5.06 KB, patch)
2014-02-20 23:10 UTC, Dan Williams
committed Details | Review

Description Alban Browaeys 2014-02-20 07:35:55 UTC
since commit 17726abb0a42b7b103f58de5de00ed5e8c3a58d8 . Only noticed yesterday as since then I have been using already registered AP.


I guess the issue boils down to hints an empty string, thus old n_found was zero and the section of code previously enclosed by n_found == 0 plus flags check for interaction is now vpn only.

NM log:

Feb 20 07:06:06 penelope NetworkManager[26456]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
Feb 20 07:06:06 penelope NetworkManager[26456]: <debug> [1392876365.965019] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/settings/nm-agent-manager.c:623] request_next_agent(): (:1.506/org.gnome.Shell.NetworkAgent/1000) agent saving secrets for request 0x12ae470/<AP name>
Feb 20 07:06:06 penelope NetworkManager[26456]: <debug> [1392876366.350837] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/settings/nm-agent-manager.c:1262] save_done_cb(): (:1.506/org.gnome.Shell.NetworkAgent/1000) agent saved secrets for request 0x12ae470/<AP name>
Feb 20 07:06:06 penelope NetworkManager[26456]: <debug> [1392876366.413144] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/nm-properties-changed-signal.c:109] properties_changed(): NMDeviceWifi -> {Mode: 2}, {ActiveAccessPoint: /org/freedesktop/NetworkManager/AccessPoint/0},
Feb 20 07:06:06 penelope NetworkManager[26456]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
Feb 20 07:06:06 penelope NetworkManager[26456]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]
Feb 20 07:06:06 penelope NetworkManager[26456]: <info> Activation (wlan0/wireless): access point '<AP name>' has security, but secrets are required.
Feb 20 07:06:06 penelope NetworkManager[26456]: <info> (wlan0): device state change: config -> need-auth (reason 'none') [50 60 0]
Feb 20 07:06:06 penelope NetworkManager[26456]: <debug> [1392876366.415509] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/settings/nm-agent-manager.c:1190] nm_agent_manager_get_secrets(): Secrets requested for connection /org/freedesktop/NetworkManager/Settings/22 (<AP name>/802-11-wireless-security)
Feb 20 07:06:06 penelope NetworkManager[26456]: <debug> [1392876366.415616] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/settings/nm-agent-manager.c:587] request_add_agent(): (:1.506/org.gnome.Shell.NetworkAgent/1000) agent allowed for secrets request 0x129ae10/<AP name>
Feb 20 07:06:06 penelope NetworkManager[26456]: <debug> [1392876366.415652] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/settings/nm-settings-connection.c:929] nm_settings_connection_get_secrets(): (90d28bb8-cd2c-49ed-bbf9-a4c757bf4fab/802-11-wireless-security:11) secrets requested flags 0x5 hints ''
Feb 20 07:06:06 penelope NetworkManager[26456]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Feb 20 07:06:06 penelope NetworkManager[26456]: <debug> [1392876366.415700] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/settings/nm-agent-manager.c:1495] agent_permissions_changed_done(): (:1.506/org.gnome.Shell.NetworkAgent/1000) updated agent permissions
Feb 20 07:06:06 penelope NetworkManager[26456]: <debug> [1392876366.421465] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/nm-properties-changed-signal.c:109] properties_changed(): NMDeviceWifi -> {State: 60}, {StateReason: <transform error>},
Feb 20 07:06:06 penelope NetworkManager[26456]: <debug> [1392876366.421796] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/settings/nm-agent-manager.c:623] request_next_agent(): (:1.506/org.gnome.Shell.NetworkAgent/1000) agent getting secrets for request 0x129ae10/<AP name>
Feb 20 07:06:06 penelope NetworkManager[26456]: <debug> [1392876366.421824] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/settings/nm-agent-manager.c:1039] get_next_cb(): (0x129ae10/<AP name>/802-11-wireless-security) request has system secrets; checking agent :1.506 for MODIFY
Feb 20 07:06:06 penelope NetworkManager[26456]: <debug> [1392876366.808604] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/settings/nm-agent-manager.c:969] get_agent_modify_auth_cb(): (:1.506/org.gnome.Shell.NetworkAgent/1000) agent 0x129ae10/<AP name>/802-11-wireless-security MODIFY check result YES
Feb 20 07:06:09 penelope NetworkManager[26456]: <debug> [1392876369.136428] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/nm-properties-changed-signal.c:150] notify(): ignoring notification for prop visible on type NMKeyfileConnection
Feb 20 07:06:18 penelope NetworkManager[26456]: <debug> [1392876378.721176] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/devices/nm-device-wifi.c:1696] request_wireless_scan(): (wlan0): scan requested but not allowed at this time
Feb 20 07:06:19 penelope NetworkManager[26456]: <debug> [1392876378.721291] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/devices/nm-device-wifi.c:1751] schedule_scan(): (wlan0): scheduled scan in 33 seconds (interval now 33 seconds)

Feb 20 07:06:51 penelope NetworkManager[26456]: <debug> [1392876411.744211] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/devices/nm-device-wifi.c:1696] request_wireless_scan(): (wlan0): scan requested but not allowed at this time
Feb 20 07:06:51 penelope NetworkManager[26456]: <debug> [1392876411.744324] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/devices/nm-device-wifi.c:1751] schedule_scan(): (wlan0): scheduled scan in 33 seconds (interval now 33 seconds)

Feb 20 07:07:22 penelope NetworkManager[26456]: <debug> [1392876442.607018] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/settings/nm-agent-manager.c:837] get_done_cb(): (:1.506/org.gnome.Shell.NetworkAgent/1000) agent returned no secrets for request 0x129ae10/<AP name>/802-11-wireless-security
Feb 20 07:07:22 penelope NetworkManager[26456]: <debug> [1392876442.607137] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/settings/nm-settings-connection.c:728] agent_secrets_done_cb(): (90d28bb8-cd2c-49ed-bbf9-a4c757bf4fab/802-11-wireless-security:11) secrets request error: (6) No agents were available for this request.
Feb 20 07:07:22 penelope NetworkManager[26456]: <warn> No agents were available for this request.
Feb 20 07:07:22 penelope NetworkManager[26456]: <info> (wlan0): device state change: need-auth -> failed (reason 'no-secrets') [60 120 7]
Feb 20 07:07:22 penelope NetworkManager[26456]: <debug> [1392876442.607708] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/nm-manager.c:4291] connectivity_changed(): connectivity checking indicates FULL
Feb 20 07:07:22 penelope NetworkManager[26456]: <info> NetworkManager state is now CONNECTED_LOCAL
Feb 20 07:07:22 penelope NetworkManager[26456]: <debug> [1392876442.607948] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/nm-active-connection.c:442] check_master_ready(): (0x11efbc0): not signalling master-ready (not activating)
Feb 20 07:07:22 penelope NetworkManager[26456]: <debug> [1392876442.607976] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/devices/nm-device.c:7410] nm_device_remove_pending_action(): (wlan0): remove_pending_action (0): 'activation::0x11efbc0'
Feb 20 07:07:22 penelope NetworkManager[26456]: <debug> [1392876442.608009] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/nm-properties-changed-signal.c:150] notify(): ignoring notification for prop has-pending-action on type NMDeviceWifi
Feb 20 07:07:22 penelope NetworkManager[26456]: <debug> [1392876442.608238] [/home/prahal/Projects/Devel/Gnome/jhbuild/gnome/NetworkManager/src/nm-policy.c:1413] device_state_changed(): Connection '<AP name>' now blocked from autoconnect due to no secrets
Feb 20 07:07:22 penelope NetworkManager[26456]: <warn> Activation (wlan0) failed for connection '<AP name>'
Comment 1 Adam Williamson 2014-02-20 18:38:37 UTC
I can confirm this, as I see it every time I test a new Fedlet build. You can pick Wi-Fi -> "Select Network" and get a nice Shell-y list of APs, and pick one, but if it's protected, you never get prompted for the passphrase and of course it doesn't connect.

Been seeing it for a few weeks, but couldn't pin it down to a precise commit.
Comment 2 Adam Williamson 2014-02-20 18:44:26 UTC
Should probably block 3.12 release, I'd think.
Comment 3 drago01 2014-02-20 19:07:12 UTC
(In reply to comment #0)
> since commit 17726abb0a42b7b103f58de5de00ed5e8c3a58d8 [..]

Does reverting that commit make things work for you?
Comment 4 Dan Williams 2014-02-20 21:13:43 UTC
Created attachment 269840 [details] [review]
0001-NetworkAgent-fix-initial-secrets-requests-after-1772.patch
Comment 5 Dan Williams 2014-02-20 21:16:35 UTC
(In reply to comment #3)
> (In reply to comment #0)
> > since commit 17726abb0a42b7b103f58de5de00ed5e8c3a58d8 [..]
> 
> Does reverting that commit make things work for you?

Reverting the commit will "fix" that issue, but will bring back the VPN issues that 17726abb did fix.  The just-attached patch should fix all the issues.

(yes, 17726abb was incomplete, I claim the Asoh defense...)
Comment 6 Florian Müllner 2014-02-20 21:21:51 UTC
Review of attachment 269840 [details] [review]:

LGTM

::: src/shell-network-agent.c
@@ +330,2 @@
   /* All VPN requests get sent to the VPN's auth dialog, since it knows better
+   * than the agent do about what secrets are required.  Otherwise, if no

Already in the existing comment, but probably a good time to fix:
"it knows better than the agent do about ..." - should be "... what to do about ..." I guess?
Comment 7 Jasper St. Pierre (not reading bugmail) 2014-02-20 21:22:36 UTC
Review of attachment 269840 [details] [review]:

Not quite yet, Florian. I want to make sure this is correct in all cases.

::: src/shell-network-agent.c
@@ +333,3 @@
    */
+  if (closure->is_vpn ||
+        (!n_found && (closure->flags & NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION)))

Style nit: indentation here is incorrect.
Comment 8 Dan Williams 2014-02-20 23:10:40 UTC
Created attachment 269847 [details] [review]
0001-NetworkAgent-fix-initial-secrets-requests-after-1772.patch

Take two; also found out the shell was saving secrets back to the keyring when NM was only asking for existing secrets, so don't do that.
Comment 9 Jasper St. Pierre (not reading bugmail) 2014-02-20 23:15:04 UTC
Review of attachment 269847 [details] [review]:

Just needs some comment fixes.

::: src/shell-network-agent.c
@@ +330,3 @@
   /* All VPN requests get sent to the VPN's auth dialog, since it knows better
+   * than the agent about what secrets are required.  Otherwise, if no secrets
+   * were found and interaction is allowed the ask for some secrets, because

"then ask"

@@ +331,3 @@
+   * than the agent about what secrets are required.  Otherwise, if no secrets
+   * were found and interaction is allowed the ask for some secrets, because
+   * NetworkManager will fail the connection if not secrets are returned

"will fail the connection" => "will fail to connect"

"no secrets"

@@ +332,3 @@
+   * were found and interaction is allowed the ask for some secrets, because
+   * NetworkManager will fail the connection if not secrets are returned
+   * instead of asking again with REQUEST_NEW.

If this is actually a bug, would be nice to be have a bgo# reference here.
Comment 10 Adam Williamson 2014-02-21 03:57:34 UTC
sigh - I want to test this, but it's going to have to wait for the other side of the cogl rebuild.
Comment 11 Adam Williamson 2014-02-21 10:02:59 UTC
Tested version from c#8, looks good.
Comment 12 Alban Browaeys 2014-02-23 18:19:32 UTC
Also tested version from comment #8 . Works well. Thanks!
Comment 13 drago01 2014-03-03 14:18:38 UTC
Comment on attachment 269847 [details] [review]
0001-NetworkAgent-fix-initial-secrets-requests-after-1772.patch

Just pushed it to get it off the blocker list.