1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[firebase]エミュレータfirestoreの変更が反映されない

Posted at

firestoreを直接変更 => getDoc()でデータを取得した際に変更が反映されない問題に遭遇。

原因

firebase.jsonで設定したportとEmulatorの初期化時のportの設定が間違っていた。

firebase.json
// ...
"firestore": {
    "port": 8089
},
firebase/config.ts
const firestore = getFirestore(app)
connectFirestoreEmulator(firestore, 'localhost', 8088)

8088のportが塞がっていてfirebase.jsonを変更したが、config.tsの変更を忘れていた。

なぜかデータは取得できていたので発見に時間がかかった。
謎。キャッシュみたいなのがあるのか?

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?