qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.59k stars 3k forks source link

QGIS cannot store master password in wallet/keyring #29278

Open qgib opened 5 years ago

qgib commented 5 years ago

Author Name: Cory Albrecht (@CoryAlbrecht) Original Redmine Issue: 21461 Affected QGIS version: 3.4.5 Redmine category:authentication_system


../../src/core/qgsmessagelog.cpp:29 : (logMessage) [23002ms] 2019-03-03T19:15:29 Password Helper[1] Opening Wallet/KeyRing for WRITE… ../../src/core/qgsmessagelog.cpp:29 : (logMessage) [7ms] 2019-03-03T19:15:29 Password Helper[1] Error in Wallet/KeyRing: Storing password in your Wallet/KeyRing failed: Unknown error. ../../src/core/qgsmessagelog.cpp:29 : (logMessage) [17ms] 2019-03-03T19:15:29 Messages[1] Password helper write :

Affects 3.45, 3.60 and 3.7

qgib commented 5 years ago

Author Name: Cory Albrecht (@CoryAlbrecht)


Wen trying to add a layer from a PostGIS connection that uses a stored auth config instead of saving the userid and password separately:

../../src/providers/postgres/qgspostgresconn.cpp:216 : (QgsPostgresConn) [0ms] [thread:0x55d640e6e5e0] New PostgreSQL connection for dbname='physgeo' host=pg1.db.cory.albrecht.name port=5432 sslmode=require authcfg=ou8c1bg
../../src/core/auth/qgsauthmanager.cpp:501 : (setMasterPassword) [0ms] [thread:0x55d640e6e5e0] Master password is not yet set by user
../../src/core/qgsmessagelog.cpp:29 : (logMessage) [0ms] [thread:0x55d640e6e5e0] 2019-03-03T19:21:57 Password Helper[1] Opening Wallet/KeyRing for READ…
../../src/core/qgsmessagelog.cpp:29 : (logMessage) [3ms] [thread:0x55d640e6e5e0] 2019-03-03T19:21:57 Password Helper[1] Error in Wallet/KeyRing: Retrieving password from your Wallet/KeyRing failed: Unknown error.
../../src/gui/qgscredentialdialog.cpp:112 : (requestMasterPassword) [0ms] [thread:0x55d640e6e5e0] emitting signal
../../src/core/qgsmessagelog.cpp:29 : (logMessage) [6ms] 2019-03-03T19:21:57 Messages[2] Authentication Manager : Retrieving password from your Wallet/KeyRing failed: Unknown error.
../../src/gui/qgscredentialdialog.cpp:124 : (requestCredentialsMasterPassword) [1ms] Entering.
../../src/gui/qgscredentialdialog.cpp:156 : (requestCredentialsMasterPassword) [1ms] exec()

And then QGIS just hangs. This is even though the

qgib commented 5 years ago

Author Name: Giovanni Manghi (@gioman)


@alessandro is this a previously unknown regression? I can't replicate trying store username/password.


qgib commented 5 years ago

Author Name: Alessandro Pasotti (@elpaso)


Nothing I'm aware of.

Are you on Ubuntu with the default window manager?

qgib commented 5 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 5 years ago

Author Name: Alessandro Pasotti (@elpaso)


Confirmed on ubuntu with default window manager.

Maybe related to: https://github.com/qgis/QGIS/pull/9333

According to gdb, there is a deadlock in QSqlDatabase QgsAuthManager::authDatabaseConnection() const

qgib commented 5 years ago

Author Name: Cory Albrecht (@CoryAlbrecht)


I use Ubuntu 18.10. In the chooser by the green "Sign In" button there is a gear and it allows the choice of "GNOME", "GNOME on Xorg", "Ubuntu", and "Ubuntu on Wayland". I use the "GNOME on Xorg" one, normally, though because I have a high dpi screen on my laptop (3840x2160), I occasionally choose "GNOME" which starts Wayland instead of Xorg because it can occasionally make multi-monitor use easier especially with differing resolutions. However, this error occurs on both. (I never choose the "Ubuntu" options.)

mcomelli commented 3 years ago

Same problem in: QGIS 3.18.3 Ubuntu 20.04

davidg-sil commented 2 years ago

FWIW, this error can also be triggered(qgis 3.26) by a mangled/missing login.keyring Solution (on devuan linux):