MerginMaps / MerginMaps/mobile
Android app failing to restore authentication state on custom server
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 388
- Forks
- 87
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 20
Description
Description
After the Input app is killed and restarted on Android, sync operations fail with "FAILED to create project info request!" even after a successful re-authentication. The app appears to queue project requests before auth state is restored, and those requests do not re-attempt after login succeeds. The only recovery is clearing app data or reinstalling. The server is not at fault — all auth and sync endpoints return correct responses throughout.
Environment
Production (self-hosted Mergin Maps Community Edition, version 2025.7)
Application (+ app version, build, operating system)
Input / Mergin Maps app version: 2026.1.1 (build 777951)
Device: Google Pixel 6A
OS: Android 16.0
CPU Architecture: arm64
Steps to reproduce
- Connect Input app to a self-hosted CE server (version 2025.7)
- Open a project and perform a successful sync (push or pull)
- Close/kill the app completely
- Reopen the app
- Observe that sync immediately fails — the app shows "server temporarily unavailable"
- Manually re-enter credentials and log in — login returns success (HTTP 200)
- Attempt to sync again
Actual results
- On startup, FAILED to create project info request! is logged before any authentication attempt is made
- The failure persists after a successful manual login (HTTP 200 from server)
- Server logs show no errors — all endpoints respond correctly
- The only recovery is clearing app data (Settings → Apps → Input → Storage → Clear Data) or reinstalling the app
- Relevant diagnostic log excerpt:
2026-03-19T13:30:47.544Z Config: Success
2026-03-19T13:30:47.545Z Server version: 2025.7 CE
2026-03-19T13:30:50.250Z pull mergin/Test Project: ### Starting ###
2026-03-19T13:30:50.250Z pull mergin/Test Project: FAILED to create project info request!
2026-03-19T13:31:28.415Z auth: Requesting authorization: https://[server]/v1/auth/login
2026-03-19T13:31:28.733Z auth: Success
2026-03-19T13:32:11.005Z push mergin/Test Project: ### Starting ###
2026-03-19T13:32:11.006Z push mergin/Test Project: FAILED to create project info request!
Expected results
On restart, the app should either restore auth state from the persisted bearer token or re-authenticate silently before attempting sync requests
If the auth state cannot be restored automatically, queued sync requests should retry after a successful manual login rather than continuing to fail
Screenshots
No screenshots available for the failure state, as the error is silent from the UI perspective (shows "server temporarily unavailable" without detail). The attached diagnostic log log.txt contains the relevant trace.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached log.txt and trace the Android startup sequence that creates sync requests before authentication is restored. Then follow the login-success path and queued sync handling. Done means persisted authentication is restored before sync, or queued requests retry after successful login, with the restart and re-authentication scenario verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, cpp
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100