-
Notifications
You must be signed in to change notification settings - Fork 576
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
Error: Failed to load 'http://localhost:8082/create_session' #284
Comments
Another user hit this here #276. Are you also on android? If so does running |
Hi @alazier I'm using iOS on mac. Is there some other thing I can do? |
There is definitely an issue at the moment running debug mode on the device. We have an rpc server running on the device/simultor to serve api calls when in debug mode - when running on the device chrome is trying to hit localhost rather than the server on the device which fails. You may be able to hardcode your devices IP address to work around the issue. You can change this by editing the |
I just tried to change DEVICE_HOST = '<IP-ADDRESS>:8081';
// and
DEVICE_HOST = '<IP-ADDRESS>:8082'; but I still get the same error Do I need to change it somewhere else as well? |
Not sure as I haven't had the chance to try this out yet. Will give it a try later today. |
Thanks @alazier and also thanks for bringing Realm in react-native!:) |
I was able to get chrome debugging working by changing the ip address as described above as well as following the instructions for getting chrome debugging working on device from the react native docs. The steps I took:
If you continue to get the same error most likely the device IP address you are using is incorrect. |
Sorry for the delay guys, will try this as soon as I got time, hopefully later today. |
Would this be the cause for the first error here? -> #303 |
I am also getting this error with iOS simulator. React Native 0.21. |
I'm also getting this in the iOS simulator, React Native 0.20.0. I am using the Chrome Debugger. The packager is listening on port 8081. |
I had this error on iOS device and simulator with RN. I found out that I accidentally drag RealmJS.framework to the Embedded Binaries section but not the RealmReact.framework. Fixed this then the error was gone. |
@leijing7 Thanks! You saved my time! @ Realm developers: thank you for your work! |
double checked and definitely got RealmReact.framework in the embedded binaries. Everything works fine when chrome debugging isn't enabled. But as soon as it is -- I get this issue. |
@alexcurtis is this only on device for you, or in simulator as well? |
@appden I've only tested on the simulator. React Native 0.21. I have the packager running on a non-standard port (9081) |
I've had issues with debugging and Realm for a long time. It used to work in the emulator but now I can't debug at all. Of course, that is a huge dealbreaker as debugging is essential. Is there any chance this will get fixed? Because otherwise, I'm afraid I'll have to replace Realm with another database. |
I hit this today runing iOS simulator on Mac. POST http://localhost:8082/call_method net::ERR_EMPTY_RESPONSE |
For me (I am using Expo) the actual reason that this is occurring is that it is being blocked by CORS because the origins don't match To bypass this problem on the iOS simulator, I am using this workaround to turn off CORS in Chrome:
Hope that helps anyone stuck on this same issue. @appden
As you can see it requesting port 8082 in the XMLHttpRequest, but the server is supposed to be running on port 8081 but is actually on port 8082. The above snippet is a bit confusing, I know :-) Full request headers from Chrome for create_session:
|
Why is this issue closed? It seems like many are still encountering this problem. I run into this when starting up an app with remote debugging on a device through Bluetooth State Restoration, which makes it impossible to debug Bluetooth functionality in our case. |
I am developing with react-native and I've had this problem for a while |
I am also facing this problem in my ios simulator and can not find solution anywhere. Can someone help me please? |
Please file a new issue rather than commenting on an issue that's been closed for 18 months. In your new issue, be sure to include all of the information that's requested in the new issue template. |
When running the application on dev mode from my phone I get the following error
If I run the same code on the simulator it works fine.
The text was updated successfully, but these errors were encountered: