Bug 1753129 - goa-daemon: secret_password_lookup_sync() returned NULL
Summary: goa-daemon: secret_password_lookup_sync() returned NULL
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-online-accounts
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: GNOME SIG Unassigned
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1836878 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-18 07:51 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2022-11-29 22:00 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-29 22:00:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2019-09-18 07:51:54 UTC
Description of problem:
My logs are full of the message in $subject:
Sep 18 09:18:59 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:19:00 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:19:02 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:19:03 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:29:20 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:29:21 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:29:31 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:29:32 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
...

As a user, I have no idea what this means. Is this an error, a warning, a programming issue, or totally harmless? Please either emit a clear error if something is broken, or ideally nothing at all unless the information is useful to a user.

Version-Release number of selected component (if applicable):
gnome-online-accounts-3.34.0-1.fc31.x86_64
(but older versions did the same thing)

Comment 1 Ben Cotton 2020-02-11 17:55:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 2 Robin Lee 2020-02-16 10:29:51 UTC
Met the same issue with gnome-online-accounts-3.34.1-1.fc31.x86_64

Comment 3 Orion Poplawski 2020-05-27 14:42:49 UTC
*** Bug 1836878 has been marked as a duplicate of this bug. ***

Comment 4 Orion Poplawski 2020-05-27 14:46:33 UTC
Another version:

May 26 09:38:16 goa-daemon[4011528]: secret_password_lookup_sync() returned NULL
May 26 09:38:16 goa-daemon[4011528]: /org/gnome/OnlineAccounts/Accounts/account_1590510850_0: Setting AttentionNeeded to TRUE because EnsureCredentials() failed with: No credentials found in the keyring (goa-error-quark, 4)
May 26 09:38:16 goa-daemon[4011528]: /org/gnome/OnlineAccounts/Accounts/account_1590510850_0: Setting AttentionNeeded to FALSE because EnsureCredentials() succeded

hundreds of thousands of them.

Comment 5 Ben Cotton 2020-11-03 15:34:15 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Zbigniew Jędrzejewski-Szmek 2020-11-03 16:46:54 UTC
Still an issue with gnome-online-accounts-3.38.0-1.fc33.x86_64.

Comment 7 Ben Cotton 2021-11-04 17:24:18 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Zbigniew Jędrzejewski-Szmek 2021-11-05 08:21:45 UTC
No change with gnome-online-accounts-3.40.1-1.fc35.x86_64.

Can we please get this trivial yet annoying bug fixed?

Comment 9 Debarshi Ray 2022-03-24 10:31:58 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #8)
> No change with gnome-online-accounts-3.40.1-1.fc35.x86_64.
> 
> Can we please get this trivial yet annoying bug fixed?

If only it was trivial ... ;)

Comment 10 Brian J. Murrell 2022-03-24 11:18:25 UTC
So what is the (apparently non-trivial) issue then?  There has been absolutely no information added to this ticket about the problem.  Even a referral to another ticket somewhere that does explain the problem would be helpful if that exists.

Comment 11 Niels De Graef 2022-05-21 08:11:41 UTC
I investigated this a bit since I was regularly hitting this on my system while developing GNOME Contacts and it peaks my interest as libsecret maintainer.

The log message originates here: https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/blob/master/src/goabackend/goautils.c#L424

