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
Halt when accessing CID served on a nodejs helia node from a browser helia node #229
Comments
Thanks for submitting this detailed issue @bellbind! @achingbrain I think this another example of a locking, initially described here: #99, I never got around reproducing the test case as it would lock the test runner too. I believe the underlying cause is the same.
I think at that point it's in the store, so it's serviceable right away. |
On my manual tracing, the halt point of Digging into await calls, difference between
I added
Trace of
Trace of
|
I found
|
After updated helia-2.0.1, the helia node on nodejs cannot access with cid served by the helia node on browser (run on node-20.5.1 of m1mac). On
|
There are 3 helia nodes that are:
nodejs
: served pinned content of the CIDcreateHelia()
browser
: accessing with the CIDchromium
page ofplaywright
esbuild
from localnode_modules
middle
: connected from bothnodejs
andbrowser
helia nodesnodejs
connectsmiddle
withnodejs.libp2p.dialProtocol(middle.libp2p.getMultiaddrs()[0], nodejs.libp2p.getProtocols())
browser
connects withbootstrap()
config thatlist
is onlymiddle.libp2p.getMultiaddrs()
I tried to resolve content data of a
cid
served on nodejs helia nodes from browser helia nodes.But browser helia nodes halt when
unixfs(browser).stat(cid)
orunixfs(browser).cat(cid)
.(
libp2p.contentRouting.findProviders(cid)
can resolve peerId and multiaddrs of the nodejs helia node)It is success that accessing CID from nodejs to browser.
And after accessed from a nodejs node to a browser node, it can access CID from same browser node to same nodejs node.
The complete codes are in https://gist.github.com/bellbind/5565c22255ae87a3c8e9948b467ee894 :
case-halt.mjs
: halting case that resolve cid from browser to nodejscase-success.mjs
: successed case that resolved other cid from nodejs to browser before resolving from browser to nodejsother files:
nodejs.js
andbrowser.js
: code of creating and connecting helia nodesmiddle
withhttp
servernpm-libs.js
: source ofnpm-browser.js
foresbuild
(complete command line options inpackage.json
)index.html
:importmap
only empty html file for loadingplaywright
pageshttp-server
package to serve thisindex.html
and the builtnpm-browser.js
byhttp:
URLspackage.json
: minimal dependencies and esbuild command lineMy environment is node-v20.5.1-darwin-arm64.tar.gz on M1 macbook air.
The text was updated successfully, but these errors were encountered: