Skip to content

Fix network timeouts, auth recovery missing intent, and GCM push loops - #294

Closed
M7mdJs wants to merge 1 commit into
MorpheApp:mainfrom
M7mdJs:fix/network-timeouts-auth-recovery-2
Closed

M7mdJs wants to merge 1 commit into
MorpheApp:mainfrom
M7mdJs:fix/network-timeouts-auth-recovery-2

Conversation

@M7mdJs

@M7mdJs M7mdJs commented Oct 4, 2026

Copy link
Copy Markdown

This PR includes several fixes to address issues with push registration, Google Prompt (2FA), and network stability, especially on devices with aggressive background restrictions like Huawei.

Changes

  • GCM Push Registration: Fixed an infinite loop in GcmInGmsService by preventing continuous background attempts if androidId is missing or MCS is disconnected. It now handles failures gracefully.
  • Network Stability: Added explicit connect/read timeouts (15s/30s) across various network calls (HttpFormClient, MovingWifiHelper, ImageManager, etc.) to prevent operations from hanging indefinitely in dead network states.
  • Auth & Two-Step Verification: Enabled Two-Step Verification by default so the device can properly receive Google Prompt (Auth TX) push notifications for sign-ins.
  • Auth Recovery Intent: Added support for userRecoveryPendingIntent in authentication flows.
  • License Validation: Modified the license validation service to return ERROR_CONTACTING_SERVER when appropriate, resolving a bug in paid app verifications.
  • Concurrency: Added Mutex locking in PoTokenHelper and concurrent map handling to resolve deadlocks.

These fixes stabilize the GCM and Auth flows significantly under poor network conditions or on heavily restricted Android skins. Let me know if any changes are needed!

@LisoUseInAIKyrios

Copy link
Copy Markdown

The connection timeouts should be handled in the existing open PR:
#285

For the other changes, are they specific to patched microG or just fixes in general?
If not specific to patched apps, then making the changes to upstream microG is more appropriate because we don't want to diverge from upstream unless necessary (changes for patched apps, or changes upstream doesn't want but we do).

@M7mdJs M7mdJs closed this by deleting the head repository Oct 6, 2026
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.

2 participants