Since I knew I had Google credentials in Seahorse, I attached gdb to the goa-daemon process and set a breakpoint. There, I found out that the `password_key` variable (https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/blob/master/src/goabackend/goautils.c#L402-405)  is "google:gen11:account_1481367550_0", while I have an GOA credentials entry in "google:gen10:account_1481367550_0".

So the mismatch in generation is what causes the libsecret lookup to fail.

Comment 12 Joost Ruis 2022-06-04 10:34:49 UTC
Hey all. I just ran into this on my system (Gentoo based) after upgrading to GNOME 42. When I click to connect to my Google drive:

Jun 04 12:22:00 joost-30ces0k600 goa-daemon[1765]: secret_password_lookup_sync() returned NULL

I went in settings -> online accounts and noticed that my account credentials were marked as expired.
To solve that I had to re-confirm authentication with my Google account and the problem was solved for me.

(At this moment in Gentoo we are using gnome-online-accounts-3.44.0)

Ciao!

Comment 13 Debarshi Ray 2022-06-15 13:38:55 UTC
(In reply to Niels De Graef from comment #11)
> I investigated this a bit since I was regularly hitting this on my system
> while developing GNOME Contacts and it peaks my interest as libsecret
> maintainer.

Thanks for looking into it, Niels!

> The log message originates here:
> https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/blob/master/src/
> goabackend/goautils.c#L424
> 
> Since I knew I had Google credentials in Seahorse, I attached gdb to the
> goa-daemon process and set a breakpoint. There, I found out that the
> `password_key` variable
> (https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/blob/master/src/
> goabackend/goautils.c#L402-405)  is "google:gen11:account_1481367550_0",
> while I have an GOA credentials entry in "google:gen10:account_1481367550_0".
> 
> So the mismatch in generation is what causes the libsecret lookup to fail.

The mismatched generation is caused by changes to the GNOME Online Accounts code that invalidates existing OAuth2 access tokens or if the tokens somehow disappeared from gnome-keyring.  Speaking from memory, the code path that you found is usually taken as a result of explicit D-Bus calls to the org.gnome.OnlineAccounts service.  If the secrets are missing, then a WARNING is logged and the Settings -> Online Accounts UI reflects the same.

See "Credentials not working" here:
https://wiki.gnome.org/Projects/GnomeOnlineAccounts/Debugging

(One could argue that the "secret_password_lookup_sync() returned NULL" could be downgraded to a DEBUG, because it's not a failure of any sort.  That will silence the logs for a lot of people, but might only hide the underlying problem, if there's one.)

It's important to note that these WARNINGs shouldn't be hammering the logs, because well-working applications are not supposed to keep calling the D-Bus methods repeatedly in case of a failure.  They should only do so, if o.g.OnlineAccounts emits a signal indicating that the credentials have been updated.  eg., these entries from the original report seem to have timestamps that are too frequent:
Sep 18 09:18:59 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:19:00 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:19:02 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:19:03 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:29:20 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:29:21 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:29:31 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL
Sep 18 09:29:32 krowka goa-daemon[842560]: secret_password_lookup_sync() returned NULL

One possibility is that the user has a Kerberos account, and these are coming from that.  Kerberos accounts on Fedora cause the EnsureCredentials() D-Bus method to be called at 5 second intervals.  If the user chose not to save the password, then it could lead to the above.

Note that Fedora accounts are also Kerberos accounts, but those should usually have the password save, unless something was done to gnome-keyring.  However, the generic Enterprise Login (Kerberos) accounts allow users to not save the password, and can cause this.

Enabling DEBUG logs can help with that.  See "Getting logs" here:
https://wiki.gnome.org/Projects/GnomeOnlineAccounts/Debugging

If that's the case, then there's no problem here.  We can address this bug by downgrading the WARNING to a DEBUG.  Otherwise, we have a real problem.

Comment 14 Debarshi Ray 2022-06-17 19:47:35 UTC
(In reply to Debarshi Ray from comment #9)
> (In reply to Zbigniew Jędrzejewski-Szmek from comment #8)
> > No change with gnome-online-accounts-3.40.1-1.fc35.x86_64.
> > 
> > Can we please get this trivial yet annoying bug fixed?
> 
> If only it was trivial ... ;)

I finally managed to dig up my notes from the past.  It used to be quite a popular bug in the past:
https://bugzilla.gnome.org/show_bug.cgi?id=765406

However, while that also involves libsecret, it may not be the same as this bug.  I am really not sure.

Comment 15 Michael Catanzaro 2022-06-17 21:03:14 UTC
I think Niels's comment #11 indicates this one is not a libsecret problem? gnome-online-accounts is looking up a credential that doesn't actually exist (looking for gen11, but keyring has gen10).

Comment 16 Ben Cotton 2022-11-29 16:46:45 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 17 Zbigniew Jędrzejewski-Szmek 2022-11-29 22:00:06 UTC
I'm not seeing this with F37. Let's hope it's gone, whatever changed.


Note You need to log in before you can comment on or make changes to this bug.