Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Error during WebSocket handshake: Unexpected response code: 502 #972

Closed
vanruch opened this issue Aug 31, 2017 · 5 comments
Closed

Error during WebSocket handshake: Unexpected response code: 502 #972

vanruch opened this issue Aug 31, 2017 · 5 comments
Labels
kind/support A question or request for support

Comments

@vanruch
Copy link

vanruch commented Aug 31, 2017

  • Version: "0.25.2":
  • Platform: OS X 10.12.6:

Type: Bug

Severity: High

Description:

After creating a new IPFS instance, error messages like

WebSocket connection to 'wss://sfo-2.bootstrap.libp2p.io/' failed: Error during WebSocket handshake: Unexpected response code: 502

are constantly logged in browser console, after around a minute the page crashes

image

Steps to reproduce the error:

import IPFS from 'ipfs';

window.App = {
  start: function() {
    var ipfs = new IPFS();
  },
}  

window.addEventListener('load', function() {
  App.start();
});

link to github project

@daviddias
Copy link
Member

Hi @vanruch, that's not really a bug. It just means that one connection was not established and the browser loves to be verbose about it. See more here #969

@lgierth are these bootstrapers gone for good? I'll just remove them as they confuse people so much.

@daviddias daviddias added the kind/support A question or request for support label Aug 31, 2017
@vanruch
Copy link
Author

vanruch commented Aug 31, 2017

But the page crashes after some time and seems like it may be related to these messages.

@daviddias
Copy link
Member

It isn't actually. The crash is because of WebRTC. See: #950

I'm starting to wonder if I should just disable WebRTC by default. It seems that our network is at a size where this becomes unbearable. Solution is listed here #962 and being worked on.

@mitra42
Copy link

mitra42 commented Aug 31, 2017

The trouble with disabling WebRTC by defaut is that I presume once you do this anything using pubsub or Y will stop working completely (that was my experience, but I might be misdiagnosing).

@daviddias
Copy link
Member

This main issue reported is no fixed in js-ipfs 0.25.3. Fixed with 5ec27a3

To follow up on Connection Closing, track here: #962

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

3 participants