Issue 128057 in chromium: Websocket should fire 'error' event if no server available

41 views
Skip to first unread message

chro...@googlecode.com

unread,
May 14, 2012, 3:48:40 PM5/14/12
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 Area-Undefined

New issue 128057 by jduell.m...@gmail.com: Websocket should fire 'error'
event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057

Hi, I'm the developer for the Firefox websockets stack.

Chrome Version :18.0.1025.142 (Official Build 129054)
URLs (if applicable) :
Other browsers tested: Firefox
Add OK or FAIL after other browsers where you have tested this issue:
Firefox 14/15 (aurora/nightly): OK

What steps will reproduce the problem?
1. Load attached file in browser (make sure no websocket server is running
on localhost port 9988)
2. Observe that websocket's onerror method is not called in Chrome, but is
in Firefox.

What is the expected result?

Step 8 in the 'websocket constructor' algorithm in the W3C "The WebSocket
API Editor's Draft 8 May 2012" says that if, while connecting, "the status
code received from the server is not 101 (e.g. it is a redirect), the user
agent must fail the websocket connection." Failing the WS connection
involves firing the 'error' method. Firefox is doing this, but Chrome isn't.

To be fair, the W3C spec is really pretty unclear about the exact behavior
that should happen when a websocket fails to establish any sort of TCP
connection at all with the server (i.e. the server is down/missing).
Should we open a W3C bug to clarify the spec? I'd like to make sure
Firefox and Chrome do the same thing here.

Attachments:
ws_close.html 1.1 KB

chro...@googlecode.com

unread,
May 14, 2012, 11:24:34 PM5/14/12
to chromi...@chromium.org
Updates:
Labels: -Area-Undefined Area-WebKit WebKit-WebSockets

Comment #1 on issue 128057 by tk...@chromium.org: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057

(No comment was entered for this change.)

chro...@googlecode.com

unread,
May 15, 2012, 10:05:04 AM5/15/12
to chromi...@chromium.org

Comment #2 on issue 128057 by mone.tpatpc: Websocket should fire 'error'
I think this is a duplicate of this:
http://code.google.com/p/chromium/issues/detail?id=107685

chro...@googlecode.com

unread,
May 15, 2012, 7:35:56 PM5/15/12
to chromi...@chromium.org

Comment #3 on issue 128057 by jduell.m...@gmail.com: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057

Sure, this is a dupe of 107685 provided you widen that bug to include not
just "replies with HTTP instead of websocket upgrade" but also "server
down/missing/etc"

chro...@googlecode.com

unread,
May 17, 2012, 2:59:01 AM5/17/12
to chromi...@chromium.org
Updates:
Cc: ba...@chromium.org

Comment #4 on issue 128057 by toyos...@chromium.org: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057

Yuta, could you look this?

chro...@googlecode.com

unread,
May 18, 2012, 5:04:39 AM5/18/12
to chromi...@chromium.org
Updates:
Cc: toyos...@chromium.org yu...@chromium.org

Comment #5 on issue 128057 by toyos...@chromium.org: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057

Issue 107685 has been merged into this issue.

chro...@googlecode.com

unread,
May 18, 2012, 5:10:39 AM5/18/12
to chromi...@chromium.org
Updates:
Status: Available
Labels: OS-All Mstone-21

Comment #6 on issue 128057 by toyos...@chromium.org: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057

I agreed the reporter's expected behavior and confirm that Chrome doesn't
conform.

chro...@googlecode.com

unread,
May 18, 2012, 8:27:35 PM5/18/12
to chromi...@chromium.org

Comment #7 on issue 128057 by jduell.m...@gmail.com: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057

By the way, a clearer indication that onerror should be called for a failed
connection is in this language in the W3C spec:

"If the establish a WebSocket connection algorithm fails, it triggers the
fail the WebSocket connection algorithm, which then invokes the close the
WebSocket connection algorithm."

Failing then implies calling onerror.


chro...@googlecode.com

unread,
May 22, 2012, 1:44:09 AM5/22/12
to chromi...@chromium.org
Updates:
Status: Started
Owner: toyos...@chromium.org

Comment #8 on issue 128057 by toyos...@chromium.org: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057

FYI
This issue is going to be fixed by an external developer in WebKit side.
https://bugs.webkit.org/show_bug.cgi?id=86958

I'll own this issue and catch up the status of this WebKit side change.

chro...@googlecode.com

unread,
May 22, 2012, 1:48:09 AM5/22/12
to chromi...@chromium.org
Updates:
Labels: WebKit-ID-86958

Comment #9 on issue 128057 by yu...@chromium.org: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057

chro...@googlecode.com

unread,
May 22, 2012, 1:54:32 AM5/22/12
to chromi...@chromium.org
Updates:
Labels: -WebKit-ID-86958 WebKit-ID-86958-NEW

Comment #10 on issue 128057 by bugdro...@chromium.org: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057#c10

https://bugs.webkit.org/show_bug.cgi?id=86958

chro...@googlecode.com

unread,
May 22, 2012, 7:13:10 AM5/22/12
to chromi...@chromium.org
Updates:
Labels: -WebKit-ID-86958-NEW WebKit-ID-86958-RESOLVED WebKit-Rev-117944

Comment #11 on issue 128057 by bugdro...@chromium.org: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057#c11

https://bugs.webkit.org/show_bug.cgi?id=86958
http://trac.webkit.org/changeset/117944

chro...@googlecode.com

unread,
May 28, 2012, 10:15:57 AM5/28/12
to chromi...@chromium.org
Updates:
Labels: WebKit-ID-87336

Comment #12 on issue 128057 by toyos...@chromium.org: Websocket should
fire 'error' event if no server available

chro...@googlecode.com

unread,
May 28, 2012, 10:19:58 AM5/28/12
to chromi...@chromium.org
Updates:
Labels: -WebKit-ID-87336 WebKit-ID-87336-NEW

Comment #13 on issue 128057 by bugdro...@chromium.org: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057#c13

https://bugs.webkit.org/show_bug.cgi?id=87336

chro...@googlecode.com

unread,
Jun 14, 2012, 3:51:18 AM6/14/12
to chromi...@chromium.org
Updates:
Labels: WebKit-Rev-120291

Comment #14 on issue 128057 by bugdro...@chromium.org: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057#c14

http://trac.webkit.org/changeset/120291

chro...@googlecode.com

unread,
Apr 18, 2013, 12:52:29 AM4/18/13
to chromi...@chromium.org

Comment #22 on issue 128057 by tyos...@chromium.org: Websocket should
fire 'error' event if no server available
http://code.google.com/p/chromium/issues/detail?id=128057

Patches by Li are under review.
Chromium side: https://codereview.chromium.org/10668018/
Blink side: https://codereview.chromium.org/14071008/

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages