socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

browser unable to load file /socket.io/socket.io.js right after Node server starts

Open zheileman opened this issue 14 years ago • 3 comments

Hello,

I've been experimenting weird scenarios where after Node restart clients were unable to download socket.io client javascript file to open a socket connection.

I'm able to replicate it consistently with socket.io > 0.9.6 (I've tried 0.9.8 and 0.9.9). Version 0.9.6 works fine. Exact same Node codebase, only change is socket.io version. Tested in Firefox and Safari but I don't think this is a browser-specific issue.

Steps:

  1. Start node server
  2. Go to http://localhost:3001/socket.io/socket.io.js
  3. Loading will expire with timeout or abort if you reload the page.
  4. From now on it will work until you stop Node server and repeat step 1.

Any idea? Thanks.

zheileman avatar Aug 07 '12 11:08 zheileman

Same behaviour with version 0.9.10

zheileman avatar Aug 17 '12 09:08 zheileman

We are also experiencing the exact same issue running:

node v0.8.8 socket.io 0.9.10

Client browser is aborting file load.

stewartl60 avatar Sep 13 '12 17:09 stewartl60

if you have socket.enable('browser client gzip') try to desactivate it. seems to be a problem inside lib/static.js edit: replace lib/static.js line 182 "close" event by "exit" event gzip.on("close", function () with gzip.on("exit", function ()

ellisium avatar Nov 24 '12 11:11 ellisium