[{"id":"36975071364","type":"CreateEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":778916142,"name":"copilotmoney/TakeHomeWeb","url":"https://api.github.com/repos/copilotmoney/TakeHomeWeb"},"payload":{"ref":"main","ref_type":"branch","master_branch":"main","description":null,"pusher_type":"user"},"public":true,"created_at":"2024-03-28T16:57:49Z","org":{"id":62553367,"login":"copilotmoney","gravatar_id":"","url":"https://api.github.com/orgs/copilotmoney","avatar_url":"https://avatars.githubusercontent.com/u/62553367?"}},{"id":"36975058448","type":"CreateEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":778916142,"name":"copilotmoney/TakeHomeWeb","url":"https://api.github.com/repos/copilotmoney/TakeHomeWeb"},"payload":{"ref":null,"ref_type":"repository","master_branch":"main","description":null,"pusher_type":"user"},"public":true,"created_at":"2024-03-28T16:57:25Z","org":{"id":62553367,"login":"copilotmoney","gravatar_id":"","url":"https://api.github.com/orgs/copilotmoney","avatar_url":"https://avatars.githubusercontent.com/u/62553367?"}},{"id":"36701635162","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"tom-andersen","id":13738054,"node_id":"MDQ6VXNlcjEzNzM4MDU0","avatar_url":"https://avatars.githubusercontent.com/u/13738054?v=4","gravatar_id":"","url":"https://api.github.com/users/tom-andersen","html_url":"https://github.com/tom-andersen","followers_url":"https://api.github.com/users/tom-andersen/followers","following_url":"https://api.github.com/users/tom-andersen/following{/other_user}","gists_url":"https://api.github.com/users/tom-andersen/gists{/gist_id}","starred_url":"https://api.github.com/users/tom-andersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tom-andersen/subscriptions","organizations_url":"https://api.github.com/users/tom-andersen/orgs","repos_url":"https://api.github.com/users/tom-andersen/repos","events_url":"https://api.github.com/users/tom-andersen/events{/privacy}","received_events_url":"https://api.github.com/users/tom-andersen/received_events","type":"User","site_admin":false},"assignees":[{"login":"tom-andersen","id":13738054,"node_id":"MDQ6VXNlcjEzNzM4MDU0","avatar_url":"https://avatars.githubusercontent.com/u/13738054?v=4","gravatar_id":"","url":"https://api.github.com/users/tom-andersen","html_url":"https://github.com/tom-andersen","followers_url":"https://api.github.com/users/tom-andersen/followers","following_url":"https://api.github.com/users/tom-andersen/following{/other_user}","gists_url":"https://api.github.com/users/tom-andersen/gists{/gist_id}","starred_url":"https://api.github.com/users/tom-andersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tom-andersen/subscriptions","organizations_url":"https://api.github.com/users/tom-andersen/orgs","repos_url":"https://api.github.com/users/tom-andersen/repos","events_url":"https://api.github.com/users/tom-andersen/events{/privacy}","received_events_url":"https://api.github.com/users/tom-andersen/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-19T21:59:37Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":1,"+1":1,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/2008204790","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-2008204790","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":2008204790,"node_id":"IC_kwDOBU6LVM53ssX2","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-19T21:59:36Z","updated_at":"2024-03-19T21:59:36Z","author_association":"CONTRIBUTOR","body":"Thanks @yashykt, I was basing my batching assumption on the error being generated in the `void FilterStackCall::BatchControl::PostCompletion()` method in `call.cc`. I could not find any batching being done in Firestore, and it seems to be using the grpc_completion_queue mechanism, not sure if that's where the issue lies, or a red herring.\r\n\r\nI'll let the Firestore experts figure it out then.","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/2008204790/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-19T21:59:37Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36688263055","type":"PushEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":698308576,"name":"copilotmoney/swift-snapshot-testing","url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing"},"payload":{"repository_id":698308576,"push_id":17611685278,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"3884c03afcc0697163e92417de2f5563166382e0","before":"79cd7751e1f19bd0f805836493a1cb5a762776e6","commits":[{"sha":"3884c03afcc0697163e92417de2f5563166382e0","author":{"email":"kaipi@copilot.money","name":"Sergio Campamá"},"message":"Add podspec","distinct":true,"url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing/commits/3884c03afcc0697163e92417de2f5563166382e0"}]},"public":true,"created_at":"2024-03-19T14:57:52Z","org":{"id":62553367,"login":"copilotmoney","gravatar_id":"","url":"https://api.github.com/orgs/copilotmoney","avatar_url":"https://avatars.githubusercontent.com/u/62553367?"}},{"id":"36687884741","type":"PushEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":698308576,"name":"copilotmoney/swift-snapshot-testing","url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing"},"payload":{"repository_id":698308576,"push_id":17611519729,"size":1,"distinct_size":1,"ref":"refs/heads/main","head":"79cd7751e1f19bd0f805836493a1cb5a762776e6","before":"5b0c434778f2c1a4c9b5ebdb8682b28e84dd69bd","commits":[{"sha":"79cd7751e1f19bd0f805836493a1cb5a762776e6","author":{"email":"kaipi@copilot.money","name":"Sergio Campamá"},"message":"Add podspec","distinct":true,"url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing/commits/79cd7751e1f19bd0f805836493a1cb5a762776e6"}]},"public":true,"created_at":"2024-03-19T14:48:49Z","org":{"id":62553367,"login":"copilotmoney","gravatar_id":"","url":"https://api.github.com/orgs/copilotmoney","avatar_url":"https://avatars.githubusercontent.com/u/62553367?"}},{"id":"36687732880","type":"PushEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":698308576,"name":"copilotmoney/swift-snapshot-testing","url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing"},"payload":{"repository_id":698308576,"push_id":17611451642,"size":8,"distinct_size":8,"ref":"refs/heads/main","head":"5b0c434778f2c1a4c9b5ebdb8682b28e84dd69bd","before":"bb0ea08db8e73324fe6c3727f755ca41a23ff2f4","commits":[{"sha":"0c5ffc63c5bb08edbe97ac94ee0010dca3a0296d","author":{"email":"stephen@stephencelis.com","name":"Stephen Celis"},"message":"Update README.md","distinct":true,"url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing/commits/0c5ffc63c5bb08edbe97ac94ee0010dca3a0296d"},{"sha":"4862d48562483d274a2ac7522d905c9237a31a48","author":{"email":"stephen@stephencelis.com","name":"Stephen Celis"},"message":"Add record mode to inline snapshots (#809)\n\n* Add record mode to inline snapshots\r\n\r\n* wip","distinct":true,"url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing/commits/4862d48562483d274a2ac7522d905c9237a31a48"},{"sha":"59b663f68e69f27a87b45de48cb63264b8194605","author":{"email":"135203+mbrandonw@users.noreply.github.com","name":"Brandon Williams"},"message":"Improve the speed of comparing memory buffers by using a workaround t… (#812)\n\n* Improve the speed of comparing memory buffers by using a workaround to a missed compiler optimization\r\n\r\nCo-authored-by: Eric Jensen \r\n\r\n* Update NSImage.swift\r\n\r\n* Update UIImage.swift\r\n\r\n* fix\r\n\r\n---------\r\n\r\nCo-authored-by: Eric Jensen \r\nCo-authored-by: Stephen Celis ","distinct":true,"url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing/commits/59b663f68e69f27a87b45de48cb63264b8194605"},{"sha":"b30b3beaf36be6da8e3c8be4d046b59d01b759bd","author":{"email":"jensen39@gmail.com","name":"Eric Jensen"},"message":"Non-Metal based perceptual image comparison (#666)\n\n* Improve the speed of comparing memory buffers by using a workaround to a missed compiler optimization\r\n\r\n* Remove Metal usage since some virtualized environments don’t support it\r\n\r\nReplaces the CoreImage operations that require Metal with CPU-based calculations\r\n\r\n* Re-add the Metal-based image comparison\r\n\r\nCheck for support before using and fallback to CPU computation if Metal is not supported\r\n\r\n* Update logic to determine if a Metal kernel is supported on the device\r\n\r\n* Use the maintainers preferred method of using a while loop","distinct":true,"url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing/commits/b30b3beaf36be6da8e3c8be4d046b59d01b759bd"},{"sha":"9bfa0aa4666618d2cd20a1ab7df6ecce7610bbc4","author":{"email":"stephencelis@users.noreply.github.com","name":"stephencelis"},"message":"Run swift-format","distinct":true,"url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing/commits/9bfa0aa4666618d2cd20a1ab7df6ecce7610bbc4"},{"sha":"8e68404f641300bfd0e37d478683bb275926760c","author":{"email":"1330668+teameh@users.noreply.github.com","name":"Teameh"},"message":"Fixing wkWebView.takeSnapshot with Xcode 14 & 15 (#692)\n\nThis will fix this issue: https://github.com/pointfreeco/swift-snapshot-testing/issues/625","distinct":true,"url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing/commits/8e68404f641300bfd0e37d478683bb275926760c"},{"sha":"e7b77228b34057041374ebef00c0fd7739d71a2b","author":{"email":"stephen@stephencelis.com","name":"Stephen Celis"},"message":"Fix indentation parsing (#830)\n\nInline snapshot testing attempts to figure out the indentation width of\r\na file by finding the first line with whitespace and grabbing the prefix\r\nof whitespace. While this works fine if you trim whitespace from\r\nwhitespace-only lines, it breaks if you do not, because a line of the\r\nform:\r\n\r\n```\r\n\" \\n\"\r\n```\r\n\r\nWill currently match in its entirety and incorporate the newline into\r\nthe indentation.\r\n\r\nThis PR fixes this by picking the first indented line that contains\r\nnon-whitespace characters, instead.","distinct":true,"url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing/commits/e7b77228b34057041374ebef00c0fd7739d71a2b"},{"sha":"5b0c434778f2c1a4c9b5ebdb8682b28e84dd69bd","author":{"email":"stephen@stephencelis.com","name":"Stephen Celis"},"message":"Bump swift-syntax to 5.10.0 (#836)","distinct":true,"url":"https://api.github.com/repos/copilotmoney/swift-snapshot-testing/commits/5b0c434778f2c1a4c9b5ebdb8682b28e84dd69bd"}]},"public":true,"created_at":"2024-03-19T14:45:03Z","org":{"id":62553367,"login":"copilotmoney","gravatar_id":"","url":"https://api.github.com/orgs/copilotmoney","avatar_url":"https://avatars.githubusercontent.com/u/62553367?"}},{"id":"36612389515","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":15402300,"name":"firebase/firebase-tools","url":"https://api.github.com/repos/firebase/firebase-tools"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-tools/issues/1908","repository_url":"https://api.github.com/repos/firebase/firebase-tools","labels_url":"https://api.github.com/repos/firebase/firebase-tools/issues/1908/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-tools/issues/1908/comments","events_url":"https://api.github.com/repos/firebase/firebase-tools/issues/1908/events","html_url":"https://github.com/firebase/firebase-tools/issues/1908","id":547672893,"node_id":"MDU6SXNzdWU1NDc2NzI4OTM=","number":1908,"title":"allow https for local testing","user":{"login":"ultraGentle","id":41548755,"node_id":"MDQ6VXNlcjQxNTQ4NzU1","avatar_url":"https://avatars.githubusercontent.com/u/41548755?v=4","gravatar_id":"","url":"https://api.github.com/users/ultraGentle","html_url":"https://github.com/ultraGentle","followers_url":"https://api.github.com/users/ultraGentle/followers","following_url":"https://api.github.com/users/ultraGentle/following{/other_user}","gists_url":"https://api.github.com/users/ultraGentle/gists{/gist_id}","starred_url":"https://api.github.com/users/ultraGentle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultraGentle/subscriptions","organizations_url":"https://api.github.com/users/ultraGentle/orgs","repos_url":"https://api.github.com/users/ultraGentle/repos","events_url":"https://api.github.com/users/ultraGentle/events{/privacy}","received_events_url":"https://api.github.com/users/ultraGentle/received_events","type":"User","site_admin":false},"labels":[{"id":71928371,"node_id":"MDU6TGFiZWw3MTkyODM3MQ==","url":"https://api.github.com/repos/firebase/firebase-tools/labels/type:%20question","name":"type: question","color":"cc317c","default":false,"description":""},{"id":1351442659,"node_id":"MDU6TGFiZWwxMzUxNDQyNjU5","url":"https://api.github.com/repos/firebase/firebase-tools/labels/emulator-suite","name":"emulator-suite","color":"b038d8","default":false,"description":""}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2020-01-09T19:25:06Z","updated_at":"2024-03-16T19:34:30Z","closed_at":"2020-01-10T16:32:26Z","author_association":"NONE","active_lock_reason":null,"body":"\r\n\r\nHello, this is a CLI-specific feature request, so I'm submitting it here rather than through the general Firebase channel. \r\n\r\n**Scenario** I'm attempting to test a Stripe integration using the local emulator, but I can't because Stripe considers the Firebase emulator insecure. (Details at bottom.)\r\n\r\n**Current workaround** is to deploy on every change, but this is slow and makes viewing logs difficult. \r\n\r\n**Due-diligence Googling** reveals that there are ways of serving localhost over https -- which I am also attempting -- but I thought it was worth noting here, because one of the reasons I turned to Firebase was the ease of onboarding, and all-in-one workflow. Other users like me (less experienced with backend or devops) may benefit from having this built in. \r\n\r\n**Feature request:** serve by default over https, or at least allow it with a flag. \r\n\r\n**For reference / reproducibility**\r\nsee https://github.com/stripe-samples/checkout-single-subscription/tree/master/client-only/client \r\nspecifically, in `index.html`, change the `successUrl` near the bottom to `localhost:5000` for use with the Firebase emulator. Then go through the Checkout process successfully, and you'll get the `SSL: not secure` error on redirect back to localhost. \r\n\r\n","reactions":{"url":"https://api.github.com/repos/firebase/firebase-tools/issues/1908/reactions","total_count":2,"+1":2,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-tools/issues/1908/timeline","performed_via_github_app":null,"state_reason":"completed"},"comment":{"url":"https://api.github.com/repos/firebase/firebase-tools/issues/comments/2002100959","html_url":"https://github.com/firebase/firebase-tools/issues/1908#issuecomment-2002100959","issue_url":"https://api.github.com/repos/firebase/firebase-tools/issues/1908","id":2002100959,"node_id":"IC_kwDOAOsFPM53VaLf","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-16T19:34:29Z","updated_at":"2024-03-16T19:34:29Z","author_association":"NONE","body":"adding myself to the list of people blocked by this, specifically for storage","reactions":{"url":"https://api.github.com/repos/firebase/firebase-tools/issues/comments/2002100959/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-16T19:34:31Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36556557435","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":24,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-14T15:40:37Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1997753101","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1997753101","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1997753101,"node_id":"IC_kwDOBU6LVM53E0sN","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-14T15:40:36Z","updated_at":"2024-03-14T15:40:36Z","author_association":"CONTRIBUTOR","body":"Created a fork with this change for now [1]. Hopefully you can all reproduce and provide a more robust fix over time, but this is sufficient for our needs for now.\r\n\r\n1: https://github.com/copilotmoney/firebase-ios-sdk/commit/b4d785d5adb2d25d68c26ea5b1ce87a4c224e038","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1997753101/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-14T15:40:37Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36552509490","type":"PushEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":586309974,"name":"copilotmoney/firebase-ios-sdk","url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk"},"payload":{"repository_id":586309974,"push_id":17544057847,"size":4,"distinct_size":4,"ref":"refs/heads/main","head":"b4d785d5adb2d25d68c26ea5b1ce87a4c224e038","before":"3e7aa393c12c360fc97df254e31f8dd42d5b0e7b","commits":[{"sha":"76a8288e856b751a943dfd59c22965d2b5118051","author":{"email":"andrewheard@google.com","name":"Andrew Heard"},"message":"Analytics 10.22.1 (#12482) (#12484)\n\nCo-authored-by: tsunghung <78230356+tsunghung@users.noreply.github.com>","distinct":true,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/76a8288e856b751a943dfd59c22965d2b5118051"},{"sha":"f2f0fff5c7407b9080eb54e6dab1cb616497f21f","author":{"email":"36927374+ncooke3@users.noreply.github.com","name":"Nick Cooke"},"message":"[Release] Add patch note for 10.22.1 (#12490) (#12491)","distinct":true,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/f2f0fff5c7407b9080eb54e6dab1cb616497f21f"},{"sha":"be49849dcba96f2b5ee550d4eceb2c0fa27dade4","author":{"email":"36927374+ncooke3@users.noreply.github.com","name":"Nick Cooke"},"message":"Update Firebase version for 10.22.1 (#12489)","distinct":true,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/be49849dcba96f2b5ee550d4eceb2c0fa27dade4"},{"sha":"b4d785d5adb2d25d68c26ea5b1ce87a4c224e038","author":{"email":"kaipi@copilot.money","name":"Sergio Campamá"},"message":"fix: Prevent watch stream from closing on recoverable error","distinct":true,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/b4d785d5adb2d25d68c26ea5b1ce87a4c224e038"}]},"public":true,"created_at":"2024-03-14T13:59:52Z","org":{"id":62553367,"login":"copilotmoney","gravatar_id":"","url":"https://api.github.com/orgs/copilotmoney","avatar_url":"https://avatars.githubusercontent.com/u/62553367?"}},{"id":"36529210964","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":23,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T22:45:16Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1996017063","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1996017063","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1996017063,"node_id":"IC_kwDOBU6LVM52-M2n","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T22:45:15Z","updated_at":"2024-03-13T22:45:15Z","author_association":"CONTRIBUTOR","body":"Created a gRPC++ issue here: https://github.com/grpc/grpc/issues/36115\r\n","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1996017063/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T22:45:17Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36529203427","type":"IssuesEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":27729880,"name":"grpc/grpc","url":"https://api.github.com/repos/grpc/grpc"},"payload":{"action":"opened","issue":{"url":"https://api.github.com/repos/grpc/grpc/issues/36115","repository_url":"https://api.github.com/repos/grpc/grpc","labels_url":"https://api.github.com/repos/grpc/grpc/issues/36115/labels{/name}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/36115/comments","events_url":"https://api.github.com/repos/grpc/grpc/issues/36115/events","html_url":"https://github.com/grpc/grpc/issues/36115","id":2185017571,"node_id":"I_kwDOAacf2M6CPLjj","number":36115,"title":"heavy load on batch controlled messages results in write after close errors after receiving RST_STREAM(0)","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":155504842,"node_id":"MDU6TGFiZWwxNTU1MDQ4NDI=","url":"https://api.github.com/repos/grpc/grpc/labels/kind/bug","name":"kind/bug","color":"93732c","default":false,"description":null},{"id":166332908,"node_id":"MDU6TGFiZWwxNjYzMzI5MDg=","url":"https://api.github.com/repos/grpc/grpc/labels/lang/c++","name":"lang/c++","color":"fad8c7","default":false,"description":null},{"id":360790193,"node_id":"MDU6TGFiZWwzNjA3OTAxOTM=","url":"https://api.github.com/repos/grpc/grpc/labels/priority/P2","name":"priority/P2","color":"dd7172","default":false,"description":""},{"id":3940839694,"node_id":"LA_kwDOAacf2M7q5HEO","url":"https://api.github.com/repos/grpc/grpc/labels/untriaged","name":"untriaged","color":"c2e0c6","default":false,"description":""}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2024-03-13T22:44:54Z","updated_at":"2024-03-13T22:44:54Z","closed_at":null,"author_association":"NONE","active_lock_reason":null,"body":"### What version of gRPC and what language are you using?\r\n1.49.1 / C++ from FirebaseFirestore (10.22.0)\r\n\r\n### What operating system (Linux, Windows,...) and version?\r\niOS Simulator 17.4\r\n\r\n### What runtime / compiler are you using (e.g. python version or version of gcc)\r\nXcode 15.3\r\n\r\n### What did you do?\r\nI'm running Firestore in a very heavy duty manner, this translates somehow into using some sort of batch mechanism from gRPC++. The connection I'm using is sending a lot of messages, and I believe that the server overloads and sends a RST_STREAM code 0, and the batch is not yet done sending messages, so it sends additional messages to a closed stream, resulting in this error:\r\n\r\n```\r\n(lldb) p grpc_error_std_string(error)\r\n(std::string) \"UNKNOWN:Attempt to send message after stream was closed. {file:\\\"/Users/kaipi/Developer/cpl/copilot-ios/main/Pods/gRPC-Core/src/core/lib/surface/call.cc\\\", file_line:1083, created_time:\\\"2024-03-13T19:01:29.963325-03:00\\\"}\"\r\n```\r\n\r\nThis in turn breaks Firestore, as described in https://github.com/firebase/firebase-ios-sdk/issues/12522\r\n\r\n### What did you expect to see?\r\n\r\nFor gRPC++ to stop sending messages if the server sends a RST_STREAM if the batch isn't done.\r\n\r\n### What did you see instead?\r\n\r\nhttp Trace:\r\nhttps://gist.githubusercontent.com/sergiocampama/c7ebecd21f42ca948358cd45bc1d5a77/raw/0fd3b4e2e8ff8c5639c9c3bca48be1be9a7d8f1e/gistfile1.txt\r\n\r\n### Anything else we should know about your project / environment?\r\n","reactions":{"url":"https://api.github.com/repos/grpc/grpc/issues/36115/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/grpc/grpc/issues/36115/timeline","performed_via_github_app":null,"state_reason":null}},"public":true,"created_at":"2024-03-13T22:44:57Z","org":{"id":7802525,"login":"grpc","gravatar_id":"","url":"https://api.github.com/orgs/grpc","avatar_url":"https://avatars.githubusercontent.com/u/7802525?"}},{"id":"36529026154","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":22,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T22:36:15Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1996007947","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1996007947","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1996007947,"node_id":"IC_kwDOBU6LVM52-KoL","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T22:36:14Z","updated_at":"2024-03-13T22:36:14Z","author_association":"CONTRIBUTOR","body":"Figured out how to enable grpc tracing, was able to see that we are indeed getting a RST_STREAM from the backend with code 0\r\n\r\nhere is the trace logs: https://gist.githubusercontent.com/sergiocampama/c7ebecd21f42ca948358cd45bc1d5a77/raw/0fd3b4e2e8ff8c5639c9c3bca48be1be9a7d8f1e/gistfile1.txt\r\n\r\nwhat I was able to find was that the watch stream does indeed get a RST_STREAM message, and then we restart that stream, as you can see there are multiple `SEND_INITIAL_METADATA{:path: /google.firestore.v1.Firestore/Listen` events.\r\n\r\nwhat I think is happening is that on overload, the grpc++ batch processor continues sending messages to the backend, after the stream has closed... so it's not detecting that event and canceling the subsequent messages, that generates a discardable error, but an error nonetheless, and that indeed is taken as a (wrong) signal that the stream is broken and that we need to close it, which in turns puts Firestore into a broken state where it can not be recovered from","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1996007947/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T22:36:15Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36528344810","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":21,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T22:05:45Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1995964230","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1995964230","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1995964230,"node_id":"IC_kwDOBU6LVM529_9G","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T22:05:43Z","updated_at":"2024-03-13T22:05:43Z","author_association":"CONTRIBUTOR","body":"tracing to where the ok success status comes, was able to find this error:\r\n\r\n```\r\n(lldb) p grpc_error_std_string(error)\r\n(std::string) \"UNKNOWN:Attempt to send message after stream was closed. {file:\\\"/Users/kaipi/Developer/cpl/copilot-ios/main/Pods/gRPC-Core/src/core/lib/surface/call.cc\\\", file_line:1083, created_time:\\\"2024-03-13T19:01:29.963325-03:00\\\"}\"\r\n```\r\n\r\nafter that, only a single bit is propagated to signal the failure of the completion.","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1995964230/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T22:05:45Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36527773954","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":20,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T21:39:39Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1995910996","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1995910996","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1995910996,"node_id":"IC_kwDOBU6LVM529y9U","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T21:39:37Z","updated_at":"2024-03-13T21:39:37Z","author_association":"CONTRIBUTOR","body":"![Screenshot 2024-03-13 at 6 37 35 PM](https://github.com/firebase/firebase-ios-sdk/assets/689198/c0d9e1fd-b98f-417f-b7d7-5a2c3eda0f96)\r\n\r\n\r\nmore information about the \"failure\" message... it looks like the request itself succeeded? it's unclear why the \"ok\" boolean is set to false","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1995910996/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T21:39:39Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36527486353","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":19,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T21:27:09Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1995883692","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1995883692","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1995883692,"node_id":"IC_kwDOBU6LVM529sSs","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T21:27:08Z","updated_at":"2024-03-13T21:27:08Z","author_association":"CONTRIBUTOR","body":"In fact, with that code above, which looks terrible since it's calling on_success for the error case, I'm seeing that the connection continues working normally, it never locks up, and it never locks up the terminate call, and it sort of recovers on its own... sure, I'll lose some events, but in those cases we can just call terminate and restart the listeners... I disagree with \"all errors are unrecoverable\"","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1995883692/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T21:27:09Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36526401995","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":18,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T20:43:50Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1995740640","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1995740640","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1995740640,"node_id":"IC_kwDOBU6LVM529JXg","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T20:43:49Z","updated_at":"2024-03-13T20:43:49Z","author_association":"CONTRIBUTOR","body":"ok, found a workaround that works for us for now... \r\n\r\nif I replace `GrpcStream::NewCompletion` with the following in `grpc_stream.cc`:\r\n\r\n```\r\nstd::shared_ptr GrpcStream::NewCompletion(\r\n Type tag, const OnSuccess& on_success) {\r\n // Can't move into lambda until C++14.\r\n GrpcCompletion::Callback decorated =\r\n [this, on_success](bool ok,\r\n const std::shared_ptr& completion) {\r\n RemoveCompletion(completion);\r\n\r\n if (ok) {\r\n if (on_success) {\r\n on_success(completion);\r\n }\r\n } else {\r\n LOG_DEBUG(\"GrpcStream('%s'): operation of type %s failed\", this, completion->type());\r\n if (on_success) {\r\n on_success(completion);\r\n }\r\n // Use the same error-handling for all operations; all errors are\r\n // unrecoverable.\r\n // OnOperationFailed();\r\n }\r\n };\r\n\r\n // For lifetime details, see `GrpcCompletion` class comment.\r\n auto completion =\r\n GrpcCompletion::Create(tag, worker_queue_, std::move(decorated));\r\n completions_.push_back(completion);\r\n return completion;\r\n}\r\n```\r\n\r\nI can avoid the stream crapping out.... it won't get the listen updates, but I can pair this with a polling read every n seconds, and if it fails, I can call terminate, which won't lock up any more.","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1995740640/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T20:43:50Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36525379601","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":17,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T20:04:28Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1995612368","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1995612368","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1995612368,"node_id":"IC_kwDOBU6LVM528qDQ","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T20:04:28Z","updated_at":"2024-03-13T20:04:28Z","author_association":"CONTRIBUTOR","body":"awesome, thanks for confirming... let me know when you get a chance to review with the team, to see if there are any quick workarounds that we can use","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1995612368/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T20:04:29Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36518079242","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":15,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T16:04:18Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994799637","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1994799637","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1994799637,"node_id":"IC_kwDOBU6LVM525joV","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T16:04:17Z","updated_at":"2024-03-13T16:04:17Z","author_association":"CONTRIBUTOR","body":"One final update: I was able to create a small repro case that results in the same behavior. This overloads the WatchStream until there's a read error (`GrpcStream('6000032595f0'): operation of type 1 failed`), and then when you tap on the Run stuff button on the simulator, it attempts to terminate Firestore but it can't and gets stuck\r\n\r\nnot sure if this is the same failure mode as what I'm seeing above, but it looks similar in that if the watch or write streams are overloaded, firestore gets corrupted with no way of recovering","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994799637/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T16:04:18Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36517880158","type":"CreateEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":771607462,"name":"sergiocampama/ListenerError","url":"https://api.github.com/repos/sergiocampama/ListenerError"},"payload":{"ref":"main","ref_type":"branch","master_branch":"main","description":null,"pusher_type":"user"},"public":true,"created_at":"2024-03-13T15:59:03Z"},{"id":"36517871762","type":"CreateEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":771607462,"name":"sergiocampama/ListenerError","url":"https://api.github.com/repos/sergiocampama/ListenerError"},"payload":{"ref":null,"ref_type":"repository","master_branch":"main","description":null,"pusher_type":"user"},"public":true,"created_at":"2024-03-13T15:58:49Z"},{"id":"36516521027","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":14,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T15:23:23Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994655137","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1994655137","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1994655137,"node_id":"IC_kwDOBU6LVM525AWh","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T15:23:22Z","updated_at":"2024-03-13T15:23:22Z","author_association":"CONTRIBUTOR","body":"just tested that I could continue to use the write stream by creating new firestore documents after getting the `operation of type 2 failed`, so this is specifically about Datastore's WatchStream getting completely stuck when it fails to write a message, and firestore failing to recover from this state even after attempting to terminate the firestore instance, hopefully this is enough information that you can create a test to simulate this condition (just the failure to write on the watch stream) to reproduce...\r\n\r\nideally, we should be able to find the root cause of the write failure, but sans that, allowing firestore to recover from this state without requiring an app restart should be the higher priority IMO","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994655137/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T15:23:24Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36515556686","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":13,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T14:59:14Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994599246","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1994599246","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1994599246,"node_id":"IC_kwDOBU6LVM524ytO","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T14:59:12Z","updated_at":"2024-03-13T14:59:12Z","author_association":"CONTRIBUTOR","body":"I'm fairly confident that when we get `GrpcStream('168259010'): operation of type 2 failed`, the stream effectively dies and firestore gets into a corrupted state where the only recourse is to restart the app","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994599246/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T14:59:14Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36515526042","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":12,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T14:58:28Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994597526","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1994597526","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1994597526,"node_id":"IC_kwDOBU6LVM524ySW","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T14:58:27Z","updated_at":"2024-03-13T14:58:27Z","author_association":"CONTRIBUTOR","body":"setting a breakpoint in datastore.cc's PollGrpcQueue to when `ok == false`, then tried tracing the WriteStream's write call to see if I could find where we're parsing/getting the error from the C++ code, but it's just so difficult to traverse... so I'm unsure if we're getting the error from the backend or from the network stack, and there are no other error logs... \r\n\r\nis there a way to get more information on why the grpc completion queue failed to write to the stream?","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994597526/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T14:58:28Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36513519091","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T14:08:12Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994492565","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1994492565","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1994492565,"node_id":"IC_kwDOBU6LVM524YqV","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T14:08:10Z","updated_at":"2024-03-13T14:08:10Z","author_association":"CONTRIBUTOR","body":"Actually, looking at the logs for the last response log, I see this just after it:\r\n\r\n```\r\n10.17.0 - [FirebaseFirestore][I-FST000001] GrpcStream('168259010'): operation of type 2 failed\r\n10.17.0 - [FirebaseFirestore][I-FST000001] GrpcStream('168259010'): finishing the underlying call\r\n10.17.0 - [FirebaseFirestore][I-FST000001] GrpcStream('168259010'): fast finishing 1 completion(s)\r\n```\r\n\r\n(we're using 10.22 Firestore but 10.17 FirebaseCore for some reason)","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994492565/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T14:08:12Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36513187062","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-13T13:59:47Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994475030","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1994475030","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1994475030,"node_id":"IC_kwDOBU6LVM524UYW","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-13T13:59:45Z","updated_at":"2024-03-13T13:59:45Z","author_association":"CONTRIBUTOR","body":"No dice on updated gRPC. \r\n\r\nI've enabled logging, and it's a bit massive and contains some sensitive information for a public setting, and I also don't think it provides much value, since there are no errors, just a massive list of watch/unwatch/response logs... I could share it if you start an email thread with me at sergiocampama _at_ gmail _dot_ com... \r\n\r\nbut I did found this... when the connection seems to hang because of the massive number of document updates, I can still send requests to the backend to listen to new documents (so it's not a dispatch queue issue), but the backend does not reply with a response for the initial document read nor the registered target_id, so it's starting to look like the WatchStream from Firestore's Datastore is getting hung on the backend side (could be head of line blocking on that h2 stream)... if this is indeed a possibility, it seems harder to debug from your side... not sure if I can give you any identifier for the connection so that someone could look more into it...\r\n\r\nit would be great if the firestore grpc channel had some sort of ping mechanism to detect that the connection is hanging and to try to force recover it by reregistering the target_ids, so that we don't lose uptime just on that single connection blocking... if not, force closing the watch_stream and write_stream from remote_store would also help so that we can at least recover by letting the user perform the action that would involve firestore's termination\r\n\r\nfor now we're mitigating by trying to reduce the number of document reads to not trigger this hang, but given we don't have a root cause yet, we fear it might still be triggered in the future.","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1994475030/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-13T13:59:47Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36488248743","type":"PushEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":586309974,"name":"copilotmoney/firebase-ios-sdk","url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk"},"payload":{"repository_id":586309974,"push_id":17512217645,"size":67,"distinct_size":39,"ref":"refs/heads/main","head":"3e7aa393c12c360fc97df254e31f8dd42d5b0e7b","before":"acf222b1477b9104962e0c41e37a3593e1ae63fd","commits":[{"sha":"dd77b8ed7ade276cfd52bd6ac9aa98466b64786c","author":{"email":"paulbeusterien@google.com","name":"Paul Beusterien"},"message":"Update GHA artifact functions (#12337)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/dd77b8ed7ade276cfd52bd6ac9aa98466b64786c"},{"sha":"8ec4afc4c79e9d2b5b33523c54999b392dc59432","author":{"email":"paulbeusterien@google.com","name":"Paul Beusterien"},"message":"Try GHA retry (#12341)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/8ec4afc4c79e9d2b5b33523c54999b392dc59432"},{"sha":"2d3ecf96588079a19734d32713f44e22b1b41451","author":{"email":"paulbeusterien@google.com","name":"Paul Beusterien"},"message":"Storage docs fixes (#12344)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/2d3ecf96588079a19734d32713f44e22b1b41451"},{"sha":"d603c7bcb36bf52b6f24a7149b874e647b404799","author":{"email":"paulbeusterien@google.com","name":"Paul Beusterien"},"message":"Fix health-metrics (#12345)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/d603c7bcb36bf52b6f24a7149b874e647b404799"},{"sha":"90e24d0a48d7b5ecf77d2185c484e4a55a8a7878","author":{"email":"andrewheard@google.com","name":"Andrew Heard"},"message":"Increase `swift-tools-version` to `5.7.1` (#12350)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/90e24d0a48d7b5ecf77d2185c484e4a55a8a7878"},{"sha":"ec8e20eb3234be7500ba9414c6c09af1f5b30ba0","author":{"email":"samedson@google.com","name":"Sam Edson"},"message":"Remove calls to statfs for supporting Privacy Manifests (#12355)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/ec8e20eb3234be7500ba9414c6c09af1f5b30ba0"},{"sha":"aa0b985eeb1c08e7ca93152f9d1ccd99274131ff","author":{"email":"paulbeusterien@google.com","name":"Paul Beusterien"},"message":"Fix auth integration test build issue (#12362)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/aa0b985eeb1c08e7ca93152f9d1ccd99274131ff"},{"sha":"3e7e30f16f6722318d8867431733230c200cb351","author":{"email":"36927374+ncooke3@users.noreply.github.com","name":"Nick Cooke"},"message":"[Infra] Delete health-metrics-release workflow (#12363)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/3e7e30f16f6722318d8867431733230c200cb351"},{"sha":"85da438acd224388ef4af03de769908428bfe188","author":{"email":"36927374+ncooke3@users.noreply.github.com","name":"Nick Cooke"},"message":"[Carthage] Update Carthage artifacts for Firebase 10.21.0 (#12364)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/85da438acd224388ef4af03de769908428bfe188"},{"sha":"7dc3e52a10ed4bbd05054790e60eb3f13d29ba3b","author":{"email":"paulbeusterien@google.com","name":"Paul Beusterien"},"message":"Update to CocoaPods 1.15.2 (#12325)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/7dc3e52a10ed4bbd05054790e60eb3f13d29ba3b"},{"sha":"d95c62be19c378d80e2bc64b70f94993ca5687e2","author":{"email":"36927374+ncooke3@users.noreply.github.com","name":"Nick Cooke"},"message":"Update versions for Release 10.22.0 (#12366)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/d95c62be19c378d80e2bc64b70f94993ca5687e2"},{"sha":"0bb0dcf76cde5a5e924599bba9d942fff7d4ec62","author":{"email":"paulbeusterien@google.com","name":"Paul Beusterien"},"message":"Migrate a few more retry steps (#12371)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/0bb0dcf76cde5a5e924599bba9d942fff7d4ec62"},{"sha":"3ff2b270eb36081614e887517b9660286d76b2ae","author":{"email":"paulbeusterien@google.com","name":"Paul Beusterien"},"message":"Update Roadmap (#12373)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/3ff2b270eb36081614e887517b9660286d76b2ae"},{"sha":"cd1ee8d2a4be4ca406477a8f7d1b1f8515fe0a37","author":{"email":"andrewheard@google.com","name":"Andrew Heard"},"message":"Remove placeholder token constant from Firebase App Check (#12374)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/cd1ee8d2a4be4ca406477a8f7d1b1f8515fe0a37"},{"sha":"7b9125a2e99529e48a2e19dd6892c950e3dda58d","author":{"email":"andrewheard@google.com","name":"Andrew Heard"},"message":"Update links to `main` branches (#12375)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/7b9125a2e99529e48a2e19dd6892c950e3dda58d"},{"sha":"2c76938316df35db9f8f5aa69bfeacfac40a8a07","author":{"email":"96084918+cherylEnkidu@users.noreply.github.com","name":"cherylEnkidu"},"message":"Bug fix for flaky behaviour when using Map in arrayRemove (#12378)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/2c76938316df35db9f8f5aa69bfeacfac40a8a07"},{"sha":"ab0d0854a3682f14c0ee26859469cb4b1636d5e1","author":{"email":"andrewheard@google.com","name":"Andrew Heard"},"message":"Make `AuthInterop` and `AppCheckInterop` properties optional in Storage (#12387)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/ab0d0854a3682f14c0ee26859469cb4b1636d5e1"},{"sha":"ca77625a3263da3a1b680b09c16a558dd2874e5f","author":{"email":"36927374+ncooke3@users.noreply.github.com","name":"Nick Cooke"},"message":"Revert \"[Release Tooling] Stop including 'Info.plist's in static xcframeworks (#12243)\" (#12396)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/ca77625a3263da3a1b680b09c16a558dd2874e5f"},{"sha":"4a8f84baf08059f4114223d8489041c4c9b0f609","author":{"email":"paulbeusterien@google.com","name":"Paul Beusterien"},"message":"[FIAM] Fix an objc_retain crash (#12395)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/4a8f84baf08059f4114223d8489041c4c9b0f609"},{"sha":"3de7e6c29dbc7c5c30eb6b702e9f50280830f99b","author":{"email":"paulbeusterien@google.com","name":"Paul Beusterien"},"message":"Disable flaky Storage ObjC quickstart on Xcode 15.2 (#12399)","distinct":false,"url":"https://api.github.com/repos/copilotmoney/firebase-ios-sdk/commits/3de7e6c29dbc7c5c30eb6b702e9f50280830f99b"}]},"public":true,"created_at":"2024-03-12T20:30:39Z","org":{"id":62553367,"login":"copilotmoney","gravatar_id":"","url":"https://api.github.com/orgs/copilotmoney","avatar_url":"https://avatars.githubusercontent.com/u/62553367?"}},{"id":"36485129163","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-12T18:32:42Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1992303327","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1992303327","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1992303327,"node_id":"IC_kwDOBU6LVM52wCLf","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-12T18:32:41Z","updated_at":"2024-03-12T18:32:41Z","author_association":"CONTRIBUTOR","body":"it's not looking like a dispatch issue, more like one of the GrpcStreams is getting blocked","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1992303327/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-12T18:32:42Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36482686551","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-12T17:11:53Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1992158829","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1992158829","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1992158829,"node_id":"IC_kwDOBU6LVM52ve5t","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-12T17:11:51Z","updated_at":"2024-03-12T17:11:51Z","author_association":"CONTRIBUTOR","body":"Made the change locally, but it didn't help, still getting stuck. I also replaced the cacheSettings with `MemoryCacheSettings(garbageCollectorSettings: MemoryLRUGCSettings())`, which bypasses the LevelDB layer, and it's also getting stuck on the same events.","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1992158829/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-12T17:11:53Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36479767669","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false},"assignees":[{"login":"milaGGL","id":107142260,"node_id":"U_kgDOBmLcdA","avatar_url":"https://avatars.githubusercontent.com/u/107142260?v=4","gravatar_id":"","url":"https://api.github.com/users/milaGGL","html_url":"https://github.com/milaGGL","followers_url":"https://api.github.com/users/milaGGL/followers","following_url":"https://api.github.com/users/milaGGL/following{/other_user}","gists_url":"https://api.github.com/users/milaGGL/gists{/gist_id}","starred_url":"https://api.github.com/users/milaGGL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milaGGL/subscriptions","organizations_url":"https://api.github.com/users/milaGGL/orgs","repos_url":"https://api.github.com/users/milaGGL/repos","events_url":"https://api.github.com/users/milaGGL/events{/privacy}","received_events_url":"https://api.github.com/users/milaGGL/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-12T15:48:45Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1991978204","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1991978204","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1991978204,"node_id":"IC_kwDOBU6LVM52uyzc","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-12T15:48:44Z","updated_at":"2024-03-12T15:48:44Z","author_association":"CONTRIBUTOR","body":"Through some mechanism, we're creating/modifying 1000s of changelog documents. We have a listener for that collection of changelogs, which is updated 1 at a time, since the changelog documents are created from different cloud functions (they're onModified triggers for another set of documents). \r\n\r\nAt some point during this listening, it seems firestore locks up and stops receiving any kind of updates. We notice this lack of updates because the UI does not reflect that a document which should have been deleted, is not removed from the screen.\r\n\r\nIt is at this point that if you call Firestore.terminate, that since it is somehow locked, the terminate's callback won't get called, and it will get stuck on that backtrace shown above.","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1991978204/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-12T15:48:45Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}},{"id":"36476423241","type":"IssueCommentEvent","actor":{"id":689198,"login":"sergiocampama","display_login":"sergiocampama","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","avatar_url":"https://avatars.githubusercontent.com/u/689198?"},"repo":{"id":89033556,"name":"firebase/firebase-ios-sdk","url":"https://api.github.com/repos/firebase/firebase-ios-sdk"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","repository_url":"https://api.github.com/repos/firebase/firebase-ios-sdk","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/labels{/name}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/comments","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/events","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522","id":2180484244,"node_id":"I_kwDOBU6LVM6B94yU","number":12522,"title":"Firestore.terminate hangs, and never calls callback","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"labels":[{"id":713434153,"node_id":"MDU6TGFiZWw3MTM0MzQxNTM=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/api:%20firestore","name":"api: firestore","color":"c5def5","default":false,"description":""}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2024-03-12T00:19:58Z","updated_at":"2024-03-12T14:24:48Z","closed_at":null,"author_association":"CONTRIBUTOR","active_lock_reason":null,"body":"### Description\n\nThere are certain scenarios where I'll call Firestore's terminate function, and it will hang, never calling the callback. I haven't been able to create a reproducer, but can consistently get my product's code to get into this state (not shareable for obvious reasons).\r\n\r\nThis appears to happen when there's an overload of firestore document changes. I am able to see that the `com.google.firebase.firestore` queue's target queue is `com.apple.root.default-qos.overcommit` though not sure what this means. It looks like the queue starts with this value set as the target queue, could be a red herring.\r\n\r\nHere's a screenshot of the backtrace of where firestore hangs... It looks like it's unable to close the gRPC watch stream for the RemoteStore, stuck on WaitUntilOffQueue.\r\n\r\n\r\n\r\nI'm basically stuck trying to debug this to see where things go wrong and what I can do to avoid this. I'm very unfamiliar with this codebase, so I don't even know what to look for to find where the code is getting stuck. Any help with pointers on where to look or what to check would be very appreciated.\n\n### Reproducing the issue\n\nCan't share reproduction steps, as I can't share the relevant code.\n\n### Firebase SDK Version\n\n10.22\n\n### Xcode Version\n\n15.3\n\n### Installation Method\n\nCocoaPods\n\n### Firebase Product(s)\n\nFirestore\n\n### Targeted Platforms\n\niOS\n\n### Relevant Log Output\n\n```shell\nThere are no relevant logs.\n```\n\n\n### If using Swift Package Manager, the project's Package.resolved\n\nNone\n\n### If using CocoaPods, the project's Podfile.lock\n\nCan't share","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522/timeline","performed_via_github_app":null,"state_reason":null},"comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1991774161","html_url":"https://github.com/firebase/firebase-ios-sdk/issues/12522#issuecomment-1991774161","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/12522","id":1991774161,"node_id":"IC_kwDOBU6LVM52uA_R","user":{"login":"sergiocampama","id":689198,"node_id":"MDQ6VXNlcjY4OTE5OA==","avatar_url":"https://avatars.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2024-03-12T14:24:46Z","updated_at":"2024-03-12T14:24:46Z","author_association":"CONTRIBUTOR","body":"I think I have an idea of why it starts happening, but can't yet explain it in code... what happens is that after some event, we'll create some changelog documents on a collection like \"/changelog/user_id\", which might contain 100s or 1000s of documents created in a very short span of time, but outside of any database transaction, so it looks like it gets 100s of serial updates of 1 document each... for some reason, this seems to lock firestore... if I remove this changelog subscription, I can't reproduce the hang any more\r\n","reactions":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments/1991774161/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null}},"public":true,"created_at":"2024-03-12T14:24:48Z","org":{"id":1335026,"login":"firebase","gravatar_id":"","url":"https://api.github.com/orgs/firebase","avatar_url":"https://avatars.githubusercontent.com/u/1335026?"}}]