-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Can't see homepage at localhost:4000 #1349
Comments
try |
120.0.0.1 works. Thanks @chrismccord for the lighting response. Do you have any clues why localhost doesn't work? Will check your irc. |
Awesome. I don't see how this is on our end, and I can't recreate locally so for now loopback address is a usable workaround. Hop on elixir-lang irc if you have any issues |
I just experienced this issue as well on chrome but was able to use localhost on firefox. |
This just recently happened to me, no other changes to the system. It occurred in the middle of running my Phoenix application. As a work around I've shifted to using lvh.me which maps to localhost and enables me to use subdomains. There's been at least a half dozen folks with a similar issue in Slack. Would be great to figure out what's behind this. Tough to see it as a system issue when it's impacting more and more users of a particular framework and language. Hard to believe we all made the same mistakes, independent of OS, while using Phoenix. |
Unfortunately given how arbitrary this seems to come up with no means to recreate it, and often reported as browser dependent, I wouldn't know where to begin. I also don't have time to chase down this particular rabbit hole. If someone wants to take a deep-dive that would be fantastic. |
I agree @chrismccord, that was a general statement. I've tried a handful of things I can't seem to make any headway. It's a perplexing problem but it does seem to be related in some way to Phoenix, Plug, Elixir, or Cowboy. Localhost works just fine for Ruby, Python, and Java applications. |
I had a similar issue and was able to continue using the same browser (Chrome) after clearing cache, cookies, etc., which made me think at the time it was a bad cookie or something tied to the domain name. I do a lot of other development on localhost so there could be all sorts being sent. I haven't had this happen again to confirm a better link. |
Probably something changed in /etc/hosts. Maybe add this back:
|
@zlu the |
I think it's something related with cowboy not phoenix framework. And it's something related Chrome browser. On Safari, it works. |
I wanted to add some info to this, as I ran into this issue. It seems that Chrome can connect, but will not render anything other than a totally empty page (view source shows no content). It worked without issue in Firefox and Safari. I meant to delete cookies one by one to see if a particular cookie was causing the problem, however I accidentally wiped them all out – which did solve the problem. Deleting the cookies stored at I also do Rails and Express development, so it's possible cookies set by one of those are interfering with something in the rendering stack. I'm super new to Phoenix dev, so I'm not sure where to look, but if I run into it again (and remember to delete cookies one by one), I'll add information here. |
Yes, Cowboy simply discards the request for large headers because allowing otherwise is a possible attack vector. So erasing cookies is the way to go. |
Sounds like it's likely just related to one of the cookies being large in that list – I had cookies for 10+ different Rails projects in there, and I bet one or two were pushing 500bytes. Generally sounds like this might be related to this issue. That being said, is there a way to adjust this number somehow (and what is the max size set to)? Seems like sometimes I'd want to be able to increase the number – plenty of sites have largish cookies, my browser is showing 5 on Amazon over 500bytes. |
I believe the default is 4k. See here: https://ninenines.eu/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#max_header_value_length You can change it by setting the following in your config.exs file (iirc):
|
The empty white page on |
Btw, this has been fixed in Plug v1.4 since it now warns on the terminal when this happens. |
It doesn't show anything when it's simply an existing cookie (without exceeding max length)? Micaels-MacBook-Pro:dinastywars mnussbaumer$ mix phoenix.server Nothing was being output when I was hitting |
@mnussbaumer what is your plug version? Also, Plug will just log something if the server returns 400. |
Ahh you're right, sorry @josevalim - I just assumed I would have the latest version because I installed everything phoenix/elixir/erlang yesterday . Thanks - it reads plug 1.3.5 - I'm completely new to phoenix btw |
No problem and welcome! |
Thanks, and for your work too - it looks great, sounds great and I will try to use it moving on from Rails - Besides the issues on github (since my knowledge is a bit more superficial) is there any way to contribute? Or mailing list? There are also some broken links, like http://phoenixframework.org/docs/understanding-plug and /community |
The issues on github are the main way. For the guides, reach the phoenix_guides repo. The guides are currently being reworked for v1.3 so, if I assume they will need help with sanity checking everything as soon as it goes live. |
Hi, I am facing the same error. I tried to open localhost:4000 and 127.0.0.1:4000 on Chrome and Microsoft Edge on Windows. But still I cannot open the homepage. Could anyone help me with it? |
@kkkkeeee can you provide some more info? Do you get a blank page? Or an error? What shows up on iex? And on the javascript console? |
HI,
What is shown on the console is :
C:\Users\zhaikeke\Documents\LeetCode\Elixir\hello>mix phx.server
[info] Running HelloWeb.Endpoint with Cowboy using http://0.0.0.0:4000
13:48:07 - info: compiled 6 files into 2 files, copied 3 in 1.1 sec
For the localhost webpage, I got:
This page isn’t working
*localhost* sent an invalid response.
ERR_INVALID_HTTP_RESPONSE
That's all I have. I didn't open any javascript console.
Yours Sincerely,
Keke
…On Wed, Nov 8, 2017 at 11:25 AM, Micael Nussbaumer ***@***.*** > wrote:
@kkkkeeee <https://github.com/kkkkeeee> can you provide some more info?
Do you get a blank page? Or an error? What shows up on iex? And on the
javascript console?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1349 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APa15fNv13VCgMfrDGzWNsdeJ3T3SC72ks5s0dYRgaJpZM4Ggc9g>
.
|
It's usually better to ask questions like this on the forum for quicker responses. But what is your git address so we can try out what you are trying so we can see the issue? |
I worked through a VPN tunnel. Disconnected it - and everything became OK. |
Heh, sounds like the VPN is redirecting local connections, that is... very odd... ^.^; |
when I looked at the page on F12 (Chrome), I saw in the tab "Application" tags: Created on Wed, Jan 16, 2018 18:00:59 GMT on us02.vpn99.net (squid / 3.5.20) which led me to this idea. vpn99.net is the tunnel through which I work. p.s. sorry for my English :-(( |
Done |
review here http://localhost:4000 |
I can't browse to homepage. I followed Phoenix Up & Running instructions with no errors so far. However, when I browse to the homepage port 4000, nothing show up, like no connection at all. I tried with different ports (ref: #962) but no luck.
Chrome: This webpage is not available ERR_CONNECTION_REFUSED
Firefox: Unable to connect - Firefox can't establish a connection to the server at localhost:4000..
All commands run without errors
The text was updated successfully, but these errors were encountered: