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

Sudden TypeError: Network request failed. #31526

Closed
hi337 opened this issue May 14, 2021 · 1 comment
Closed

Sudden TypeError: Network request failed. #31526

hi337 opened this issue May 14, 2021 · 1 comment
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.

Comments

@hi337
Copy link

hi337 commented May 14, 2021

Description

I was going to build my react native application on windows for android, just as i usually do. The app builds fine, but i quickly notice that all network requests, no matter the method, were failing. I tried many everything i could think of. I built on different devices, made sure the IP address was correct, made sure clear text traffic was enabled, updated packages. But nothing worked.

This problem came all of a sudden and I've never had any problems networking before. But i noticed that the issue was not with the server because the request wouldn't even be launched. The API I'm using is fetch btw.

React Native version:

My react native version is 0.63.4. My machine is running Windows 10. I ran the application on android 8 and 10 devices with the same error.

System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
Memory: 9.76 GB / 15.79 GB
Binaries:
Node: 15.5.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 7.6.3 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3
System Images: android-27 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom, android-29 | Google Play Intel x86 Atom
Android NDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions: 10.0.17763.0, 10.0.18362.0
IDEs:
Android Studio: Version 4.1.0.0 AI-201.8743.12.41.7199119
Visual Studio: 16.8.30907.101 (Visual Studio Community 2019)
Languages:
Java: 1.8.0_275 - C:\Program Files\OpenJDK\openjdk-8u275-b01\bin\javac.EXE
Python: 3.8.6 - C:\Users\rateb\AppData\Local\Programs\Python\Python38\python.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.4 => 0.63.4
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Steps To Reproduce

I will continue to fiddle around and and work on steps to reproduce this error. But as mentioned earlier, these errors came from nowhere and it was working just fine yesterday.

Expected Results

N/A

Please help. I am willing to give code examples and more system information. Thanks in advance.

@hi337
Copy link
Author

hi337 commented May 15, 2021

never mind. I fixed this error by making a new react native application and moving all my app folder from the old projects to the new one, replacing the app.js folder in the new app with the old one, and installing deps. I guess the errors came from not updating packages the right way.

@hi337 hi337 closed this as completed May 15, 2021
@facebook facebook locked as resolved and limited conversation to collaborators May 15, 2022
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label May 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants