You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Publishing a new desktop preview build fails with a Firestore read-after-write error #17845
Publishing a new desktop preview build fails with a 500, so a preview can never be registered.
POST /v2/desktop/previews/publish runs a Firestore transaction that stages the new manifest and then reads the slug pointer. Firestore does not allow a read after a write inside a transaction, so the client raises ReadAfterWriteError, the transaction rolls back, and the route returns 500. The Codemagic preview step calls this route with curl --fail, so the build fails there, and a retry fails the same way because the manifest never got created.
With the real google-cloud-firestore 2.20.0 client and only its gRPC API stubbed, publishing a new build on main returns 500 with ReadAfterWriteError: Attempted read after write in a transaction.
I'd like to take this one. Plan: reorder the Firestore transaction to read the slug pointer before staging the manifest write (reads first, writes after), so the ReadAfterWriteError goes away and the publish route returns 200. Will submit a PR shortly — happy to proceed as a bounty if confirmed. Thanks!
Activity
gdz56 commentedon Sep 24, 2026
I'd like to take this one. Plan: reorder the Firestore transaction to read the slug pointer before staging the manifest write (reads first, writes after), so the ReadAfterWriteError goes away and the publish route returns 200. Will submit a PR shortly — happy to proceed as a bounty if confirmed. Thanks!
fix(previews): read pointer before staging manifest write (Fixes Base…
fix(backend): read the preview pointer before writing the manifest (#…