Skip to content

Large responses fail to resolve on Node.js #169

@forivall

Description

@forivall

Bug Report

Prerequisites

  • Can you reproduce the problem?
  • Are you running the latest version?
  • Are you reporting to the correct repository? - technically, this is a by-design issue of node-fetch, but it can be mitigated
  • Did you perform a cursory search?

For more information, see the CONTRIBUTING guide.

Description

Large responses fail on Node.js - see upstream issue node-fetch/node-fetch#396 and node-fetch/node-fetch#151

In https://github.com/bitinn/node-fetch/blob/master/LIMITS.md, note the line:

  • If you are using res.clone() and writing an isomorphic app, note that stream on Node.js have a smaller internal buffer size (16Kb, aka highWaterMark) from client-side browsers (>1Mb, not consistent across browsers).

This was introduced in 03e530c

Console Errors: None appear

Screenshots: [If applicable, add screenshots to help explain your problem]

Steps to Reproduce

  1. Use msgraph-sdk-javascript in node
  2. Fetch a large response, such as groups or applications
  3. The response does not resolve.

Expected behavior: The response should return successfully

Actual behavior: No response was resolved, as the highWaterMark was hit on the stream created during the clone()

Additional context

See node-fetch/node-fetch#142 for some example tests for this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions