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
When calling FirebaseFirestore.addCollectionSnapshotListener in a useEffect that appropriately removes the snapshot listener when unmounting I sometimes get a crash in the iOS plugin FirebaseFirestore.swift:244 where there is a bad access due to a concurrent write on a dictionary that isn't thread safe.
Expected behavior
It should not crash. It should ensure all read/write operations are performed in a thread-safe manor.
Plugin(s)
Version
6.2.0
Platform(s)
Current behavior
When calling
FirebaseFirestore.addCollectionSnapshotListener
in auseEffect
that appropriately removes the snapshot listener when unmounting I sometimes get a crash in the iOS pluginFirebaseFirestore.swift:244
where there is a bad access due to a concurrent write on a dictionary that isn't thread safe.Expected behavior
It should not crash. It should ensure all read/write operations are performed in a thread-safe manor.
Reproduction
https://github.com/capawesome-team/.capacitor-app
Steps to reproduce
Sorry, I don't have capacity to set this up in an example since it doesn't always happen (threading race condition)
Other information
I have a fix ready to be turned into a PR that manages the
listenerRegistrationMap
by wrapping it with anactor
Capacitor doctor
This isn't relevant
Before submitting
The text was updated successfully, but these errors were encountered: