Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ready for js-ipfs >= 0.41 #767

Closed
wants to merge 3 commits into from
Closed

ready for js-ipfs >= 0.41 #767

wants to merge 3 commits into from

Conversation

Xmader
Copy link

@Xmader Xmader commented Mar 6, 2020

close #762

@aphelionz
Copy link
Member

Cool! Can't wait to have a look at this

@aphelionz
Copy link
Member

Getting few errors here, although the tests still pass. It would still be prudent to deal with these before merging.

orbit-db - Multiple Databases (go-ipfs)                                                                                                                                                    
Creating databases and waiting for peers to connect                                                                                                                                          
Peers connected                                                                                                                                                                              
Writing to databases                                                                                                                                                                         
(node:11352) UnhandledPromiseRejectionWarning: FetchError: request to http://127.0.0.1:36705/api/v0/pubsub/pub?arg=%2Forbitdb%2FzdpuAyVAAr1erMHdLSmbDBCj1PeiF81vRjSFjsUCWenBRQBUG%2Fcustom-ke
ystore&arg=%5b%7b%22hash%22%3a%22zdpuAs1vQLJH1WdbSzi2jYiHQBCVAEGNFKd9c3AxP8dPFiKP9%22%2c%22id%22%3a%22%2forbitdb%2fzdpuAyVAAr1erMHdLSmbDBCj1PeiF81vRjSFjsUCWenBRQBUG%2fcustom-keystore%22%2c%
22payload%22%3a%7b%22op%22%3a%22COUNTER%22%2c%22key%22%3anull%2c%22value%22%3a%7b%22id%22%3a%22044470d6c853af394fe1afcd240f404edc22b82d9aa2f01b3eb3e7da756a6d3c9958bbf2ad151d6c63499482afc764
5df5d69bf82fe4d40bfd27d147ca6d634396%22%2c%22counters%22%3a%7b%22zdpuAyVAAr1erMHdLSmbDBCj1PeiF81vRjSFjsUCWenBRQBUG%22%3a0%2c%22044470d6c853af394fe1afcd240f404edc22b82d9aa2f01b3eb3e7da756a6d
3c9958bbf2ad151d6c63499482afc7645df5d69bf82fe4d40bfd27d147ca6d634396%22%3a8%7d%7d%7d%2c%22next%22%3a%5b%5d%2c%22refs%22%3a%5b%5d%2c%22v%22%3a2%2c%22clock%22%3a%7b%22id%22%3a%22044470d6c853a
f394fe1afcd240f404edc22b82d9aa2f01b3eb3e7da756a6d3c9958bbf2ad151d6c63499482afc7645df5d69bf82fe4d40bfd27d147ca6d634396%22%2c%22time%22%3a1%7d%2c%22key%22%3a%22044470d6c853af394fe1afcd240f404
edc22b82d9aa2f01b3eb3e7da756a6d3c9958bbf2ad151d6c63499482afc7645df5d69bf82fe4d40bfd27d147ca6d634396%22%2c%22identity%22%3a%7b%22id%22%3a%220361ab7a23d4576085b561e987fd806cdb703d92d290bfdf29
ebb3e17ef8d795d9%22%2c%22publicKey%22%3a%22044470d6c853af394fe1afcd240f404edc22b82d9aa2f01b3eb3e7da756a6d3c9958bbf2ad151d6c63499482afc7645df5d69bf82fe4d40bfd27d147ca6d634396%22%2c%22signatu
res%22%3a%7b%22id%22%3a%223045022100ab27d7721dc101e1c11b187988769d86856d64c77cac8947be95ec2e57ae4e870220079993fc89027904c5f268becf7ade09b47ee3dc9b8a77222a7f5c440ffdb24c%22%2c%22publicKey%22
%3a%223045022100c49692df98a3cbf9e155c9a4984db2a0475efc6e6e580a11a069a8eea11fa0dd02205b7048b7766bd2d0e04721ee1ae79c0f7e5fba8f919ec45dbbe0ce85ec8ced88%22%7d%2c%22type%22%3a%22orbitdb%22%7d%2c
%22sig%22%3a%2230450221009a66663bc795c7c67d0d03bc6efd4d847621c51d59524d2fc6af230a541d3fd60220713dd32e3993f9cebdda06c807de3e3c294471d9eb605a8297dc452075a3c4c4%22%7d%5d failed, reason: socket
 hang up                                                                                                                                                                                     
    at ClientRequest.<anonymous> (/home/mark/Projects/orbitdb/orbit-db/node_modules/ipfs/node_modules/node-fetch/lib/index.js:1455:11)                                                       
    at ClientRequest.emit (events.js:321:20)                                                                                                                                                 
    at Socket.socketOnEnd (_http_client.js:463:9)                                                                                                                                            
    at Socket.emit (events.js:333:22)                                                                                                                                                        
    at endReadableNT (_stream_readable.js:1201:12)                                                                                                                                           
    at processTicksAndRejections (internal/process/task_queues.js:84:21)                                                                                                                     
(node:11352) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a pro
mise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html
#cli_unhandled_rejections_mode). (rejection id: 1297)                                                                                                                                        
(node:11352) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-
zero exit code.
orbit-db - Offline mode (go-ipfs)
(node:11352) UnhandledPromiseRejectionWarning: FetchError: request to http://127.0.0.1:43753/api/v0/pubsub/pub?arg=%2Forbitdb%2FzdpuAwByhLyKnQeLuMoozZTnaXCMyZRJctnoKBXkVFiWqrNH8%2Fcustom-ke
ystore&arg=%5b%7b%22hash%22%3a%22zdpuArLnGDxxbv8JznHrwYJMyZANp52VTuXvMTbW6p5BAm9TV%22%2c%22id%22%3a%22%2forbitdb%2fzdpuAwByhLyKnQeLuMoozZTnaXCMyZRJctnoKBXkVFiWqrNH8%2fcustom-keystore%22%2c%
22payload%22%3a%7b%22op%22%3a%22COUNTER%22%2c%22key%22%3anull%2c%22value%22%3a%7b%22id%22%3a%2204da6912ed43fcb5ca8bc1cd232fae380c252ec3f71ec1b7dac3ca9baac3fa5574814d8a34796fa09383694e58904f
693591776c06444daa32e8ac84ca0adf0ebc%22%2c%22counters%22%3a%7b%22zdpuAwByhLyKnQeLuMoozZTnaXCMyZRJctnoKBXkVFiWqrNH8%22%3a0%2c%2204da6912ed43fcb5ca8bc1cd232fae380c252ec3f71ec1b7dac3ca9baac3fa
5574814d8a34796fa09383694e58904f693591776c06444daa32e8ac84ca0adf0ebc%22%3a8%7d%7d%7d%2c%22next%22%3a%5b%5d%2c%22refs%22%3a%5b%5d%2c%22v%22%3a2%2c%22clock%22%3a%7b%22id%22%3a%2204da6912ed43f
cb5ca8bc1cd232fae380c252ec3f71ec1b7dac3ca9baac3fa5574814d8a34796fa09383694e58904f693591776c06444daa32e8ac84ca0adf0ebc%22%2c%22time%22%3a1%7d%2c%22key%22%3a%2204da6912ed43fcb5ca8bc1cd232fae3
80c252ec3f71ec1b7dac3ca9baac3fa5574814d8a34796fa09383694e58904f693591776c06444daa32e8ac84ca0adf0ebc%22%2c%22identity%22%3a%7b%22id%22%3a%22id%22%2c%22publicKey%22%3a%2204da6912ed43fcb5ca8bc
1cd232fae380c252ec3f71ec1b7dac3ca9baac3fa5574814d8a34796fa09383694e58904f693591776c06444daa32e8ac84ca0adf0ebc%22%2c%22signatures%22%3a%7b%22id%22%3a%22%3csignature%3e%22%2c%22publicKey%22%3
a%22%3csignature%3e%22%7d%2c%22type%22%3a%22custom%22%7d%2c%22sig%22%3a%22%3csignature%3e%22%7d%5d failed, reason: socket hang up
    at ClientRequest.<anonymous> (/home/mark/Projects/orbitdb/orbit-db/node_modules/ipfs/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:321:20)
    at Socket.socketOnEnd (_http_client.js:463:9)
    at Socket.emit (events.js:333:22)
    at endReadableNT (_stream_readable.js:1201:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:11352) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a pro
mise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html
#cli_unhandled_rejections_mode). (rejection id: 1299)
orbit-db - Replication (js-ipfs)
    ✓ replicates database of 1 entry (1011ms)
(node:11352) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limi
t
(node:11352) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:11352) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limi
t
(node:11352) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:11352) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
orbit-db - Persistency with custom cache (js-ipfs)                                                                                                                                         
    load                                                                                                                                                                                     
(node:11352) UnhandledPromiseRejectionWarning: FetchError: request to http://127.0.0.1:43891/api/v0/pubsub/pub?arg=%2Forbitdb%2FzdpuAvMYNmLnRuTXGyeeELJSBPExoFtpxQVwJ39GiG2DVTjig%2Forbit-db-
tests&arg=%5b%7b%22hash%22%3a%22zdpuAqkke3NoVFvMxGRTai4z6fSCusJ68X1SF3oGkGQCErnsQ%22%2c%22id%22%3a%22%2forbitdb%2fzdpuAvMYNmLnRuTXGyeeELJSBPExoFtpxQVwJ39GiG2DVTjig%2forbit-db-tests%22%2c%22
payload%22%3a%7b%22op%22%3a%22PUT%22%2c%22key%22%3a%22key1%22%2c%22value%22%3a%5b1%2c2%2c3%2c4%2c5%5d%7d%2c%22next%22%3a%5b%5d%2c%22refs%22%3a%5b%5d%2c%22v%22%3a2%2c%22clock%22%3a%7b%22id%22%3a%2204c584b0983cbdb26096ef50d64378f0fa87fd126b187c3e4ca3974fcc85a62efdc40e93e40ce5a3155fce49b2142c2849068426c91b5e03590eba6dc35e02672a%22%2c%22time%22%3a1%7d%2c%22key%22%3a%2204c584b0983cbdb26096ef50d64378f0fa87fd126b187c3e4ca3974fcc85a62efdc40e93e40ce5a3155fce49b2142c2849068426c91b5e03590eba6dc35e02672a%22%2c%22identity%22%3a%7b%22id%22%3a%220300e595a6103b302043b2bd0de7a$9cb4a1992dfd54cc166edfa0dcdf557f9747%22%2c%22publicKey%22%3a%2204c584b0983cbdb26096ef50d64378f0fa87fd126b187c3e4ca3974fcc85a62efdc40e93e40ce5a3155fce49b2142c2849068426c91b5e03590eba6dc35e02672a%22%2c%22signatures%22%3a%7b%22id%22%3a%223044022060372133d7074d9695553b4fe6b8617e32c145fb93f78afcc5292b73097e3f3e02204d904269eb9d6a3f590b069c070aaaf5991ff1ddd5ad12d6c4d6418c46c50bfc%22%2c%22publicKey%22%3a%22304402200d942fb2d733c851a76d414fcf3c0654a18c1c97c9070448db0dc7d12d88751602205555285e7f2c7f50e761686441ed5bb127756fdae16cb723ef57c2b5f8edc458%22%7d%2c%22type%22%3a%22orbitdb%22%7d%2c%22sig%22%3a%22304402201ed1fb39c04e81b34387faba3400cb13ea79374a8a823f617d527561e24b13770220598f73e872cdf51431c3abaa36d88593b63b5235cbdaec6f66f18ad090744c24%22%7d%5d failed,
reason: socket hang up
    at ClientRequest.<anonymous> (/home/mark/Projects/orbitdb/orbit-db/node_modules/ipfs/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:321:20)
    at Socket.socketOnEnd (_http_client.js:463:9)
    at Socket.emit (events.js:333:22)
    at endReadableNT (_stream_readable.js:1201:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:11352) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4071)
orbit-db - Replication Status (js-ipfs)
(node:11352) UnhandledPromiseRejectionWarning: FetchError: request to http://127.0.0.1:40485/api/v0/pubsub/peers?arg=%2Fipfs-pubsub-direct-channel%2Fv1%2FQmTu7C7xtLJ6K8DcVXQfc6iRSzqKnSKn9PF
BpP11N7CNzM%2FQmedvSDnmLtCkkLrVJsMiaRBCNAY9x281QFFwBmq9V9eiW failed, reason: connect ECONNREFUSED 127.0.0.1:40485
    at ClientRequest.<anonymous> (/home/mark/Projects/orbitdb/orbit-db/node_modules/ipfs/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:321:20)
    at Socket.socketErrorListener (_http_client.js:432:9)
    at Socket.emit (events.js:321:20)
    at emitErrorNT (internal/streams/destroy.js:84:8)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:11352) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a pro
mise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html
#cli_unhandled_rejections_mode). (rejection id: 7480)

@@ -61,7 +61,7 @@ The default keystore and identity-provider now have caches added to speed up ver

### Offline mode
An optional `offline` flag has bee added which, when set to `true`, prevents pubsub from starting and messages from being exchanged. This is useful to speed up testing and for when you would like to use your database locally without networking enabled.
To use offline mode, start your IPFS nodes offline (with `new IPFS({ start: false })`) and create your OrbitDB instance as follows:
To use offline mode, start your IPFS nodes offline (with `IPFS.create({ start: false })`) and create your OrbitDB instance as follows:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for doing doc updates 👍

@aphelionz
Copy link
Member

Provisional approval pending on the above comment about the errors. Need to discuss and work through those

@aphelionz
Copy link
Member

aphelionz commented Mar 7, 2020

@Xmader
Copy link
Author

Xmader commented Mar 7, 2020

I don't think we need to update orbit-db-feedstore, as it depends on orbit-db-eventstore ~1.7.0.
If we publish orbit-db-eventstore v1.7.1, ~1.7.0 can match it.

@aphelionz
Copy link
Member

Even though you were extremely diligent about backwards-compatibility in orbit-db-store, I still think these need to be minor-versioned so there's no inadvertently getting updates that aren't technically patches

@aphelionz
Copy link
Member

Just the feedstore is left!

@aphelionz
Copy link
Member

Still need to deal with those errors above as well 🤔

@aphelionz
Copy link
Member

aphelionz commented Mar 14, 2020

Go ahead and bump the version to 0.24.0-rc.1 on this branch and I'll publish to @next for testing. We still have docs and the CHANGELOG to write. Are you still seeing the aforementioned errors when you test?

@Xmader
Copy link
Author

Xmader commented Mar 14, 2020

Yes, even more errors

 orbit-db - Multiple Databases (js-ipfs)
Creating databases and waiting for peers to connect
Peers connected
Writing to databases
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
Waiting for replication to finish
    ✓ replicates multiple open databases (2513ms)
  orbit-db - Offline mode (js-ipfs)
(node:1738) UnhandledPromiseRejectionWarning: FetchError: request to http://127.0.0.1:38693/api/v0/pubsub/pub?arg=%2Forbitdb%2FzdpuArnYJiLkUbi2Zo6TCwQ9jx6Paf7fySW17B6WHJKLsS9EM%2Fcustom-keystore&arg=%5b%7b%22hash%22%3a%22zdpuAxkXonTRvgiTF4uXPGszp3fAF9BkQHwwenuewjFEatrga%22%2c%22id%22%3a%22%2forbitdb%2fzdpuArnYJiLkUbi2Zo6TCwQ9jx6Paf7fySW17B6WHJKLsS9EM%2fcustom-keystore%22%2c%22payload%22%3a%7b%22op%22%3a%22COUNTER%22%2c%22key%22%3anull%2c%22value%22%3a%7b%22id%22%3a%22047be0a2017559970a95ee8371c87c8192282b7714b093cb1c31df150ec9746d1dfd856acdd099a4642ebd23d667d630a5d9690ddc5220c16ec64ebea8b05f98ec%22%2c%22counters%22%3a%7b%22zdpuArnYJiLkUbi2Zo6TCwQ9jx6Paf7fySW17B6WHJKLsS9EM%22%3a0%2c%22047be0a2017559970a95ee8371c87c8192282b7714b093cb1c31df150ec9746d1dfd856acdd099a4642ebd23d667d630a5d9690ddc5220c16ec64ebea8b05f98ec%22%3a8%7d%7d%7d%2c%22next%22%3a%5b%5d%2c%22refs%22%3a%5b%5d%2c%22v%22%3a2%2c%22clock%22%3a%7b%22id%22%3a%22047be0a2017559970a95ee8371c87c8192282b7714b093cb1c31df150ec9746d1dfd856acdd099a4642ebd23d667d630a5d9690ddc5220c16ec64ebea8b05f98ec%22%2c%22time%22%3a1%7d%2c%22key%22%3a%22047be0a2017559970a95ee8371c87c8192282b7714b093cb1c31df150ec9746d1dfd856acdd099a4642ebd23d667d630a5d9690ddc5220c16ec64ebea8b05f98ec%22%2c%22identity%22%3a%7b%22id%22%3a%2202a04a435fc4ba5702d66bdad8617f66e176f594e066e0d011d42ea66667d8877a%22%2c%22publicKey%22%3a%22047be0a2017559970a95ee8371c87c8192282b7714b093cb1c31df150ec9746d1dfd856acdd099a4642ebd23d667d630a5d9690ddc5220c16ec64ebea8b05f98ec%22%2c%22signatures%22%3a%7b%22id%22%3a%223044022066560ea2764beaf890bc9641380ae00bb47f00f76d07682fa4ce9dbbe6a86a1602201154dc9e471d89e83b70ed2eefde04ad2c8e3efa5e0ac029c9af56a43e13ce26%22%2c%22publicKey%22%3a%223045022100bd9071f28191acb81a7f4d9e679fccc9153b33d20799fe1f25cb588e5412aef60220391d21983397d02f58cfe9b7820dbda66accf10a4e043be3281895b13e0124b4%22%7d%2c%22type%22%3a%22orbitdb%22%7d%2c%22sig%22%3a%2230440220276e7e3fb76bb2aa8914bb24edc1c77efea8831bb7c3e19e3c5d594a5e6ba80002200e9d3e07f46ebf3f465d958adbeb365940f3b37c1d425caa2dfb434d9a39ecd3%22%7d%5d failed, reason: socket hang up
    at ClientRequest.<anonymous> (/home/circleci/orbitdb/orbit-db/node_modules/ipfs/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:198:13)
    at Socket.socketOnEnd (_http_client.js:435:9)
    at Socket.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:1738) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1296)
(node:1738) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    ✓ starts in offline mode
    ✓ does not start in offline mode
    ✓ does not start in offline mode - default
    ✓ throws error if no `id` passed in offline mode

  orbit-db - Offline mode (go-ipfs)
(node:1738) UnhandledPromiseRejectionWarning: FetchError: request to http://127.0.0.1:39339/api/v0/pubsub/pub?arg=%2Forbitdb%2FzdpuAwByhLyKnQeLuMoozZTnaXCMyZRJctnoKBXkVFiWqrNH8%2Fcustom-keystore&arg=%5b%7b%22hash%22%3a%22zdpuAyc9BQxT25j4ThiU4xvC93p4Buz4r7eRuzdTvzn8VhGz8%22%2c%22id%22%3a%22%2forbitdb%2fzdpuAwByhLyKnQeLuMoozZTnaXCMyZRJctnoKBXkVFiWqrNH8%2fcustom-keystore%22%2c%22payload%22%3a%7b%22op%22%3a%22COUNTER%22%2c%22key%22%3anull%2c%22value%22%3a%7b%22id%22%3a%22042428dd95dd6990470424afcce7a820f26d841ece46c4e4aa5687356d18aece09cdd67347e2c15ae9c91c81bcbbc146764a0990024d01f8dd5cdde03929252ba8%22%2c%22counters%22%3a%7b%22zdpuAwByhLyKnQeLuMoozZTnaXCMyZRJctnoKBXkVFiWqrNH8%22%3a0%2c%22042428dd95dd6990470424afcce7a820f26d841ece46c4e4aa5687356d18aece09cdd67347e2c15ae9c91c81bcbbc146764a0990024d01f8dd5cdde03929252ba8%22%3a8%7d%7d%7d%2c%22next%22%3a%5b%5d%2c%22refs%22%3a%5b%5d%2c%22v%22%3a2%2c%22clock%22%3a%7b%22id%22%3a%22042428dd95dd6990470424afcce7a820f26d841ece46c4e4aa5687356d18aece09cdd67347e2c15ae9c91c81bcbbc146764a0990024d01f8dd5cdde03929252ba8%22%2c%22time%22%3a1%7d%2c%22key%22%3a%22042428dd95dd6990470424afcce7a820f26d841ece46c4e4aa5687356d18aece09cdd67347e2c15ae9c91c81bcbbc146764a0990024d01f8dd5cdde03929252ba8%22%2c%22identity%22%3a%7b%22id%22%3a%22id%22%2c%22publicKey%22%3a%22042428dd95dd6990470424afcce7a820f26d841ece46c4e4aa5687356d18aece09cdd67347e2c15ae9c91c81bcbbc146764a0990024d01f8dd5cdde03929252ba8%22%2c%22signatures%22%3a%7b%22id%22%3a%22%3csignature%3e%22%2c%22publicKey%22%3a%22%3csignature%3e%22%7d%2c%22type%22%3a%22custom%22%7d%2c%22sig%22%3a%22%3csignature%3e%22%7d%5d failed, reason: socket hang up
    at ClientRequest.<anonymous> (/home/circleci/orbitdb/orbit-db/node_modules/ipfs/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:198:13)
    at Socket.socketOnEnd (_http_client.js:435:9)
    at Socket.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:1738) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1298)
    ✓ starts in offline mode
    ✓ does not start in offline mode
    ✓ does not start in offline mode - default
    ✓ throws error if no `id` passed in offline mode
 orbit-db - Replicate and Load (js-ipfs)
    two peers
Waiting for peers...
Found peers
Writing to database...
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
Done
      ✓ replicates database of 100 entries and loads it from the disk (2226ms)
orbit-db - Replication (js-ipfs)
    ✓ replicates database of 1 entry (1004ms)
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
    ✓ replicates database of 100 entries (970ms)
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
    ✓ emits correct replication info (1016ms)

Writing 178 / 512 Writing 409 / 512 Writing 512 / 512 Duration: 1602 ms
    ✓ emits correct replication info on fresh replication (2704ms)
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit
    ✓ emits correct replication info in two-way replication (1387ms)
orbit-db - Replication Status (js-ipfs)
(node:1738) UnhandledPromiseRejectionWarning: FetchError: request to http://127.0.0.1:42153/api/v0/pubsub/peers?arg=%2Fipfs-pubsub-direct-channel%2Fv1%2FQmVy9XCCSS4VJVgyitnQZvV2SuSCFXD6siLqwUtowFEFQH%2FQmazdoYBN7xGCYf9YRRoY5wA6rtrMNeQumnuUHdjNCajuW failed, reason: connect ECONNREFUSED 127.0.0.1:42153
    at ClientRequest.<anonymous> (/home/circleci/orbitdb/orbit-db/node_modules/ipfs/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:198:13)
    at Socket.socketErrorListener (_http_client.js:401:9)
    at Socket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:1738) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7309)
    ✓ has correct initial state
    ✓ has correct replication info after load
    ✓ has correct replication info after close
    ✓ has correct replication info after sync
    ✓ has correct replication info after loading from snapshot

@aphelionz
Copy link
Member

Ok, let me see what I can do with those before I publish

@Xmader
Copy link
Author

Xmader commented Mar 16, 2020

@Xmader
Copy link
Author

Xmader commented Mar 16, 2020

(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicate.progress listeners added. Use emitter.setMaxListeners() to increase limit
(node:1738) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 replicated listeners added. Use emitter.setMaxListeners() to increase limit

I think we can simply ignore those things, only occur when receiving headers from the network.
Once headers are synchronized, listeners can be removed properly.

@Xmader
Copy link
Author

Xmader commented Mar 16, 2020

Adding concurrency limit on the _onMessage callback may be a better way to solve the MaxListenersExceededWarning, but sadly tests failed

@vaultec81 vaultec81 mentioned this pull request Mar 26, 2020
4 tasks
@vaultec81 vaultec81 added this to To Do in Release v0.24.0 Apr 4, 2020
@oed
Copy link
Contributor

oed commented Apr 7, 2020

What's the status of this? @Xmader @aphelionz
Any support you need?

@aphelionz
Copy link
Member

@oed @Xmader We're lagging a bit now, as I 0.42.0 is out now. Wondering if we should pivot to support that or the next 0.42.1 patch release when it happens.

@Xmader
Copy link
Author

Xmader commented Apr 7, 2020

According to its changelog, js-ipfs 0.42.0 did not change much from 0.41.
I don't think we need to do anything.

@aphelionz
Copy link
Member

If that's the case then why not support the latest? Is that what you mean?

@Xmader
Copy link
Author

Xmader commented Apr 7, 2020

If that's the case then why not support the latest? Is that what you mean?

Yes

@aphelionz
Copy link
Member

Ok great, we can republish all the transient dependencies as patch versions

@oed
Copy link
Contributor

oed commented Apr 17, 2020

Pinging here again :) Ipfs was updated to 0.43 but I believe that it should still work fine (only breaking changes to the http endpoint api).

@Xmader Xmader changed the title ready for js-ipfs 0.41 ready for js-ipfs > 0.41 Apr 17, 2020
@Xmader Xmader changed the title ready for js-ipfs > 0.41 ready for js-ipfs >= 0.41 Apr 17, 2020
@aphelionz
Copy link
Member

Adapting the packages from the bottom up has begun! I'm doing a sweep of all of them and fixing stuff as I go. Check out orbitdb-archive/orbit-db-test-utils#11

@dkent600
Copy link

dkent600 commented May 6, 2020

Any progress? This is really screwing us right now: ipfs/js-ipfs#2986

@aphelionz
Copy link
Member

I think a reasonable ETA on this is sometime next week

@aphelionz aphelionz moved this from To Do to In Progress in Release v0.24.0 May 12, 2020
@aphelionz aphelionz removed this from In Progress in Release v0.24.0 May 15, 2020
@dkent600
Copy link

Any latest status, thanks?

@phillmac
Copy link
Member

phillmac commented May 21, 2020

Afaik this PR is outdated, and superseded by #794.
js-ipfs shouldn't be included via orbit-db to be bundled because its only a dev dependency, not an actual dependency.
What issues are you seeing if you update the 3box dep to ipfs >=0.41?
I've been messing around with v0.43.3 for a few days, as far as I can tell orbit-db works just fine and any issues I've encountered are related to ipfs itself

@aphelionz
Copy link
Member

@dkent600 also there is an orbit-db@next npm tag that points to the latest release candidate that you can use

@dkent600
Copy link

@phillmac Thanks for your response.

js-ipfs shouldn't be included via orbit-db to be bundled because its only a dev dependency, not an actual dependency.

It seems that IPFS will no longer be a dependency at all, according to https://github.com/orbitdb/orbit-db/pull/794/files:

image

What issues are you seeing if you update the 3box dep to ipfs >=0.41?

I don't work for 3box, am just waiting for you to release the fix, and for 3box to pick it up.

The reason the devDependency is relevant is because the problem occurs when Heroku, in creating a review app, tries to copy all (dev)dependencies and ends up creating a "slug" that exceeds Heroku's max size limit, because of the problem in IPFS's packaging.

@aphelionz
Copy link
Member

js-ipfs will be transitively included via orbit-db-test-utils... is that not ok?

@dkent600
Copy link

js-ipfs will be transitively included via orbit-db-test-utils... is that not ok?

Should be fine as long as it is v >= 0.41

@aphelionz
Copy link
Member

Yup, it's ^0.43.0 and ^0.5.0

@dkent600
Copy link

@aphelionz
Copy link
Member

Still working through some pretty significant issues, so if you can use @next for now that would be awesome. I'll write an update in that thread to let folks know where I'm at

@oed
Copy link
Contributor

oed commented May 21, 2020

Thanks @aphelionz I think we will prepare for the update using @next and release it whenever you get the change to release the new version. What are the issues you are seeing? In orbitdb itself or the test suite?

@aphelionz aphelionz mentioned this pull request May 21, 2020
@aphelionz
Copy link
Member

Nice timing @oed. Just pinged you in #794

@aphelionz aphelionz added this to Backlog / Triage in Release 0.25.0 May 30, 2020
@aphelionz
Copy link
Member

Closing this as we are up to 0.46 now. Thank you for the effort @Xmader !!

@aphelionz aphelionz closed this Jul 7, 2020
Release 0.25.0 automation moved this from Backlog / Triage to Done Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

preparations for js-ipfs 0.41
5 participants