orbitdb-archive / ipfs-log

Append-only log CRDT on IPFS
https://orbitdb.github.io/ipfs-log/
MIT License
398 stars 55 forks source link

Update js-ipfs 0.37.x #266

Closed aphelionz closed 5 years ago

aphelionz commented 5 years ago

Description (Required)

This PR ensures compatibility with js-ipfs@^0.37.0

TODO

aphelionz commented 5 years ago

@alanshaw Might you be able to take a look at the test failure here and provide insight into why the pubsub messages via js-ipfs-http-api are failing after 92 messages sent?

CircleCI (not sure if you can see it) https://circleci.com/gh/orbitdb/ipfs-log/1410

But here you can see it passes with js-ipfs and fails with go-ipfs via HTTP API

Screenshot from 2019-09-05 13-50-17

Here's the test code: https://github.com/orbitdb/ipfs-log/blob/fix/js-ipfs0.37.0/test/replicate.spec.js#L120

alanshaw commented 5 years ago

What version of js-ipfs-http-client are you using?

aphelionz commented 5 years ago

Interesting, looks like it could be a version mismatch between ipfsd-ctl and js-ipfs

Screenshot from 2019-09-05 18-50-32

aphelionz commented 5 years ago

Though, I tried installing both explicitly and they both had the same result :(

alanshaw commented 5 years ago

Is the JS daemon in process or external?

alanshaw commented 5 years ago

In v34 we switched the pubsub implementation to use the fetch API (node-fetch in Node.js) so this could be a new bug.

aphelionz commented 5 years ago

@alanshaw In process. It's included via ipfsd-ctl as part of https://github.com/orbitdb/orbit-db-test-utils

alanshaw commented 5 years ago

Can you try ipfsd-ctl@0.45.1? In 0.46 it no longer passes the --enable-pubsub-experiment flag (pubsub will be enabled by default in js-ipfs 0.38 and the next go-ipfs release https://github.com/ipfs/go-ipfs/issues/6621)

alanshaw commented 5 years ago

I encountered this yesterday and thought there's a possibility this issue could be due to it https://github.com/sindresorhus/ky-universal/issues/8

There's a workaround coming in https://github.com/ipfs/js-ipfs-http-client/pull/1101

If changing ipfsd-ctl version doesn't work it would be helpful if you were able to test out that branch?