From f27baf423b3c9834b94aed13a93a5385813fd7dd Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Thu, 26 Oct 2023 18:31:17 -0600 Subject: [PATCH] Rolling back the use of useFetchStreams, which has lead to hanging queries. (#7729) * Rolling back the use of useFetchStreams, which has lead to hanging queries. --- .changeset/real-ants-notice.md | 5 +++++ .../firestore/src/platform/browser/webchannel_connection.ts | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/real-ants-notice.md diff --git a/.changeset/real-ants-notice.md b/.changeset/real-ants-notice.md new file mode 100644 index 00000000000..e0510bf2dfc --- /dev/null +++ b/.changeset/real-ants-notice.md @@ -0,0 +1,5 @@ +--- +"@firebase/firestore": patch +--- + +Rolling back the use of useFetchStreams, which has lead to hanging and incomplete queries. diff --git a/packages/firestore/src/platform/browser/webchannel_connection.ts b/packages/firestore/src/platform/browser/webchannel_connection.ts index 05cd79ecf9e..7871482bee2 100644 --- a/packages/firestore/src/platform/browser/webchannel_connection.ts +++ b/packages/firestore/src/platform/browser/webchannel_connection.ts @@ -27,7 +27,8 @@ import { EventTarget, StatEvent, Event, - Stat + Stat, + FetchXmlHttpFactory } from '@firebase/webchannel-wrapper'; import { Token } from '../../api/credentials'; @@ -208,7 +209,8 @@ export class WebChannelConnection extends RestConnection { } if (this.useFetchStreams) { - request.useFetchStreams = true; + // TODO(b/307942499): switch to `useFetchStreams` once WebChannel is fixed. + request.xmlHttpFactory = new FetchXmlHttpFactory({}); } this.modifyHeadersForRequest(