Skip to content

microG does not behave gracefully with invalid sessions of Google accounts #2731

@lucasmz-dev

Description

@lucasmz-dev
Contributor

Describe the bug
When an user has a Google account logged in, if the session turns invalid (gets logged out remotely for example), many things break in microG and the user is not notified, only leaving the status of certain apps breaking as somewhat of a clue.

To Reproduce
Steps to reproduce the behavior:

  1. Log in using a Google account
  2. e.g. Google Maps works fine
  3. Log out the device out of the Google account remotely via the web online account page (account.google.com)
  4. Google Maps does not work properly anymore
  5. No notification or other indication that the logged in account isn't a valid session anymore

Expected behavior
microG should automatically detect when a Google account gets logged out and remove the account and potentially warn the user.

Screenshots
If applicable, add screenshots to help explain your problem.

System
Android Version: 14
Custom ROM: CalyxOS 5.14.2
microG version: 0.3.6

Additional context
I notice this as a issue every now and then in the Calyx channels.

Activity

changed the title [-]microG does not real gracefully with invalid sessions[/-] [+]microG does not behave gracefully with invalid sessions of Google accounts[/+] on Jan 5, 2025
fynngodau

fynngodau commented on Jan 5, 2025

@fynngodau
Member

GMS' behavior is to show a notification, re-prompting the user to enter their password. I intended for this functionality to be added when I wrote this code:

Log.w(TAG, "Your account credentials have expired! Please remove the account, then sign in again.")
return null

…but then I didn't get around to implementing it. What is needed in that place is some kind of UI flow that first tells users to reauthenticate using a notification (in the background case) or directly open that page (in the foreground case). Also the background / foreground decision might still be optimized, as so far I only was able to test it for the enterprise account cryptauth flow, which won't occur for all different types of call.

noaho

noaho commented on Jan 8, 2025

@noaho

I just had this with Maps, was very confusing because I thought it was due to the latest signature checking changes, but it wasn't (my phone is Jan 2025 L4M build), but actually it was just because I updated my Google password. Maybe this could be a pinned topic?

pinned this issue on Jan 8, 2025
dimaryaz

dimaryaz commented on Mar 5, 2025

@dimaryaz
Contributor

I think I was seeing a similar issue - though in my case, it wasn't just Google Maps, but the whole OS somehow became unstable: #2405

linked a pull request that will close this issueAuth: Handle invalid account #2865on Apr 22, 2025
ale5000-git

ale5000-git commented on Jul 15, 2025

@ale5000-git
Member

Now that this is fixed and a new version of microG is out I'm removing this from pinned issues.

unpinned this issue on Jul 15, 2025
added this to the 0.3.8 milestone on Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @dimaryaz@noaho@ale5000-git@fynngodau@lucasmz-dev

      Issue actions

        microG does not behave gracefully with invalid sessions of Google accounts · Issue #2731 · microg/GmsCore