{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/plugins/issues/773","repository_url":"https://api.github.com/repos/flutter/plugins","labels_url":"https://api.github.com/repos/flutter/plugins/issues/773/labels{/name}","comments_url":"https://api.github.com/repos/flutter/plugins/issues/773/comments","events_url":"https://api.github.com/repos/flutter/plugins/issues/773/events","html_url":"https://github.com/flutter/plugins/pull/773","id":358141412,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzOTg1OTU1","number":773,"title":"Fix a crash in the snapshot callback","user":{"login":"pinkfish","id":2549297,"node_id":"MDQ6VXNlcjI1NDkyOTc=","avatar_url":"https://avatars0.githubusercontent.com/u/2549297?v=4","gravatar_id":"","url":"https://api.github.com/users/pinkfish","html_url":"https://github.com/pinkfish","followers_url":"https://api.github.com/users/pinkfish/followers","following_url":"https://api.github.com/users/pinkfish/following{/other_user}","gists_url":"https://api.github.com/users/pinkfish/gists{/gist_id}","starred_url":"https://api.github.com/users/pinkfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinkfish/subscriptions","organizations_url":"https://api.github.com/users/pinkfish/orgs","repos_url":"https://api.github.com/users/pinkfish/repos","events_url":"https://api.github.com/users/pinkfish/events{/privacy}","received_events_url":"https://api.github.com/users/pinkfish/received_events","type":"User","site_admin":false},"labels":[{"id":616170846,"node_id":"MDU6TGFiZWw2MTYxNzA4NDY=","url":"https://api.github.com/repos/flutter/plugins/labels/cla:%20yes","name":"cla: yes","color":"FFFFFF","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-07T16:56:31Z","updated_at":"2018-09-07T16:57:39Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/flutter/plugins/pulls/773","html_url":"https://github.com/flutter/plugins/pull/773","diff_url":"https://github.com/flutter/plugins/pull/773.diff","patch_url":"https://github.com/flutter/plugins/pull/773.patch"},"body":"The following code causes the snapshot variable to be nil in the callback path.  However the code assumes it is not nil and crashes :)\r\n\r\n- (id<FIRListenerRegistration>)\r\naddSnapshotListenerInternalWithOptions:(FSTListenOptions *)internalOptions\r\n                              listener:(FIRDocumentSnapshotBlock)listener {\r\n  FIRFirestore *firestore = self.firestore;\r\n  FSTQuery *query = [FSTQuery queryWithPath:self.key.path()];\r\n  const DocumentKey key = self.key;\r\n\r\n  FSTViewSnapshotHandler snapshotHandler = ^(FSTViewSnapshot *snapshot, NSError *error) {\r\n    if (error) {\r\n      listener(nil, error);\r\n      ret"},"comment":{"url":"https://api.github.com/repos/flutter/plugins/issues/comments/419502210","html_url":"https://github.com/flutter/plugins/pull/773#issuecomment-419502210","issue_url":"https://api.github.com/repos/flutter/plugins/issues/773","id":419502210,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTUwMjIxMA==","user":{"login":"pinkfish","id":2549297,"node_id":"MDQ6VXNlcjI1NDkyOTc=","avatar_url":"https://avatars0.githubusercontent.com/u/2549297?v=4","gravatar_id":"","url":"https://api.github.com/users/pinkfish","html_url":"https://github.com/pinkfish","followers_url":"https://api.github.com/users/pinkfish/followers","following_url":"https://api.github.com/users/pinkfish/following{/other_user}","gists_url":"https://api.github.com/users/pinkfish/gists{/gist_id}","starred_url":"https://api.github.com/users/pinkfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinkfish/subscriptions","organizations_url":"https://api.github.com/users/pinkfish/orgs","repos_url":"https://api.github.com/users/pinkfish/repos","events_url":"https://api.github.com/users/pinkfish/events{/privacy}","received_events_url":"https://api.github.com/users/pinkfish/received_events","type":"User","site_admin":false},"created_at":"2018-09-07T16:57:39Z","updated_at":"2018-09-07T16:57:39Z","author_association":"NONE","body":"Here is the original bug report:\r\nhttps://github.com/flutter/flutter/issues/21537"}}
{"actor":{"display_login":"pinkfish"}}