Skip to content

Fetch doesn't support getReader #25910

Closed
Closed

Description

@binaryminutia0l

Trying to use getReader with React Native's fetch gives:

undefined is not an object (evaluating 'response.body.getReader')

React Native version:

  React Native Environment Info:
    System:
      OS: macOS 10.14.6
      CPU: (4) x64 Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz
      Memory: 207.95 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.13.0 - ~/.nvm/versions/node/v8.13.0/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.13.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
      Android SDK:
        API Levels: 23, 26, 27, 28
        Build Tools: 23.0.1, 25.0.0, 26.0.1, 26.0.3, 27.0.2, 27.0.3, 28.0.2, 28.0.3
        System Images: android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.3/10G8 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz => 0.59.8 
    npmGlobalPackages:
      react-native-cli: 2.0.1

Steps To Reproduce

const response = await fetch('https://foobar.com')
const reader = response.body.getReader()

Describe what you expected to happen:

Should be able to consume a reader from fetch

N.B. This is a duplicate of #12912, which was locked due to inactivity in 2017/2018

Activity

  1. bockc commented on Aug 9, 2019

    @bockc

    Probably the same issue than this one.
    #25701

  2. stale commented on Nov 7, 2019

    @stale

    Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

  3. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Nov 7, 2019
  4. Schwartz10 commented on Nov 12, 2019

    @Schwartz10

    @sfyfedotcom were you able to find a workaround?

    This issue still exists in "react-native": "0.61.4"

  5. removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Nov 12, 2019
  6. stale commented on Feb 10, 2020

    @stale

    Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

  7. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Feb 10, 2020
  8. stale commented on Feb 17, 2020

    @stale

    Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

  9. locked as resolved and limited conversation to collaborators on Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugStaleThere has been a lack of activity on this issue and it may be closed soon.🌐NetworkingRelated to a networking API.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions