Skip to content

Bug 2059169 - Allow CheckAuthorizationStatus from more states - #7514

Merged
bendk merged 1 commit into
mozilla:mainfrom
bendk:bdk/push-nvzvqpumnxyk
Jul 31, 2026
Merged

Bug 2059169 - Allow CheckAuthorizationStatus from more states#7514
bendk merged 1 commit into
mozilla:mainfrom
bendk:bdk/push-nvzvqpumnxyk

Conversation

@bendk

@bendk bendk commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@bendk
bendk requested a review from skhamis July 29, 2026 20:37

@skhamis skhamis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@mhammond

Copy link
Copy Markdown
Member

What's the motivation here? Do we ever expect AuthIssues to magically resolve itself? And shouldn't someone trying to check the auth status when, eg, Disconnected make more noise as it seems to strongly imply a confused client? ie, I don't think this is "wrong", but not sure it's "helpful" or something :)

@mhammond

mhammond commented Jul 30, 2026

Copy link
Copy Markdown
Member

Do we ever expect AuthIssues to magically resolve itself?

ie, if it ever did resolve itself, it implies there was a bug which caused us to get into AuthIssues in the first place?

@mhammond

Copy link
Copy Markdown
Member

oops, I see the info in the bug. It's a little sad, but I think this is fine.

@bendk

bendk commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

What's the motivation here? Do we ever expect AuthIssues to magically resolve itself?

Not really. Should it be a no-op as well?

oops, I see the info in the bug. It's a little sad, but I think this is fine.

Agreed. It's kind of weird but I don't think the current Android behavior is too unreasonable.

@mhammond

Copy link
Copy Markdown
Member

Not really. Should it be a no-op as well?

This seems fine I guess. I'd like to better understand the Android weirdness (but not enough to actually dig into it :) but given it exists, this isn't going to hurt.

@mhammond

Copy link
Copy Markdown
Member

just noticed we do record some telemetry here - "Account Manager recovered a broken FxA auth state, without direct user involvement.". It would be interesting to see that - I don't think it would have great UX

@bendk

bendk commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

just noticed we do record some telemetry here - "Account Manager recovered a broken FxA auth state, without direct user involvement.". It would be interesting to see that - I don't think it would have great UX

Oh. Given that the defined that telemetry, I'm going to keep the check from the AuthIssues state. One scenario I could imagine is they see a 401 error for normal reasons, maybe they tried to use an expired auth token or something, then the first auth check fails with a network error so they move to AuthIssues. At some point later they do another auth check and it works.

I'd like to better understand the Android weirdness

Other than the above weirdness, the other part is here. Whenever they see an auth error, they queue an operation that ends with sending us CheckAuthorizationStatus. Sometimes they see multiple auth errors at once, queue a bunch of those events, then the ones after the first can lead to the invalid state transition error.

@bendk
bendk added this pull request to the merge queue Jul 31, 2026
Merged via the queue into mozilla:main with commit 7d6ea55 Jul 31, 2026
14 checks passed
@bendk
bendk deleted the bdk/push-nvzvqpumnxyk branch July 31, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants