This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is the original bug report: |
Ping? Looks like this is still broken? |
I can confirm that this helps - just patched firestore plugin myself on my local machine with changes from @pinkfish and app worked fine without crash producing nice error messages! I think we need to merge this asap! |
solid-software
pushed a commit
to solid-software/plugins
that referenced
this pull request
Oct 15, 2018
The following code causes the snapshot variable to be nil in the callback path. However the code assumes it is not nil and crashes :) - (id<FIRListenerRegistration>) addSnapshotListenerInternalWithOptions:(FSTListenOptions *)internalOptions listener:(FIRDocumentSnapshotBlock)listener { FIRFirestore *firestore = self.firestore; FSTQuery *query = [FSTQuery queryWithPath:self.key.path()]; const DocumentKey key = self.key; FSTViewSnapshotHandler snapshotHandler = ^(FSTViewSnapshot *snapshot, NSError *error) { if (error) { listener(nil, error); ret
@pinkfish Thanks for this PR. @illia-romanenko thanks for confirming. |
andreidiaconu
pushed a commit
to andreidiaconu/plugins
that referenced
this pull request
Feb 17, 2019
* Fix a crash in the snapshot callback
andreidiaconu
added a commit
to andreidiaconu/plugins
that referenced
this pull request
Feb 17, 2019
This reverts commit 5ffb97d.
solid-vovabeloded
pushed a commit
to solid-software/plugins
that referenced
this pull request
Nov 12, 2019
julianscheel
pushed a commit
to jusst-engineering/plugins
that referenced
this pull request
Mar 11, 2020
* Fix a crash in the snapshot callback
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following code causes the snapshot variable to be nil in the callback path. However the code assumes it is not nil and crashes :)
(id)
addSnapshotListenerInternalWithOptions:(FSTListenOptions *)internalOptions
listener:(FIRDocumentSnapshotBlock)listener {
FIRFirestore *firestore = self.firestore;
FSTQuery *query = [FSTQuery queryWithPath:self.key.path()];
const DocumentKey key = self.key;
FSTViewSnapshotHandler snapshotHandler = ^(FSTViewSnapshot *snapshot, NSError *error) {
if (error) {
listener(nil, error);
ret