WebSocket is closed before the connection is established


#1

Hello all,

I created a brand new meteor project to document an in-house style guide with only the following packages added (beyond the defaults):

  • fourseven:scss@3.1.1
  • reywood:bootstrap3-sass@3.3.4_4
  • francocatena:compass@0.5.1

I chose to force these specific versions because they have proven to play nicely with each other in other projects already in production.

Further, I’m running as --release 1.1.0.2 to avoid misbehavior I’ve been seeing in 1.1.0.3.

Every time I try to view the page in Chrome, I get the following console error, repeatedly:

WebSocket connection to ‘ws://127.0.0.1:3000/sockjs/416/e1gx2bp2/websocket’ failed: WebSocket is closed before the connection is established.

Eventually, the page itself crashes in Chrome. I’ve tried:

  • removing and reinstalling meteor
  • specifying IPv4 (as opposed to IPv6) in the ROOT_URL and PORT (since I’m on OS X and one thread I found suggested it as a possible cause, though it’s likely no longer relevant)
  • otherwise simplifying the project

…but still, no dice. Any suggestions?

Thanks,

Sam


#2

Good news! I’ve solved this. I ended up commenting out different sections of my DOM to simplify the test case to the extreme, and in the end, discovered my footer contained an iframe with a relative path was the cause of all this pain and suffering. Lesson (re)learned: narrow the search by creating the simplest possible test case that still demonstrates the issue. (Quite often, in doing so, you end up pointing yourself toward the solution.)