Skip to content

Firestore read not working for multi-page app in Safari private mode #7940

Closed
@gunnarmein-ts

Description

@gunnarmein-ts

Operating System

macOS 14.2

Browser Version

Safari 17.2.1

Firebase SDK Version

10.1

Firebase SDK Product:

Firestore

Describe your project's tooling

HTML/TypeScript app built with esbuild

Describe the problem

We have a document shell (index.html) and the actual document editor (document.html). Both initialize Firebase auth. We use signingWithPopup and our subdomain is our config auth domain. We can sign in successfully on index.html, but transitioning to document.html, the first call to getDoc() will not resolve until some ridiculous time later (I noticed it had resolved after I took the dogs for a walk). Meanwhile, a couple of promises were rejected:

[Warning] [2024-01-11T16:45:26.104Z] @firebase/app: – "Firebase: Error thrown when reading from IndexedDB. Original error: Error looking up record in object store by key range. (app/idb-get)." (document-bundle.js, line 142)
[Error] Unhandled Promise Rejection: AbortError: AbortError
error (document-bundle.js:1541)

image

and another one, both by the heartbeat service.

This works fine in Chrome. I cannot say whether it works in Safari. It becomes an issue because when Safari is automated (by Selenium in our case), it will only launch in a private window now, making all of our Safari tests fail.

Steps and code to reproduce issue

  • Write firebase app with 2 html pages
  • Open Safari private window
  • sign in on page one
  • load page 2
  • read doc from firestore db (the doc is not protected by auth or identity, it is marked "allow read;" in firestore.rules)
    -> hangs for a long time (deadlock?)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions