Closed Bug 2079962 Opened 1 month ago Closed 1 month ago

Custom connection error message for localhost connection failure

Categories

(Toolkit :: Error Pages, enhancement)

Desktop
All
enhancement

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: dekushrub519, Assigned: dekushrub519, NeedInfo)

References

Details

Attachments

(1 file, 1 external file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:157.0) Gecko/20100101 Firefox/157.0

Steps to reproduce

Whilst performing local web application development, my application would often crash or fail to be running, and I would get a generic and misleading connection failure message.

Because I am a mediocre developer, I would often receive this message and get annoyed at Firefox, which is not really Firefox's fault.

Actual results

I would get the generic connection message when connecting to e.g. a stopped or crashed application at https://127.0.0.1:5000:

Unable to connect
Firefox can’t connect to the server at 127.0.0.1:5000
What can you do about it?
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the web.

Expected results

I was getting annoyed with the implication that my local machine was being treated in the same class as a remote web server that I should try again, check my network or proxy as that wasn't relevant. As such I'm proposing a customisation for the message when there's a connection failure against 127.0.0.1 / localhost / ::1

Unable to connect
Nightly can’t connect to the server at 127.0.0.1:5000
What can you do about it?
Nothing is accepting connections on port 5000. Check that your local server is running.
If it is running, check that it is using port 5000.
Check that the server accepts connections on this address. Some servers listen only on [::1] or only on 127.0.0.1.

Obviously if people have stronger opinions on the specific wording, I'm not precious about this, but mainly I believe that the message should direct you to troubleshoot your local server rather than assume a networking / internet issue.

A refused loopback connection almost always means nothing is listening on
that port, so the generic busy-site, network and firewall hints don't apply.
Timeouts, resets and other hosts keep the existing hints.

Assignee: nobody → dekushrub519
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Component: General → Error Pages
OS: Unspecified → All
Hardware: Unspecified → Desktop
Pushed by gijskruitbosch@gmail.com: https://github.com/mozilla-firefox/firefox/commit/361f049312d7 https://hg.mozilla.org/integration/autoland/rev/6d41ecec59dc Show local server hints when a connection to localhost is refused. r=fluent-reviewers,bolsson,Gijs
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch

FWIW, I can't get to this new error page for localhost URLs in the latest nightly (20261026091849).

Regressions: 2087967

Now that bug 2087967 is fixed, do you want to nominate this for the Fx161 relnotes? If so, set the relnote-firefox flag to "?"
https://wiki.mozilla.org/Release_Management/Release_Notes_Nomination

Possible wording:

When a connection to a local server such as localhost is refused, the error page now suggests checking that the server is running instead of showing generic network advice.

Thanks

Flags: needinfo?(dekushrub519)
QA Whiteboard: [qa-triage-done-c162/b161]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: