-
Notifications
You must be signed in to change notification settings - Fork 1.2k
'.jsipfs datastore' breaks peers connections / .jsipfs Identity is not the one set by peerId in setup. #4212
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
This problems seems to come from the I have modified the
So, it looks like there is something not working into the default |
It looks like the problem is in the
the bug is back : peers are disconnected/reconnected without messaging after the second run. |
Am able to see pubsub successfully re-peer after deleting the remote peerid from at least one of the PeerStores. https://gist.github.com/tabcat/8fc26a03a58617ebea0e8ff4d261fcb3#file-test-ipfs-pubsub-js-L31-L32 await ipfs1.libp2p.peerStore.delete(id2.id) |
I pose this is a IPFS repo/mortice gclock leak. I wrote an issue here here with patches you can do in the meantime to fix the issue (hopefully). For me it does at least work after the fix. If you want the patch files I use (with the patch-package lib), see this repo patches folder, specifically the ipfs-repo+16.0.0.patch and mortice+3.0.1.patch (This assumes you are running the latest version of IPFS (0.65.0) |
Hello all, js-ipfs is being deprecated in favor of Helia. You can learn more about this deprecation and the corresponding migration guide here. As a result, we are going to close this issue. If you think we have done this in error, please feel to reopen with any comments in the next week as we will circle back on the reopened issues. We hope you will consider Helia for your IPFS in JS needs. If you believe this particular request belongs in Helia, feel free to open a Helia issue. We look forward to engaging with you more there. Thanks, |
Version:
"ipfs": "^0.64.0"
Platform:
All platforms : Mac/Linux
Severity:
High
Description:
.psipfs
directory makes ipfs instable.peerId
identity in.jsipfs
is not the one set in libp2p options. why ?I launch ipfs on several computers with the following setup :
This works fine : all nodes can publish messages via pubsub, can save and load ipfs or dag content from others.
But it works only once. If I stop/launch the same project, I can see peers connect/disconnect/connect/...
Then the pubsub messaging doesn't work anymore (because the
subscribe
is not automatically done on re-connect I imagine ?), but no ipfs or dag content can be read anymore by nodes.To make it work again, I have to remove all the
~/.jsipfs
directory. Then it works again, untill I stop/run it again.So, it looks like this saved directory make something wrong... I haven't found what.
I've noticed that the
identity
written in~/.jsipfs/config
is not the same asmyPeerId
. I have tried to force it (by editingPeerId
andPrivKey
) with no success.If it helps, I have sometimes the following messages :
or (same code in an electron project)
or
Steps to reproduce the error:
This can be tested with the following repo : https://github.com/on-meetsys/ipfs-node
Launch it on one computer, then run it on anothers with the
bootstrap
(index.js
line 21) set up to the multiaddress of the first computer, each one with its own peerId (line 28).Everything works : pubsub messaging sends message to get ipfs/dag content store by each node (see logs)
Stop/Run again : it works a few seconds, then peers disconnect, and there is no more ipfs messaging or content sharing.
Remove
.jsipfs
: Run : everything works again.The log when it works :
the log after a stop/run :
The text was updated successfully, but these errors were encountered: