From 1da9d205177c0c9c30cc242f71f916669fc02c3a Mon Sep 17 00:00:00 2001 From: Wu-Hui Date: Mon, 22 Apr 2024 13:58:17 -0400 Subject: [PATCH 1/2] Go back using xmlhttprequest for bidi-streams --- .../firestore/src/platform/browser/webchannel_connection.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/firestore/src/platform/browser/webchannel_connection.ts b/packages/firestore/src/platform/browser/webchannel_connection.ts index 38d78996b6e..77ecef10e0b 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,7 @@ export class WebChannelConnection extends RestConnection { } if (this.useFetchStreams) { - request.useFetchStreams = true; + request.xmlHttpFactory = new FetchXmlHttpFactory({}); } this.modifyHeadersForRequest( From 97f457a25941f3f8899286a38d2383443ae3eb67 Mon Sep 17 00:00:00 2001 From: wu-hui <53845758+wu-hui@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:07:57 -0400 Subject: [PATCH 2/2] Create pink-beds-study.md --- .changeset/pink-beds-study.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/pink-beds-study.md diff --git a/.changeset/pink-beds-study.md b/.changeset/pink-beds-study.md new file mode 100644 index 00000000000..dfda22eb4d9 --- /dev/null +++ b/.changeset/pink-beds-study.md @@ -0,0 +1,5 @@ +--- +"@firebase/firestore": patch +--- + +Go back using xmlhttprequest for bidi-streams, as fetch streams seem to be having connection issue.