firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

Unrecognized database version crash

Open yusuftor opened this issue 6 years ago • 5 comments

This is the exact same issue as #1171. My app is returning the following stack trace on crashlytics:

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x1c5b6098c __exceptionPreprocess
1  libobjc.A.dylib                0x1c58890a4 objc_exception_throw
2  CoreFoundation                 0x1c5a56054 -[NSCache init]
3  MyApp                           0x104ae913c -[FLevelDBStorageEngine runMigration] + 140 (FLevelDBStorageEngine.m:140)
4  MyApp                           0x104ae9028 -[FLevelDBStorageEngine initWithPath:] + 108 (FLevelDBStorageEngine.m:108)
5  MyApp                           0x104b0283c -[FRepo deferredInit] + 143 (FRepo.m:143)
6  libdispatch.dylib              0x1c582d610 _dispatch_call_block_and_release
7  libdispatch.dylib              0x1c582e184 _dispatch_client_callout
8  libdispatch.dylib              0x1c57da464 _dispatch_lane_serial_drain$VARIANT$mp
9  libdispatch.dylib              0x1c57dae58 _dispatch_lane_invoke$VARIANT$mp
10 libdispatch.dylib              0x1c57e4340 _dispatch_workloop_worker_thread
11 libsystem_pthread.dylib        0x1c587dfa4 _pthread_wqthread
12 libsystem_pthread.dylib        0x1c5880ae0 start_wqthread

In my app am configuring firebase like this:

        FirebaseOptions.defaultOptions()?.deepLinkURLScheme = configuration.environment.customUrlScheme
        FirebaseApp.configure()
        Database.database().isPersistenceEnabled = true
        Database.database().goOffline()

        // Disable offline caching
        let settings = FirestoreSettings()
        settings.isPersistenceEnabled = true
        let db = Firestore.firestore()
        db.settings = settings

        Auth.auth().useAppLanguage()
        firestore = Firestore.firestore()

As you can see, I move the firebase database offline. After receiving my first call back from my server, I turn the Firebase database online by using Database.database().goOnline(). Why is this happening? Please fix!

yusuftor avatar Dec 10 '19 11:12 yusuftor

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Dec 10 '19 11:12 google-oss-bot

@yusuftor for me also its happening, we are using realtime database with Database.database().isPersistenceEnabled = true We are Firebase/Core (6.8.1)

ajayagrawal avatar Dec 17 '19 03:12 ajayagrawal

As discussed in #1171, we're likely going to need more information about reproducing to make progress on this one.

paulb777 avatar Dec 18 '19 00:12 paulb777

Hey @yusuftor. We need more information to resolve this issue but there hasn't been an update in 7 days. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Jan 11 '20 02:01 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@yusuftor if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Jan 14 '20 02:01 google-oss-bot