Bug 375057 - No agents were available for this request.
Summary: No agents were available for this request.
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networking in general (show other bugs)
Version: master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-14 20:28 UTC by hector acosta
Modified: 2024-12-23 18:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
kded5 gdb outptut (6.88 KB, text/plain)
2017-01-19 09:44 UTC, brancaleone
Details
Patch to fix the crash of openconnect dialog (603 bytes, patch)
2017-01-19 09:56 UTC, Jan Grulich
Details
Patch to fix the crash of openconnect dialog (909 bytes, patch)
2017-01-19 12:46 UTC, Jan Grulich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hector acosta 2017-01-14 20:28:44 UTC
I'm unsure if this is strictly related to plasma-nm or if it's related to other component.


Trying to connect to an openconnect-based vpn fails with the following error (in the journal).

Failed to request VPN secrets #3: No agents were available for this request.


Jan 14 14:19:06 tamal NetworkManager[527]: <error> [1484425146.1838] vpn-connection[0x102e2f0,c1cfaabd-177c-4b79-b205-22159cc3bf67,"VPN NAME",0]: Failed to request VPN secrets #3: No agents were available for this request.
Jan 14 14:19:06 tamal NetworkManager[527]: <info>  [1484425146.1914] vpn-connection[0x102e2f0,c1cfaabd-177c-4b79-b205-22159cc3bf67,"VPN NAME",0]: VPN service disappeared



Connecting to other (non-openconnect) based VPN works as expected. Additionally, connecting to the vpn using NetworkManager's command line utilities works fine.
Comment 1 Jan Grulich 2017-01-16 08:35:52 UTC
Enable debug for plasma-nm using "export QT_LOGGING_RULES=plasma-nm*.debug=true" and then restart kded5 and don't close the terminal where you restarted it to see the output. Then try to activate your openconnect connection and paste me the output please. I would also try removing your connection and create it again, maybe when you did it previously it from some reason failed to save secrets correctly.
Comment 2 brancaleone 2017-01-19 07:55:06 UTC
Same problem as hector since update to 5.8.95. it was ok until 5.8.5

I tried creating a new connection, but that doesn't help.

I've tried your debug options but i got little output (not sure when you say "restart kded5", i did "kquitapp5 plasmashell ; kstart plasmashell") :

#Open plasma-nm applet :
file:///usr/lib64/qt5/qml/QtQuick/Controls/Button.qml:99: TypeError: Cannot read property of null
file:///usr/lib64/qt5/qml/QtQuick/Controls/Button.qml:99: TypeError: Cannot read property of null
file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:44:32: Unable to assign [undefined] to int
trying to show an empty dialog


#Click "connect" on the selected vpn, the openconnect connexion window is opened
plasma-nm: Checking VPN "Quentris" type: "org.freedesktop.NetworkManager.openconnect"
QDBusObjectPath: invalid path ""
plasma-nm: Item  "Quentris" : active connection state changed to  1
plasma-nm: Item  "Quentris" : connection updated
plasma-nm: Item  "Quentris" : connection updated

#Clicking identify in openconnect window. The window disapear but no connexion is made.
Service "org.kde.StatusNotifierWatcher" status change, old owner: ":1.119" new: ""
"org.kde.StatusNotifierWatcher" disappeared
plasma-nm: Item  "Quentris" : active connection changed to  4
plasma-nm: Item  "Quentris" : connection updated
plasma-nm: Item  "Quentris" : active connection removed

Note that after that if i go back to the plasma-nm applet and click "connect" on any vpn connection (even other that openconnect), it does nothing. I have to restart plasmashell again to have it working.

Additional logs from journactl during the problem :

