-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UITableView Causing NSInternalInconsistencyException #617
Comments
Does the crash still reproduce if you remove the call to |
If I do that, the number/ranking in the second screenshot does not update in conjunction with the other view items. |
You should be updating all of the table view cell data in the data source callback. |
Got it - why do you believe that is causing the exception though? It appears that there are some issues with multiple rows populating the data. In this case, it is row 68. |
I'm not 100% convinced it's the source, but it could potentially be updating table view state while FirestoreUI is animating updates, which could then cause an Alternatively, you can avoid using FirestoreUI's automatic updates and instead manually pull data from Firestore and call If you're able to isolate the crash and send me a reproducible project, I can take a look further. |
Got it - what about disabling offline persistence? Would that be an option as well so that it does not cache the previous state of the leaderboard and always creates a fresh load of the data? |
That shouldn't affect things, since FUIFirestoreArray is designed to not be able to tell the difference between a cached load and fresh backend data. |
This should be fixed by #689. |
The fix has been released. The table view cells should update correctly without you having to manually insert update calls that may be crashy. |
I have a leaderboard in my app and the data is stored in Firebase Firestore. The leaderboard dynamically changes based on events related to the users.
Every so often, the leaderboard is crashing and I am receiving an
NSInternalInconsistencyException
. I am unsure why, however it may have to do with when the data in Firebase dynamically changes and theUITableView
repopulates the data. Below is the associated code:LeadersViewController.Swift
Output:
LeaderboardViewController.Swift (where error is occurring):
Output:
Exception:
The text was updated successfully, but these errors were encountered: