-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
nonLocal took too long to respond #59
Comments
Correct, it just logs as "errors" both regular log messages, and actual errors. From what you say you see in the logs, it seems the server has started fine... probably the firewall on your machine blocks the connection? |
Doesn't seem to be a firewall issue. I've turned it off on my machine and it still won't connect. I tried connecting using my phone on the network but no luck there either. I turned on all error logging flags to see if I could find any hint as to what's happening. This was what I found in
Only thing that pops out is the "unknown config-key" error. I tried to take a look at the lighttpd1.4 file where this error was logged but it's not immediately obvious to me as to what's actually happening there. |
Hmm… looks like there is smith messed up with logging config… though it should not cause troubles you experience. For me it looks like the server is running fine, but for some reason your requests do not arrive to the server, and just do get lost somewhere 🤷♂️ I’ll double check next week if non-local mode works for me in the example app. |
Actually, it probably just starts on a wrong network interface, try to use ‘hostname’ argument to explicitly specify the IP of device on your local network. |
Adding the hostname did not solve it. I deleted my app and reinstalled it through Android Studio and now it seems to be working. Maybe something with hot reloading the app over and over again broke something? I try to hot reload the app while developing. If the library yells at me that there's already a server running after hot reloading, I quit out of metro and restart. I think the hot reload bug that I was facing is referenced in this issue - but it's not consistent for me. When I reload metro, I'm able to start a new server again. The fix resulting from uninstalling the app leads me to believe that it could have been caused by the server leaking someway, somehow - but I have no idea how I'll keep an eye out to see if I can spot any way to reproduce this consistently if I run into it again. |
@birdofpreyru Regarding #56, why not use a mutex to ensure that only one thread is starting and stopping lighttpd before releasing the mutex for another thread to do so? |
Hi @gstrauss , thanks for passing-by to comment on this! :) Re. Re. #56 — It was my mistake — I did a similar thing in JS layer from the very beginning, but I haven't thought about advanced scenarios where React Native can re-load my JS module, destroying my synchronization of methods on JS side. Thus, it indeed needed synchronization of threads in the native layer, and presumably I've nailed it now. |
@danielbogomazov Regarding your original complain, I finally tried to reproduce your scenario with the Example app, and it worked for me without any issues:
Thus, I believe no issue here, I'll close this thread later. P.S.: There is also a related open issue #21, saying that we need to add into the library some features to make it easier to list all connected network interface, or automatically select the interface needed for a particular purpose. The |
slightly off-topic: Re:
|
Thanks for confirming @gstrauss 👍 |
I've copy and pasted your example
App.tsx
into my project to start out with. It seems to be working as expected inside theWebView
in the app running locally on my Android device.The issue I'm having is trying to connect to the server from my desktop (same network). I've passed in
nonLocal: true
into the constructor to allow for non-local connections but whenever I try to connect to it, my desktop's web browser returns with aERR_CONNECTION_TIMED_OUT
page (which seems to imply that it's able to find the server but not able to establish a connection?).I've tried this with v0.8.0, v0.7.13, and v0.7.12 - none fix this issue.
The only error I get is from
lighttpd
(pulled from Android Studio):Looking at that line in the linked library, it doesn't seem like it's an actual error, just there for logging purposes (I think?).
Here's what I see in metro:
Opening the origin on my Desktop times out.
The text was updated successfully, but these errors were encountered: