My Firebase project (iOS, written in Objective-C) was working fine until out of the blue, when launching the app on the simulator, it crashes and I get this message:
Terminating app due to uncaught exception 'RepoExists', reason: 'createRepo called for Repo that already exists.'
I've tried deleting the derived data, restarting Xcode, etc. but to no avail, I can't find anything about this crash on Stack Overflow, Google or the Firebase docs either. Does anyone have any ideas?
Thanks for the help.
I moved the Database.database().ref() call to the main thread, solved the issue for me...
I do this and it helped to solve my problem, I have FirebaseManager
and there are two methods, one of them is the configure that I call in AppDelegate
in didFinishLaunchingWithOptions
. I also call createDatabase
in configure
private func createDatabase() {
_ = Database.database().reference()
}
After that, you can create a DatabaseReference
in any other thread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With