Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch adapter: Streaming request bodies is not supported [react-native] #6375

Closed
turkonjavladimir opened this issue Apr 30, 2024 · 0 comments · Fixed by #6377
Closed

fetch adapter: Streaming request bodies is not supported [react-native] #6375

turkonjavladimir opened this issue Apr 30, 2024 · 0 comments · Fixed by #6377

Comments

@turkonjavladimir
Copy link

turkonjavladimir commented Apr 30, 2024

Describe the bug

Hello,

First of all, many thanks to @DigitalBrainJS for adding the fetch adapter!

There's one thing that I noticed while trying the latest release v1.7.0-beta.0, It seems to be breaking my react native app. I've added the following packages and followed the instructions to add the required polyfills

https://github.com/react-native-community/fetch?tab=readme-ov-file
https://github.com/acostalima/react-native-polyfill-globals

Unfortunately, that didn't seem to help. Not sure if there's a workaround or a way to avoid using ReadableStreamer at least for RN since it doesn't seem to be supported natively from my understanding. As pointed out under the Motivation section:

ReadableStream is not supported and, by extension, Response.body is not implemented. Related discussions:
facebook/react-native#27741
facebook/react-native#12912
JakeChampion/fetch#198
JakeChampion/fetch#746

For reference, here's a screenshot of the error running on an iOS simulator on iOS 17.0

Simulator Screenshot - iPhone 15 Pro - 2024-04-30 at 14 33 30

To Reproduce

Spin up a new RN project

yarn add axios@next

Install the required polyfills from:

https://github.com/react-native-community/fetch?tab=readme-ov-file
https://github.com/acostalima/react-native-polyfill-globals

Run the app

Code snippet

No response

Expected behavior

No response

Axios Version

1.7.0-beta.0

Adapter Version

fetch

Browser

No response

Browser Version

No response

Node.js Version

No response

OS

iOS 17.0

Additional Library Versions

React Native 0.73.6
React 18.2.0
axios 1.7.0-beta.0

Additional context/Screenshots

No response

@turkonjavladimir turkonjavladimir changed the title fetch adapter Streaming request bodies is not supported - react native fetch adapter: Streaming request bodies is not supported [react-native] Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant