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

0.54's fetch doesn't bring us html .text() #18635

Closed
goodhyun opened this issue Mar 31, 2018 · 3 comments
Closed

0.54's fetch doesn't bring us html .text() #18635

goodhyun opened this issue Mar 31, 2018 · 3 comments
Labels
Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. 🌐Networking Related to a networking API. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@goodhyun
Copy link

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 6.11.4
Yarn: Not Found
npm: 3.10.10
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: ^0.54.4 => 0.54.4

Steps to Reproduce

let res = await fetch("some.domain/index.html")
let text = await res.text()  

in this case, if it's not json but a plain html fetch, those text will be undefined.
In res, there is no _bodyText, it only has _bodyInit and _bodyBlob, which is understandable considering 0.54's change around fetch/Blob, but fetch's .text() doesn't seem to be working like previous versions.

Not sure whether this is related to #18547 or #18500

Expected Behavior

text should be populated with the HTML text.

Actual Behavior

undefined

0.53.3 is working like expected.

@react-native-bot react-native-bot added the 🌐Networking Related to a networking API. label Mar 31, 2018
@elicwhite elicwhite added the Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. label Mar 31, 2018
@Minishlink
Copy link
Contributor

Had this issue today on iOS only: root cause was that the encoding was wrong on the file. Android parsed it without problem but iOS not. Check your file's encoding ;)

@stale
Copy link

stale bot commented Oct 31, 2018

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 "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 31, 2018
@stale
Copy link

stale bot commented Nov 7, 2018

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.

@stale stale bot closed this as completed Nov 7, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Nov 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. 🌐Networking Related to a networking API. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

4 participants