You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reacted by Kumar Aditya Mohta, wuxiaoshi888, Hassan Siddique, Ly Seiha, Barak, André Sungyoub Song, Jim Berlage, Artur Zahorskyi, Guus Goossens, Mahmonir Bakhtiyari and 31 more
When the attribute is set to "false", platform components (for example, HTTP and FTP stacks, DownloadManager, and MediaPlayer) will refuse the app's requests to use cleartext traffic. Third-party libraries are strongly encouraged to honor this setting as well. The key reason for avoiding cleartext traffic is the lack of confidentiality, authenticity, and protections against tampering; a network attacker can eavesdrop on transmitted data and also modify it without being detected.
Reacted by Suhil Mohammad and Mohammad Reza Vasebi
Reacted by Mohsan Riaz, 亢奋猫, liuyi2614, Cristian Canales, Temp, Harshit Agrawal, Jim Berlage, Artur Zahorskyi, Mahmonir Bakhtiyari, Manish Kumar and 73 more
Reacted by Célio Garcia, iAmir, Amal_perambra, haianh230797, Jose Corrales Nuñez, Denzel, Juan Lagos, huqi, vishal131990 and Dzaky Badawi
When the attribute is set to "false", platform components (for example, HTTP and FTP stacks, DownloadManager, and MediaPlayer) will refuse the app's requests to use cleartext traffic. Third-party libraries are strongly encouraged to honor this setting as well. The key reason for avoiding cleartext traffic is the lack of confidentiality, authenticity, and protections against tampering; a network attacker can eavesdrop on transmitted data and also modify it without being detected.
I have tried it already. This is used when you are making request to a http server, but my server is running on https. It was running perfectly before upgrading to 0.62.
Something is wrong.
Reacted by Aaron Davida, Ahmed Abumostafa, Jason Safaiyeh, Mohsan Riaz, Célio Garcia, Artur Zahorskyi, Luciano J Guerra, Oleksandr Leskiv, pedrogarciyalopez, Muhammed Teuvazhukov and 7 more
Reacted by Evgenii Kireev, saroj kumar, DEVRocks, renzisafianohd and sumitagarwal31
All other requests are working perfectly. Only file uploads are not working anymore.
Reacted by Maurício Carlezzo, Aaron Davida, Ahmed Abumostafa, Mateusz Rostkowski, wuxiaoshi888, Krishan Kumar Mourya, Gustavo Rozolin da Silva, ekoooo, Felippe Lima, wangxy and 61 more
Reacted by Zanyar Jalal, Youssef Ait bamouh, saroj kumar, DEVRocks and Vinod
All other requests are working perfectly. Only file uploads are not working anymore.
I faced too many issues when I tried upgrading to 0.62 even though I created a new app and moved my code into it. I rolled back to 0.61.5 till it gets stable :/
Reacted by Matheus Arthus, Krishan Kumar Mourya, Barak, Nikita Zhigamovsky and Imam Robani
I faced same issue, it happens in Android, but works well in IOS.
I guess this issue about Flipper Network.
For while, I commented initializeFlipper(this, getReactNativeHost().getReactInstanceManager())
in this file /android/app/src/main/java/com/{your_project}/MainApplication.java
Reacted by trglairnarra, William Gonçalves, Hari Antara, giladtrainlit, KrunalXpress, montecarlo0704, RaviDhakad, jbustarviejo, vudinhminh, Nakib Momin and 99 more
Reacted by Artur Zahorskyi, JayeshPatil-Dev, kuldeepworkid, runm717123, Yasir S., Rishabh02, Romin Halltari, encan, Amal_perambra, Yash Shah and 21 more
Reacted by Muhammad Usman, Duc Pham , Shane Tran, Manish Kumar, Rohitrohitpanwar, Vipul Chasta, Yusril Sapta Wardhana, Gaurav Rana, Mohammad Heidari, haoduynguyen and 15 more
Reacted by RaviDhakad, Muhammad Usman, Duc Pham , biggfish, Shane Tran, CodeMobiles, Kevin, Manish Kumar, Vipul Chasta, Gaurav Rana and 21 more
Reacted by RaviDhakad, André Sungyoub Song, FlowOcean, Nikita Zhigamovsky, Romin Halltari, Yash Shah and Niravkumar Bhesaniya
Reacted by RaviDhakad, Muhammad Usman, Roman, Duc Pham , Andranik Akopkekhvyan, Dennys José Márquez Reyes, Manish Kumar, DevAny, Arthur Toledo, Vipul Chasta and 31 more
Reacted by Duc Pham , Karthick, biggfish, Shane Tran, Manish Kumar, John Fidel, Vipul Chasta, Srinivasa H D, Gaurav Rana, Mohammad Heidari and 27 more
Reacted by haoduynguyen, Khalil HAMANI, Eventgard, Nikita Zhigamovsky, zerophilip, Hasnain Ali, Arthur, Juan Lagos, Nathan (navi), FirmJack and 2 more
This issue occurs also on my end, and guess what it is only occurring in debug mode. Tried building in internalRelease and it works fine. I guess it is because of the auto/fast reload in debug mode which applies some flipper communication which seems to be related in this issue..
Another issue here is that there is no error in android logcat.. I've also spent some days researching how to fix this issue still no luck.
Whoever is still struggling with this issue. it's happening because of Flipper network plugin.
I disabled it and things work just fine.
My workaround to make this work is commenting out line number 43
38 NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
39 NetworkingModule.setCustomClientBuilder(
40 new NetworkingModule.CustomClientBuilder() {
41 @Override
42 public void apply(OkHttpClient.Builder builder) {
43 // builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
44 }
45 });
46 client.addPlugin(networkFlipperPlugin);
in this file android/app/src/debug/java/com/**/ReactNativeFlipper.java
Reacted by Krishan Kumar Mourya, Kailash Kumar, Ankit Singh, Nabila K. Lilipaly, montecarlo0704, Saravanamuthu Aka CF Mitrah, Eeli Hakkarainen, vudinhminh, Eric Weeb, Kushl Agaarwal and 113 more
Reacted by Nikita Zhigamovsky, Jeffrey Torres, Amal_perambra, ydhnwb, Ismdcf, Osama Zulfiqar Ali, Dadan Hamdani, Serhat Özkahya, Ebenezer Azumah, sumitagarwal31 and 8 more
Reacted by Nabila K. Lilipaly, montecarlo0704, Eeli Hakkarainen, Kushl Agaarwal, mauld_kikaitech, Kevin, Mahmonir Bakhtiyari, Manish Kumar, Fatih , Veera and 16 more
Reacted by Nabila K. Lilipaly, montecarlo0704, Eeli Hakkarainen, Kushl Agaarwal, mauld_kikaitech, Hartani Yassir, Kevin, Oluwafemi Obajuluwa, Mahmonir Bakhtiyari, Manish Kumar and 29 more
Reacted by vaibhavcodewing
Reacted by Nabila K. Lilipaly, montecarlo0704, Pedro Ramos, Priyanshu Raj, Barak, Eeli Hakkarainen, Eric Weeb, Kushl Agaarwal, BrankoKrsmanovic, mauld_kikaitech and 41 more
Reacted by Nabila K. Lilipaly, montecarlo0704, Kushl Agaarwal, mauld_kikaitech, Invati-tech, Kevin, Welington Fidelis Sousa, mardoyanx, Oluwafemi Obajuluwa, Mahmonir Bakhtiyari and 19 more
Reacted by Josiah Arkson, san, Juan Lagos, ffastym, Niravkumar Bhesaniya and Chris Frewin
Thanks for the issue @abumostafa. Does this occur in a fresh React Native template out of the box? If so this should be looked at otherwise feel free to close it.
Can you guys please help me, I'm struggling with this, I tried all the way, but my code still sends [object Object] to server?
This was worked well in past at 0.59 .
Please help me
Can you guys please help me, I'm struggling with this, I tried all the way, but my code still sends [object Object] to server?
This was worked well in past at 0.59 .
Please help me
Check first if your upload works with very small files ( for example, instead of uploading a video, upload a gif ). In my case, any file over 1 MB would return "TypeError: Network request failed".
After many attemps, it turns out that the problem was caused by me using localtunnel, which limited my maximum file size.
Two weeks. Two weeks of scratching my head why file uploads were working absolutely fine in iOS, but wouldn't work in Android. Commenting a single line in a dev-only relevant file makes it work.
Two weeks. Two weeks of scratching my head why file uploads were working absolutely fine in Android, but wouldn't work in iOS. Commenting a single line in a dev-only relevant file makes it work.
Incredible.
I love my life.
@princefishthrower - @abumostafa solution works for Android, how did you manage to resolve it for iOS? We are also facing this issue in iOS
@juggernauts In my case the file upload endpoint (sendbird chat profile upload if it helps) was working on iOS well before I did this "fix". To help further, I use the react-native-image-crop-picker with iOS and send the following fields in my 'file':
Also, I had a huge typo in my comment, this fixed file uploads for Android - iOS was working the whole time. Sorry for any confusion that may have caused! The good news is if you have Android working, iOS should be easier - at least that's how it was in my case.
Thanks for the issue @abumostafa. Does this occur in a fresh React Native template out of the box? If so this should be looked at otherwise feel free to close it.
Activity
carlezzo commentedon Apr 6, 2020
Same problem here!
adityamohta commentedon Apr 6, 2020
Same problem !! I am stuck on this issue from last 2 days! Searched almost everything..
HaidarZ commentedon Apr 6, 2020
You need to add this
uesCleartextTraffic="true"to the AndroidManifest.xml file found inside the dir android/app/src/main/AndroidManifest.xmlAccording to docs
adityamohta commentedon Apr 6, 2020
I have tried it already. This is used when you are making request to a http server, but my server is running on https. It was running perfectly before upgrading to 0.62.
Something is wrong.
adityamohta commentedon Apr 6, 2020
All other requests are working perfectly. Only file uploads are not working anymore.
HaidarZ commentedon Apr 6, 2020
I faced too many issues when I tried upgrading to 0.62 even though I created a new app and moved my code into it. I rolled back to 0.61.5 till it gets stable :/
MateuszRostkowski commentedon Apr 7, 2020
I am facing the same issue, for RN 0.62.0 and 0.62.1 throws this error:
Network request filed.All requests work except for the image post
adityamohta commentedon Apr 7, 2020
I moved back to 0.61.5 :( No other choice left for now. If anyone needs help in downgrading to 0.61.5, refer to react-native-upgrade-helper.
preko96 commentedon Apr 7, 2020
Same happens here!
alfianwahid commentedon Apr 7, 2020
I faced same issue, it happens in Android, but works well in IOS.
I guess this issue about Flipper Network.
For while, I commented
initializeFlipper(this, getReactNativeHost().getReactInstanceManager())in this file
/android/app/src/main/java/com/{your_project}/MainApplication.javatrglairnarra commentedon Apr 8, 2020
This issue occurs also on my end, and guess what it is only occurring in debug mode. Tried building in internalRelease and it works fine. I guess it is because of the auto/fast reload in debug mode which applies some flipper communication which seems to be related in this issue..
Another issue here is that there is no error in android logcat.. I've also spent some days researching how to fix this issue still no luck.
abumostafa commentedon Apr 8, 2020
Whoever is still struggling with this issue. it's happening because of Flipper network plugin.
I disabled it and things work just fine.
My workaround to make this work is commenting out line number 43
in this file
android/app/src/debug/java/com/**/ReactNativeFlipper.javasafaiyeh commentedon Apr 8, 2020
Thanks for the issue @abumostafa. Does this occur in a fresh React Native template out of the box? If so this should be looked at otherwise feel free to close it.
303 remaining items
tohshine commentedon Jul 16, 2021
same issue I have tried all the solutions but doesn't work
"react-native": "0.64.1",
while the file is part of the append throws a network error
` let body = new FormData()
body.append('location', 'GOOGLE_DRIVE')
body.append('docType', 'MEANS_OF_IDENTIFICATION')
body.append('file', { ...attachment.file })
const data = await axios.post('/file/api/v1/storage/folder/file', body, config, {
onUploadProgress: (progress) => {
const { loaded, total } = progress;
const percentagProgress = Math.floor((loaded / total) * 100);
itajenglish commentedon Jul 16, 2021
Can you guys update your comments with the code you're trying to execute.
thanhhai16 commentedon Jul 16, 2021
Can you guys please help me, I'm struggling with this, I tried all the way, but my code still sends [object Object] to server?
This was worked well in past at 0.59 .
Please help me
itajenglish commentedon Jul 16, 2021
What file is this logic in? Is it in the file with the component that's selecting the image from the file system or a separate file? @tohshine
itajenglish commentedon Jul 16, 2021
Update the comment with your RN code @thanhhai16
ionbaratol commentedon Jul 21, 2021
react native 0.64
✅ adding the content type in headers solved the issue for me.
FratilaRuxandra commentedon Aug 8, 2021
Check first if your upload works with very small files ( for example, instead of uploading a video, upload a gif ). In my case, any file over 1 MB would return "TypeError: Network request failed".
After many attemps, it turns out that the problem was caused by me using localtunnel, which limited my maximum file size.
Qazafi-Dev commentedon Sep 1, 2021
i getting this in RN 0.64 , while i individually upload image or video but when i upload with image and video text it works fine
princefishthrower commentedon Sep 13, 2021
@abumostafa - legend.
Two weeks. Two weeks of scratching my head why file uploads were working absolutely fine in iOS, but wouldn't work in Android. Commenting a single line in a dev-only relevant file makes it work.
Incredible.
I love my life.
skywalker2013 commentedon Sep 16, 2021
i face same issue in RN 0.65.1. why close the issue? have any solution?
juggernauts commentedon Sep 29, 2021
@princefishthrower - @abumostafa solution works for Android, how did you manage to resolve it for iOS? We are also facing this issue in iOS
princefishthrower commentedon Sep 30, 2021
@juggernauts In my case the file upload endpoint (sendbird chat profile upload if it helps) was working on iOS well before I did this "fix". To help further, I use the
react-native-image-crop-pickerwith iOS and send the following fields in my 'file':Also, I had a huge typo in my comment, this fixed file uploads for Android - iOS was working the whole time. Sorry for any confusion that may have caused! The good news is if you have Android working, iOS should be easier - at least that's how it was in my case.
Commaando commentedon Oct 1, 2021
Every Time.even in rn 0.65