Closed mjp0 closed 4 years ago
Hey @markopolojarvi, there are currently a handful of timing issues in the master branch related to mounts, but I believe all of them are currently fixed in the hypercore-8
branch (alongside many more updates).
I'm planning on merging hypercore-8 into master really soon and publishing another prerelease, so mind seeing if that branch works for you?
@andrewosh Hey, I tried hypercore-8 branch but ended up with another error. It's triggered by replication apparently.
(node:4044) UnhandledPromiseRejectionWarning: Error: AssertionError
at assert (G:\Development\P2P\Experiments\hyperdrive\node_modules\nanoassert\index.js:21:17)
at Object.initialize (G:\Development\P2P\Experiments\hyperdrive\node_modules\noise-protocol\handshake-state.js:187:3)
at new SimpleHandshake (G:\Development\P2P\Experiments\hyperdrive\node_modules\simple-handshake\index.js:19:22)
at SimpleHandshake (G:\Development\P2P\Experiments\hyperdrive\node_modules\simple-handshake\index.js:8:50)
at new ProtocolHandshake (G:\Development\P2P\Experiments\hyperdrive\node_modules\simple-hypercore-protocol\lib\handshake.js:17:18)
at SimpleProtocol._onkeypair (G:\Development\P2P\Experiments\hyperdrive\node_modules\simple-hypercore-protocol\index.js:62:23)
at new SimpleProtocol (G:\Development\P2P\Experiments\hyperdrive\node_modules\simple-hypercore-protocol\index.js:50:12)
at new ProtocolStream (G:\Development\P2P\Experiments\hyperdrive\node_modules\hyperdrive\node_modules\hypercore-protocol\index.js:291:18)
at Hyperdrive.replicate (G:\Development\P2P\Experiments\hyperdrive\node_modules\hyperdrive\index.js:724:20)
at replicate (G:\Development\P2P\Experiments\hyperdrive\sanity_test.js:15:21)
(node:4044) 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: 1)
(node:4044) [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.
I finally had time to debug this. The error with hypercore-8 turned out to be because of the new isInitiator
parameter. Errors disappeared after I set those correctly.
I'm testing out new hyperdrive and I ran into a weird problem with
mount()
.My code looks this:
And it crashes like this:
Any ideas why this is happening? I checked the unit tests and my code looks almost identical.