janv. 19 08:47:10 squidward org.kde.kded5[1723]: plasma-nm: virtual NMVariantMapMap SecretAgent::GetSecrets(const NMVariantMapMap&, const QDBusObjectPath&, const QString&, const QStringList&, uint)
janv. 19 08:47:10 squidward org.kde.kded5[1723]: plasma-nm: Path: "/org/freedesktop/NetworkManager/Settings/88"
janv. 19 08:47:10 squidward org.kde.kded5[1723]: plasma-nm: Setting name: "vpn"
janv. 19 08:47:10 squidward org.kde.kded5[1723]: plasma-nm: Hints: ()
janv. 19 08:47:10 squidward org.kde.kded5[1723]: plasma-nm: Flags: 4
janv. 19 08:47:10 squidward org.kde.kded5[1723]: Pass a valid window to KWallet::Wallet::openWallet().
janv. 19 08:47:10 squidward org.kde.kwalletd5[1723]: openAsync for  ":1.171"
janv. 19 08:47:10 squidward org.kde.kded5[1723]: plasma-nm: bool SecretAgent::processGetSecrets(SecretsRequest&) const Waiting for the wallet to open
janv. 19 08:47:10 squidward org.kde.kded5[1723]: plasma-nm: virtual NMVariantMapMap SecretAgent::GetSecrets(const NMVariantMapMap&, const QDBusObjectPath&, const QString&, const QStringList&, uint)
janv. 19 08:47:10 squidward org.kde.kded5[1723]: plasma-nm: Path: "/org/freedesktop/NetworkManager/Settings/88"
janv. 19 08:47:10 squidward org.kde.kded5[1723]: plasma-nm: Setting name: "vpn"
janv. 19 08:47:10 squidward org.kde.kded5[1723]: plasma-nm: Hints: ()
janv. 19 08:47:10 squidward org.kde.kded5[1723]: plasma-nm: Flags: 5
janv. 19 08:47:12 squidward systemd-coredump[22389]: Process 21613 (kded5) of user 1000 dumped core.
janv. 19 08:47:13 squidward org.kde.kded5[1723]: KCrash: Attempting to start /usr/bin/kded5 from kdeinit
janv. 19 08:47:13 squidward org.kde.kded5[1723]: KCrash: Application 'kded5' crashing...
janv. 19 08:47:13 squidward org.kde.kded5[1723]: KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
janv. 19 08:47:13 squidward org.kde.kded5[1723]: QSocketNotifier: Invalid socket 15 and type 'Read', disabling...
janv. 19 08:47:13 squidward org.kde.kded5[1723]: QSocketNotifier: Invalid socket 20 and type 'Read', disabling...
janv. 19 08:47:13 squidward NetworkManager[1209]: <error> [1484812033.747979] [vpn-manager/nm-vpn-connection.c:1977] get_secrets_cb(): Failed to request VPN secrets #3: (4) No agents were available for this request.
janv. 19 08:47:13 squidward org.kde.kwalletd5[1723]: slotServiceOwnerChanged  ":1.171" ,  ":1.171" ,  ""
Comment 3 Jan Grulich 2017-01-19 08:36:53 UTC
Hm I see it crashes so that may be the reason when NM doesn't get back required secrets and fails to activate your openconnect connections. Can you try to start kded5 in gdb and obtain the backtrace once it crashes?
Comment 4 brancaleone 2017-01-19 09:44:26 UTC
Created attachment 103524 [details]
kded5 gdb outptut

I'm not sure i'm doing it right, i'm not used to it.

What i did is attach gdb to the kded5 process, then in gdb type "continue", try connecting the vpn, receive the SIGSEGV signal in gdb and then type "bt"

i'll attach the output of that
Comment 5 Jan Grulich 2017-01-19 09:56:52 UTC
Created attachment 103525 [details]
Patch to fix the crash of openconnect dialog

Can you please try this patch?
Comment 6 brancaleone 2017-01-19 11:32:10 UTC
I've just tried it. No more kded5 segfaults, but the connection still don't come up.

For the test i have a new connexion without any stored credentials. When i click connect i get the openconnect window and i enter my credentials and click "identify". Before it was triggering the kded crash and "Failed to request VPN secrets #3: No agents were available for this request." message. Now i don't get any messages, it just blank the credentials.

When i close the windows then i get the message : <error> [1484825349.761113] [vpn-manager/nm-vpn-connection.c:1977] get_secrets_cb(): Failed to request VPN secrets #3: (5) User canceled the secrets request.

console output is very low :
plasma-nm: Checking VPN "Test_Quen" type: "org.freedesktop.NetworkManager.openconnect"
QDBusObjectPath: invalid path ""
plasma-nm: Item  "Test_Quen" : active connection state changed to  1
plasma-nm: Item  "Test_Quen" : connection updated
plasma-nm: Item  "Test_Quen" : connection updated

Nothing is logged when i click "identify".
Comment 7 Jan Grulich 2017-01-19 12:46:31 UTC
Created attachment 103529 [details]
Patch to fix the crash of openconnect dialog

Ok, ignore and revert previous patch and try please the new one.
Comment 8 brancaleone 2017-01-19 13:09:10 UTC
I have applied your last patch and now the connection start again. Both the old (saved credentials) and the new one works.

Thanks.
Comment 9 Jan Grulich 2017-01-19 13:17:16 UTC
Git commit 190c632ad2819643607ee681a1570ce7e9f10233 by Jan Grulich.
Committed on 19/01/2017 at 13:17.
Pushed by grulich into branch 'Plasma/5.9'.

Openconnect: cast QWidget to correct widget type used for password field

Previously the PasswordField widget was inherited from QLineEdit and we changed it
to QWidget containing QLineEdit and QComboBox. Then casting it to QLineEdit obviously
didn't work

M  +1    -1    vpn/openconnect/openconnectauth.cpp

https://commits.kde.org/plasma-nm/190c632ad2819643607ee681a1570ce7e9f10233
Comment 10 Ben Cooksley 2024-12-23 18:23:41 UTC
Bulk transfer as requested in T17796