-
-
Notifications
You must be signed in to change notification settings - Fork 436
Please release a minor version which replaces every occurrence of 'localhost' with '127.0.0.1' #486
Comments
Where are you changing The only other place I see If you could share a minimal Sapper project that demonstrates this, that would be appreciated - because I don't think we'll want to make this change without actually seeing what's going on. |
Go to Here is my fully customized setup: The problem happens on my Windows 10 Home Edition |
Any news on this @Conduitry, @richharris? |
Sorry, I missed that you had included a repo before. I just tried this out locally, and I'm not seeing anything wrong. (Node 10, Windows 10 Pro.) As I said above, I was wary about making this change without some maintainer at least making an effort to reproduce this. What specific error are you getting? As I said above, as far as I can tell, the only |
We should read from Doesn't need minor, could be a patch |
@lukeed I'm not sure what you mean exactly, but what you're saying seems more relevant to #485 I think. I believe the only places that Sapper seems to hardcode localhost are - 1) in output messages 2) during |
Sure – I haven't looked into this carefully yet, but this one may be problematic when dealing with VMs. |
Ah I guess my brain parsed that one as console output to the user for some reason because it was in But either way, this doesn't seem related to whatever issue is happening in this ticket. I really wish I knew what exactly the error message was. |
Well, the exact error message is:
`Server is not listening on port 3000`
In some cases, I keep modifying files and after save I get the server
listening on 127.0.0.1:3000, and after that, get the error again... It
happens to me randomly.
Another observation is that... its also happening to me on Linux (0_o)
Analizing the issue, I notice that the only difference of this repo with
the original sapper-template, is that it sets up passport, some fixtures,
and connects to the database.
Therefore, this setup delays the server startup longer, potentially making
port-authority timeout and firing the error.
Maybe in your machines you dont noticed it either because you didnt had
mongo running so the app can't connect, or your machines are fast enough
to start the server before port-authority timesout.
Is worth noticing that my machine is old enough for this to happen.
HP, AMD A8, manufactured in 2012.
What do yoy think about this theory?
|
Your repo name is called 'server crash' - have you experienced any actual failures besides this message? I see occasional issues where I'm told the server is not listening on a port, while everything is fine. I'm thinking there's a race condition somewhere. We should probably get to the bottom of this eventually, but if that's all you're seeing, I don't think we want to just change a bunch of |
Well, when that error happens, I have to manually refresh the page to see
changes because hmr breaks and the server... well, remains in the version
when it hangs, until it listen again to port 3000.
I managed to modify the dist files and somewhere there is a try catch that
says the error.
It is possible to implement a retry mechanism? Try to reconnect again with
incremental time?
I have used the async library for similar use cases, it has this
async.retry fn which is very useful.
…On Sat, Oct 27, 2018, 10:56 PM Conduitry ***@***.***> wrote:
Your repo name is called 'server crash' - have you experienced any actual
failures besides this message? I see occasional issues where I'm told the
server is not listening on a port, while everything is fine. I'm thinking
there's a race condition somewhere. We should probably get to the bottom of
this eventually, but if that's all you're seeing, I don't think we want to
just change a bunch of localhosts to 127.0.0.1s, which is unlikely to
truly resolve it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#486 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMDUAmsEv9k6wV5RyeIoFZPdX-YXR0prks5upRzFgaJpZM4XxPcO>
.
|
Line 258: |
No comments on this? Its a simple fix. Is this still maintained? |
If by "still maintained" you mean "the maintainers will make arbitrary changes that people ask them to, even if they don't see the benefits of them", then no the project is not maintained. Is this still about replacing 'localhost' with '127.0.0.1'? That still seems to have no bearing on any actual problems. Is this now about retrying the |
By "still maintained" I meant the whole project since the last release was about a month ago and issues are piling up. I'm trying to probe my co-workers that this stack is better than anything React related, and I'm just worried. I've tried increasing the timeout, it sooner or later fails. I spent whole days finding a solution and the I have seen with my local implementation up to 14 retries until it correctly connects. |
I don't know why, but having sapper in its source code
localhost
gives me trouble with my (custom) setup, specifically, the server can't start (it happens only on Windows, only on my custom project setup, the default sapper template runs fine 0_o).Right now, If, on my project, I go to
node_modules/sapper
folder and replace every occurrence with '127.0.0.1' the problem gets solved.It will be very helpful to me (and would harm no one) if you could release a minor version with these changes @Rich-Harris .
The text was updated successfully, but these errors were encountered: