-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Unable to upload image file on first try getting TypeError: Network Request Failed #32966
Comments
Maybe you can try to close your browser devtool , somtimes it will block the upload request |
Thanks but its also occurring on release builds |
This problem also occurs on a fresh clean react native project. The dependencies used in the new project were
The code used was:
The error shown in the logs were Does anyone know why the stream closes immediately on the first try? |
"react-native": "0.65.1", Having the same problem as you ,did you solve it? |
No, I'm still having the same issue unfortunately. |
I solve this problem by using rn-fetch-blob. |
add |
Hello, I have exactly the same problem with Thanks :) |
@GaylordP Hey, we're experiencing this same issue. Have you found a way to resolve this yet? |
Hi, |
@Arek1020 In my case, downgrading Axios worked. I downgraded to 0.24.0 |
Same issue ! PLEASE HELP |
This worked for me on EXPO SDK 49: "plugins": [
[
"expo-build-properties",
{
"android": {
"usesCleartextTraffic": true
}
}
]
] |
not working for cli |
any solution so far?? |
This one worked for me: #32966 (comment) |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
i have the same issue in IOS and Android both! :) |
So basically one takeaway is pass the image as base64 and json.stringify it to pass it to the endpoint and it worked for me
|
Description
This issue only occurs on Android devices after updating React Native from v0.63.4 to v0.65.1. For some strange reason, the first attempt at uploading a image file will immediately fail with the error TypeError: Network Request Failed.
If it does fail on the first try, the second or third will succeed. Does anyone know why does this happen or how I can investigate this further? Sometimes this issue does not even happen at all.
Version
0.65.1
Output of
npx react-native info
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/react-native-info - Not found
npm ERR! 404
npm ERR! 404 'react-native-info@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ws8149\AppData\Roaming\npm-cache_logs\2022-01-25T12_34_29_576Z-debug.log
Install for [ 'react-native-info@latest' ] failed with code 1
Steps to reproduce
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: