Orbit-db: unable to add localy and retrieve remote

Created on 23 Sep 2020  路  12Comments  路  Source: orbitdb/orbit-db

After sorting out some issues with pubsub, swarm etc... I am able to "see" databases I've created using Control Center:

Like:
/orbitdb/zdpuAkZqauK6eJyKpsL1e5z5pJwVJHvTpMZJxAtvAzSLR3LYF/casa-corrently-beta

It shows the right meta data (storage type) - however the items are always 0. Same in my code if I request (open) a database remotely I get an item count of 0 back.

Does anybody have a hint where to continue debugging?

  • "ipfs": - "^0.50.2"
  • "orbit-db": "^0.26.0"

And yes I am aware of the version dependency and official support of <=0.46 ipfs - I've tested with downgrades already.

All 12 comments

Hi @zoernert thanks for opening the issue. A couple exploratory questions first

  1. Are you using the in-browser node or are you connecting to a js-ipfs node on your machine?
  2. Relatedly, when you say you're able to "see" databases do you mean just in the UI, or from another IPFS node?
  1. for publishing (adding) I am using node and start js-ipfs as a module (which works find for pubsub and orther ipfs related operations)
  2. in the UI they get added as soon as a new entry got added.

Thanks - I think it's because it needs an upgrade to the WebRTC star servers. Do me a favor and try this branch? https://github.com/orbitdb/orbit-db-control-center/pull/4

If it works for you I'll be happy to merge it.

Using the branch I could now see the permissions hash - but still 0 entries. One thing that I will try is to manually add the star server from https://github.com/orbitdb/orbit-db-control-center/blob/master/src/config/index.js to my script and see if it works.

How'd it go? :)

My first CI failed on a public server - however I wanted to double check later today if everything is configured as required and no firewall etc.. .blocks.

Cool, take your time

So all my checks failed. What I will do is create a private module that just has and orbitdb with some randomly added values on one server and a second module as "listener" to debug the issue. Hope that helps.

May I see the IPFS configs for both IPFS nodes you're trying to connect? And whether or not they are browser, node.js, or go?

Baehmmm

I think I found the issue - it is my architecture! In order to have a bit of stability in my pubsub communication I am using go ipfs on the "servers" and node js on the "clients" - however pubsub of ipfs does not relay topics if one node is not subscribed to. My channel event messaging worked perfect as the "servers" are subscribed to that topics. However for the orbitdb they are not ... so they will forward a message from Client A via Server B to Client C.

Ah, you can turn on circuit relay and hop in your go-ipfs config as well!

https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#autorelay

Issue might be closed. It works from my scripts - however not within my browser version (eq. Control Center). I've upgraded my go-ipfs to latest version and figured out that always the first iterator call ends with "0" items - however polling it from time to time brings up results.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oskarpyke picture oskarpyke  路  6Comments

maroodb picture maroodb  路  4Comments

cristiano-belloni picture cristiano-belloni  路  5Comments

BartKnucle picture BartKnucle  路  4Comments

whyrusleeping picture whyrusleeping  路  3Comments