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

[android] fetch with method:HEAD always fails #19435

Closed
2 tasks done
treemore opened this issue May 24, 2018 · 2 comments
Closed
2 tasks done

[android] fetch with method:HEAD always fails #19435

treemore opened this issue May 24, 2018 · 2 comments
Labels
🌐Networking Related to a networking API. Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@treemore
Copy link

treemore commented May 24, 2018

only happen in android phone
when i use a android phone. and the android version is android 7.0
iphone is right.

 url = "http://www.google.com"
 fetch(url, {
// when set   method: "GET",   is ok
            method: "HEAD",
        }).catch(e=>console.error(e))

always throw the exception "Network request failed"

Environment

Environment:
OS: macOS High Sierra 10.13.4
Node: 8.9.1
Yarn: 0.27.5
npm: 6.0.1
Watchman: 4.7.0
Xcode: Xcode 9.3.1 Build version 9E501
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: ^0.55.3 => 0.55.3

Steps to Reproduce

just exec the code .

 url = "http://www.google.com"
 fetch(url, {
            method: "HEAD",
        }).catch(e=>console.error(e))

Expected Behavior

not throw catch

Actual Behavior

always throw the exception and said Network request failed

@react-native-bot react-native-bot added 🌐Networking Related to a networking API. Platform: Android Android applications. labels May 24, 2018
@hramos
Copy link
Contributor

hramos commented May 24, 2018

This is already fixed in master (f5207ba) but it has not yet made it into a stable release. You may build from source to take advantage of the fix until then.

Duplicate of #18223

@hramos hramos closed this as completed May 24, 2018
@hramos hramos added the Resolution: Fixed A PR that fixes this issue has been merged. label May 24, 2018
@hramos
Copy link
Contributor

hramos commented May 24, 2018

Actually, the fix for #18223 was for iOS. There's still an open question as to whether this is an issue on Android or not.

Duplicate of #18440

@hramos hramos removed the Resolution: Fixed A PR that fixes this issue has been merged. label May 24, 2018
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label May 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🌐Networking Related to a networking API. Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants