Skip to content

Conversation

@jamesdaniels
Copy link
Member

Storage and FirestoreLite were importing node-fetch as a namespace, rather than pulling the default fetch function and using that.

// import * as nodeFetch from 'node-fetch';
Object [Module] {
  default: [Getter],
  Headers: [Getter],
  Request: [Getter],
  Response: [Getter],
  FetchError: [Getter]
}
// import nodeFetch from 'node-fetch';
[Function: fetch] {
  isRedirect: [Function (anonymous)],
  Promise: [Function: ZoneAwarePromise] {
    toString: [Function (anonymous)],
    resolve: [Function (anonymous)],
    reject: [Function (anonymous)],
    race: [Function (anonymous)],
    all: [Function (anonymous)],
    allSettled: [Function (anonymous)],
    allWithCallback: [Function (anonymous)],
    __zone_symbol__uncaughtPromiseErrors: []
  }
}

This was leading to timeouts in Storage node and uncaught exceptions in Firestore Lite @firebase/firestore: Firestore (9.0.0_lite): RPC_ERROR HTTP error has no status diving in and setting a breakpoint I found this underlying error TypeError: this.fetchImpl is not a function

@changeset-bot
Copy link

changeset-bot bot commented Aug 27, 2021

🦋 Changeset detected

Latest commit: 14bf97c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@firebase/firestore Patch
@firebase/storage Patch
firebase Patch
@firebase/firestore-compat Patch
@firebase/storage-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jamesdaniels jamesdaniels requested a review from Feiyang1 August 27, 2021 22:34
@github-actions
Copy link
Contributor

github-actions bot commented Aug 27, 2021

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 27, 2021

Size Analysis Report

Affected Products

No changes between base commit (509c18f) and head commit (396053f6).

@Feiyang1
Copy link
Member

fyi, @schmidt-sebastian

@Feiyang1 Feiyang1 merged commit 6163bb2 into master Aug 30, 2021
@Feiyang1 Feiyang1 deleted the nodeFetchBug branch August 30, 2021 17:37
@google-oss-bot google-oss-bot mentioned this pull request Aug 30, 2021
@firebase firebase locked and limited conversation to collaborators Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants