Skip to content

FIRESTORE INTERNAL ASSERTION FAILED: closeWithFinalState #596

Description

@x0rb0t

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'FIRESTORE INTERNAL ASSERTION FAILED: closeWithFinalState should only be called for a started stream that has an active delegate.'
*** First throw call stack:
(0x1848fa364 0x183b40528 0x1848fa238 0x1852957f4 0x10041b724 0x10040e7d4 0x10040e8dc 0x1003db690 0x1003d1c00 0x101d0d2cc 0x101d0d28c 0x101d1bf80 0x101d107ec 0x101d1cf6c 0x101d24020 0x18451ef1c 0x18451eb6c)
libc++abi.dylib: terminating with uncaught exception of type NSException

It happens if:

  1. You has login:
    Auth.auth().signIn(with: credential) { (user, error) in if let _ = error { return } self.mainView?.didLogin() self.dismiss(animated: true, completion: nil) }
  2. Perform write to firestore like this:
    Firestore.firestore().collection("users").document(currentUser.uid).updateData(data) { (err) in if let err = err { print("Failed to save location info into db:", err) return } print("Successfully saved location info to db") }
  3. You perform sign out "try Auth.auth().signOut()"
  4. Login again. Got error.
  5. If skip step 2 - no error

Device: Iphone 5s
xCode: Version 9.2 (9C40b)
Using BoringSSL (9.1)
Using Firebase (4.8.0)
Using FirebaseAnalytics (4.0.5)
Using FirebaseAuth (4.4.1)
Using FirebaseCore (4.0.13)
Using FirebaseDatabase (4.1.3)
Using FirebaseFirestore (0.9.4)
Using FirebaseInstanceID (2.0.8)
Using FirebaseMessaging (2.0.8)
Using FirebaseStorage (2.1.1)
Using GTMSessionFetcher (1.1.12)
Using GoogleToolboxForMac (2.1.3)
Using Protobuf (3.5.0)
Using gRPC (1.8.0)
Using gRPC-Core (1.8.0)
Using gRPC-ProtoRPC (1.8.0)
Using gRPC-RxLibrary (1.8.0)
Using leveldb-library (1.20)
Using nanopb (0.3.8)
Target ios version: 10.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions