GNOME Online Accounts breaks if you log out (until you reboot)

Bug #1610944 reported by Udara Madubhashana
118
This bug affects 22 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
Fix Released
High
Unassigned
gnome-online-accounts
Confirmed
Critical
gnome-online-accounts (Arch Linux)
New
Undecided
Unassigned
gnome-online-accounts (Ubuntu)
Fix Released
High
Unassigned
Yakkety
Won't Fix
High
Unassigned
Zesty
Won't Fix
High
Unassigned
gnome-session (Ubuntu)
Fix Released
High
Unassigned
Yakkety
Won't Fix
High
Unassigned
Zesty
Won't Fix
High
Unassigned

Bug Description

Impact
======
After logging out, GNOME Online Accounts doesn't work the next time you log in.

This bug was a Release Blocker for Fedora 26. (Fedora 26 will be released in July).

gnome-session is the only package updated in this update (not gnome-online-accounts).

Test Case
=========
From Ubuntu GNOME, click Settings>Online Accounts and add your Google account. Install Evolution if it's not installed. Verified that your Google account has synced.

Log out. Log in. It may help to reproduce the bug log in to a different session (GNOME on Wayland instead of GNOME, or the other way around).

Open Evolution. Verify that no errors are reported and that your Google account is still syncing.

After installing the gnome-session update, I recommend rebooting once to clear any old lingering GNOME Online Accounts processes from previous sessions.

Regression Potential
====================
This fix is the same as was accepted into Fedora 26. It is a workaround by killing all the user's D-Bus sessions when the user logs out. This fix has been backported from gnome-session 3.25.3. It has not been applied to the 3.24 git branch upstream.

Since 16.10 has almost reached its end of life (July), I am not proposing this fix there. I believe 16.10 is the first release affected since Ubuntu moved many more services to systemd user sessions in that release.

The patch tries to only kill the D-Bus sessions if the session being logged out is the final remaining session for the user.

The workaround makes sense to me. It seems similar to the KillUserProcesses option that was pushed into systemd to fix this kind of problem but it's more limited than the systemd method so hopefully it won't be as controversial.

Original Bug Report
===================
Can't add any online accounts in after opened Online accounts + mark is faded, can't click.
After reinstalled gnome-online-accounts still has same problem.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: gnome-online-accounts 3.20.3-1
ProcVersionSignature: Ubuntu 4.4.0-34.53-generic 4.4.15
Uname: Linux 4.4.0-34-generic x86_64
ApportVersion: 2.20.3-0ubuntu5
Architecture: amd64
CurrentDesktop: Budgie:GNOME
Date: Mon Aug 8 15:33:45 2016
SourcePackage: gnome-online-accounts
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Udara Madubhashana (udara) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-online-accounts (Ubuntu):
status: New → Confirmed
Revision history for this message
Christopher (chalbersma-12) wrote :

I found a partial workaround. If you remove the account from online accounts and then reboot. Then you can successfully re-add the account. The account will work until you log out again. Then you will need to remove/reboot.

I think there might be a problem with how accounts are stored. This wasn't an issue in 16.04 so I'm pretty sure it's a new bug added with 16.10.

Revision history for this message
Udara Madubhashana (udara) wrote :

I'm have same the problem with Zesty Zapus.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Christopher, you don't need to remove the account. You just need to restart your computer.

summary: - Can't add any online accounts
+ GNOME Online Accounts breaks if you log out (until you reboot)
Changed in gnome-online-accounts (Ubuntu):
importance: Undecided → Critical
importance: Critical → High
status: Confirmed → Triaged
Jeremy Bícha (jbicha)
Changed in ubuntu-gnome:
importance: Undecided → High
status: New → Triaged
milestone: none → artful
Changed in gnome-online-accounts:
importance: Unknown → Critical
status: Unknown → Confirmed
Jeremy Bícha (jbicha)
Changed in gnome-online-accounts:
importance: Critical → Unknown
status: Confirmed → Unknown
Jeremy Bícha (jbicha)
tags: added: gnome-17.10
removed: package-from-proposed
Changed in gnome-online-accounts:
importance: Unknown → Critical
status: Unknown → Confirmed
Revision history for this message
Chris (chrisonbuntu) wrote :

I found the bug described and confirmed on redhat, where I also found the solution. (although they have the goa-demon in the /usr/libexec/ folder)
https://bugzilla.redhat.com/show_bug.cgi?id=1340203

As a work-around, for each user account I created a new file in ~/.config/autostart/ called goa-replace.desktop, and in a text-editor entered the following:

[Desktop Entry]
Name=GOA Replace
Exec=/usr/lib/gnome-online-accounts/goa-daemon --replace
NoDisplay=true
Terminal=false
Type=Application

The problem seems to be that dbus is spawning goa-daemon, but then not killing the process when the user logs out. gnome-keyring IS killed, and this breaks the link between the two.

Not sure what the *real* solution is, seems to be a big debate about how systemd leaves 'lingering' processes from users after log out. I see 28 processes left running after a user logs out. Surely this needs to be cleaned up??? Is there a better way to force systemd to properly close a users session?

Jeremy Bícha (jbicha)
Changed in gnome-session (Ubuntu):
importance: Undecided → High
status: New → Triaged
status: Triaged → Fix Committed
Changed in gnome-session (Ubuntu Yakkety):
importance: Undecided → High
status: New → Triaged
Changed in gnome-session (Ubuntu Zesty):
importance: Undecided → High
status: New → Triaged
Changed in gnome-online-accounts (Ubuntu Yakkety):
importance: Undecided → High
status: New → Triaged
Changed in gnome-online-accounts (Ubuntu Zesty):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-session - 3.24.1-0ubuntu5

---------------
gnome-session (3.24.1-0ubuntu5) artful; urgency=medium

  * Backport patches from 3.25.3 to kill D-Bus clients on log out.
    This works around GNOME Online Accounts not working correctly
    after logging out (LP: #1610944)
    - 0001-manager-add-bus-daemon-dbus-api-xml-file.patch
    - 0002-system-add-api-for-detecting-if-this-is-the-last-ses.patch
    - 0003-manager-kill-off-bus-clients-at-log-out.patch

 -- Jeremy Bicha <email address hidden> Wed, 21 Jun 2017 18:57:12 -0400

Changed in gnome-session (Ubuntu):
status: Fix Committed → Fix Released
Jeremy Bícha (jbicha)
description: updated
Changed in gnome-session (Ubuntu Zesty):
status: Triaged → Won't Fix
Changed in gnome-session (Ubuntu Yakkety):
status: Triaged → In Progress
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Those patches seem to create an issue where it's impossible to log back into a session after a logout

Revision history for this message
Sebastien Bacher (seb128) wrote :

the new issue is bug #1700485

Revision history for this message
Brian Murray (brian-murray) wrote : Proposed package upload rejected

An upload of gnome-session to zesty-proposed has been rejected from the upload queue for the following reason: "Rejecting because of LP: #1700485 - this sounds like a serious regression.".

Changed in gnome-session (Ubuntu Yakkety):
status: In Progress → Won't Fix
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Resetting to "Triaged" with Brian's approval.

Changed in gnome-session (Ubuntu Zesty):
status: Won't Fix → Triaged
Changed in gnome-online-accounts (Ubuntu Yakkety):
status: Triaged → Won't Fix
Revision history for this message
Chris (chrisonbuntu) wrote :

My workaround above (calling "goa-daemon --replace" on login) isnt working all the time, sadly. On occasion, I am ending up with 3 or 4 instances of goa-daemon per user (I guess --replace isnt able to kill the previous instance?). Multiple instances results in high CPU usage.

I have also seen goa-daemon report that it cannot connect to the keychain:

"/usr/lib/gnome-online-accounts/goa-daemon --replace
goa-daemon-Message: goa-daemon version 3.24.0 starting

(goa-daemon:18954): GoaBackend-WARNING **: secret_password_lookup_sync() returned NULL
goa-daemon-Message: /org/gnome/OnlineAccounts/Accounts/account_1496262706_0: Setting AttentionNeeded to TRUE because EnsureCredentials() failed with: No credentials found in the keyring (goa-error-quark, 4)"

Revision history for this message
Hagen Kuehn (hag-k) wrote :

I believe I encounter this issue with Ubuntu 17.10, which uses "gnome-session 3.26.1-0ubuntu5".

The story, I installed Ubuntu 17.04 back in September 2017 and been using Online Accounts for three Gmail accounts. The email client Evolution was working fine. I then upgraded to Ubuntu 17.10 a couple of days ago. After upgrade, Evolution continued to work by using the configured accounts within Online Accounts. So far so good.

I then realised that Thunderbird was installed during this OS upgrade too. So I uninstalled Thunderbird with "sudo apt purge thunderbird". After that I had this problem that Online Accounts stopped working. The symptom was that all online accounts showed that the login had expired, despite me having re-logged in a couple of times. I then found this bug report and I followed the instructions provided with https://bugs.launchpad.net/ubuntu/+source/gnome-online-accounts/+bug/1610944/comments/3, which allowed me to get it working again.

In the light of this, I believe this problem is still present with "gnome-session 3.26.1-0ubuntu5".

Revision history for this message
Ryan (baronhk) wrote :

This issue is still happening in Ubuntu 18.04 LTS.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

I am closing the Ubuntu 17.04 "Zesty" tasks since Ubuntu 17.04 has reached End of Life. Please upgrade to a supported Ubuntu release.
https://wiki.ubuntu.com/Releases

Ryan, please open a new bug (with specific details about how to reproduce the bug) instead of commenting on bugs that have been fixed for almost a year.

Changed in gnome-online-accounts (Ubuntu Zesty):
status: Triaged → Won't Fix
Changed in gnome-session (Ubuntu Zesty):
status: Triaged → Won't Fix
Changed in gnome-online-accounts (Ubuntu):
status: Triaged → Fix Released
Changed in ubuntu-gnome:
status: Triaged → Fix Released
Revision history for this message
Vincent Fortier (th0ma7) wrote :

I just hit this bug with 19.04...
The following "/usr/lib/gnome-online-accounts/goa-daemon --replace" did sort of reactivated my accounts accessibility.

Revision history for this message
charles r. (tcharlss) wrote :

I also encountered that bug in 19.04

Revision history for this message
Chris (chrisonbuntu) wrote :

Hey Charles and Vincent, sorry to see this bug is STILL not fixed. Goodness me.

The workaround I used is reported in this other bug report:
https://bugs.launchpad.net/ubuntu/+source/gnome-online-accounts/+bug/1695775

I saw it in 17.04 and 17.10. Since then I gave up and moved to Ubuntu MATE, not just because of this bug.

Revision history for this message
Frost Lakes (frostlakes201) wrote :

Arch user here. Haven't had the problem on Debian-based distros, but Arch and Fedora still seems to be affected.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.