14

There is currently a bug in Stack Overflow JS that leads to realtime updates failure.

I load SO pages through HTTPS; e.g. Active questions for a tag, like https://stackoverflow.com/questions/tagged/google-chrome-extension?sort=active

This normally works, as well as realtime updating: first connection to the realtime updates endpoint is made through wss: regardless of the page's protocol:

wss://qa.sockets.stackexchange.com/

However, as the page stays up, the code decides to switch to ws:, again, regardless of the page's protocol:

ws://qa.sockets.stackexchange.com/

This reset seems to happen after 5 minutes of inactivity in the tag and leads to 2 distinct problems.

  1. When loading the page over HTTPS, Chrome simply refuses to allow the connection and realtime updates break:

    [blocked] The page at 'https://stackoverflow.com/questions/tagged/google-chrome-extension?sort=active&pageSize=50' was loaded over HTTPS, but ran insecure content from 'ws://qa.sockets.stackexchange.com/': this content should also be loaded over HTTPS.

    The script does not recover from this and updates stop.

  2. My workplace is behind a transparent squid proxy. This breaks insecure WebSockets, so accessing the page over HTTP just leads to connection errors when ws: endpoint is accessed:

    WebSocket connection to 'ws://qa.sockets.stackexchange.com/' failed: Error in connection establishment: net::ERR_TUNNEL_CONNECTION_FAILED

    However, the script does recover sometimes recovers from that and reconnects through wss: automatically.

Please note: I'm reasonably sure this worked before (about a month before). In any case, the connection should not downgrade to ws:.

5
  • This question probably should be migrated to stackoverflow for more attention and since it is mostly a technical question, and not primarily about stackoverflow.
    – wallyk
    Commented Apr 7, 2015 at 16:29
  • 2
    @wallyk What? I would argue it can be migrated to Meta.SE, but definitely not SO (since it's a question/bug report about SO/SE, it's a Meta question)
    – Xan
    Commented Apr 7, 2015 at 16:30
  • 1
    +1 this is so irritating... wish it would get fixed
    – mxmissile
    Commented May 6, 2016 at 14:59
  • 1
    Seen today on SO: Mixed Content: The page at 'stackoverflow.com/users/5771128/charlie-joynt' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://qa.sockets.stackexchange.com/'. This request has been blocked; this endpoint must be available over WSS. Commented Oct 31, 2016 at 9:13
  • Still happening today as well Commented Feb 2, 2017 at 13:04

0

You must log in to answer this question.

Browse other questions tagged .