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

IPFS js cant connect to ws://127.0.0.1:8081/p2p/ #3298

Closed
adamprocter opened this issue Sep 22, 2020 · 5 comments
Closed

IPFS js cant connect to ws://127.0.0.1:8081/p2p/ #3298

adamprocter opened this issue Sep 22, 2020 · 5 comments
Assignees

Comments

@adamprocter
Copy link

Wanted to add as issue as discussed on stackoverflow (see link) as still in latest version.

  • Version:
    0.50.2

  • Platform:
    Firefox / Safari

Severity:

Low - Annoying console logging of errors, likely to effect browser / web app performance

Description:

Using IPFS I get the errors of either not allowed to run insecure content from ws://127.0.0.1:8081/p2p/Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6.

or Firefox can’t establish a connection to the server at ws://127.0.0.1:8081/p2p/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64.

Here is more on the issue and what appears to be a note towards fix
https://stackoverflow.com/questions/63563162/ipfs-js-cant-connect-to-ws-127-0-0-18081-p2p/63612116#63612116

@adamprocter adamprocter added the need/triage Needs initial labeling and prioritization label Sep 22, 2020
@achingbrain
Copy link
Member

achingbrain commented Sep 22, 2020

This is caused by network peers announcing local addresses as being externally dialable and then your node trying to dial them which fails. It's annoying but safe to ignore the printed errors.

I believe the next release of libp2p will not log these errors so the problem should go away.

cc: @vasco-santos

@achingbrain achingbrain added status/ready Ready to be worked topic/libp2p Topic libp2p and removed need/triage Needs initial labeling and prioritization labels Sep 22, 2020
@jacobheun
Copy link
Contributor

I believe the next release of libp2p will not log these errors so the problem should go away.

The logging can't be stopped, it's a security log in browsers that's purposefully uncatchable. We are looking at adding the IP/port combo to a denylist to prevent subsequent/frequent dials to those to minimize the number of errors being logged.

@adamprocter
Copy link
Author

do we have any progress on this ? Thanks

@vasco-santos
Copy link
Member

Yes, this will be fixed by this: libp2p/js-libp2p-websockets#116

As this is a breaking change, it will be included in js-libp2p@0.30 release libp2p/js-libp2p#655 . Once it is ready, we can bubble it up to IPFS

@whizzzkid
Copy link

js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide.

Please feel to reopen with any comments before 2023-06-05. We will do a final pass on reopened issues afterward (see #4336).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

No branches or pull requests

6 participants
@adamprocter @jacobheun @achingbrain @whizzzkid @vasco-santos and others