-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
App hangs on axios request to local server, but works when "Debug JS Remotely" #21899
Comments
I have the same issue on my project while using the 16.7.0-alpha.2 version of React. @fedecryto did you manage to solve the problem? |
Hi @Cytren, I managed to solve it, but unfortunately was unintended. As soon as I cleared up a couple of warnings I had, the issue was magically gone. I couldn't find a way to reproduce the problem again.... and the warnings I cleared were independent of axios... so no clue what happened there. Probably one of those warnings was messing up other things... Sorry but I don't have a clear answer for you :s |
I have the same issue.Can anyone suggest me how to resolve the issue. |
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 a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
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. |
Environment
React Native Environment Info:
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 30.03 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.12.0 - /usr/local/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS12.0, watchOS 5.0
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5014246
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728
react-native: 0.57.3 => 0.57.3
npmGlobalPackages:
react-native-cli: 2.0.1
Description
Hi!
I'm having problems to perform any http request using axios to a local server:
axios.post(url, data)
and for url I tried:
url = "http://localhost:3000/authenticate"
url = "http://127.0.0.1:3000/authenticate"
url = "http://192.168.1.10:3000/authenticate" //server ip address
url = "http://10.0.2.2:3000/authenticate" //emulator address
and NONE of them worked...
The funny thing (and I can't understand why) is that as soon as "Debug JS Remotely" the following url worked perfectly:
url = "http://10.0.2.2:3000/authenticate"
So, how should it be my set up to make this work without debugging js remotely??
Reproducible Demo
The text was updated successfully, but these errors were encountered: