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

helia/libp2p crashes, referenceError - stack trace #724

Open
ducksandgoats opened this issue Jan 24, 2025 · 0 comments
Open

helia/libp2p crashes, referenceError - stack trace #724

ducksandgoats opened this issue Jan 24, 2025 · 0 comments

Comments

@ducksandgoats
Copy link

Version: helia: 5.2.0/@libp2p/kad-dht 14.2.0
Platform: both linux and windows 64-bit
Subsystem: helia/libp2p/pubsub/kad-dht

Severity: Critical/High

what i did:
my repo https://github.com/HybridWare/hybrid-browser, use npm install and install all dependencies, and then use npm run start to start the electron app

what happened:
it crashes and the stack trace shows the issue is with libp2p

what i expected:
start the electron app as it should, but instead it crashes and libp2p seems to be the issue

i disabled ipfs/libp2p in my app and now my app works. below is the stack trace for the error that crashes ipfs/libp2p.

ReferenceError: CustomEvent is not defined
    at TypedEventEmitter.safeDispatchEvent (file:///C:/Proj/Prod/hybrid-browser/node_modules/libp2p/node_modules/@libp2p/interface/dist/src/event-target.js:53:39)
    at #emitIfUpdated (file:///C:/Proj/Prod/hybrid-browser/node_modules/@libp2p/peer-store/dist/src/index.js:169:25)
    at PersistentPeerStore.patch (file:///C:/Proj/Prod/hybrid-browser/node_modules/@libp2p/peer-store/dist/src/index.js:107:32)  
    at async DefaultRegistrar.unhandle (file:///C:/Proj/Prod/hybrid-browser/node_modules/libp2p/dist/src/registrar.js:78:9)      
    at async WebRTCTransport.stop (file:///C:/Proj/Prod/hybrid-browser/node_modules/@libp2p/webrtc/dist/src/private-to-private/transport.js:63:9)
    at async file:///C:/Proj/Prod/hybrid-browser/node_modules/libp2p/dist/src/components.js:24:13
    at async Promise.all (index 8)
    at async Proxy._invokeStartableMethod (file:///C:/Proj/Prod/hybrid-browser/node_modules/libp2p/dist/src/components.js:21:9)  
    at async Proxy.stop (file:///C:/Proj/Prod/hybrid-browser/node_modules/libp2p/dist/src/components.js:41:9)
    at async Libp2p.stop (file:///C:/Proj/Prod/hybrid-browser/node_modules/libp2p/dist/src/libp2p.js:203:9)

i also get the error Error: Cannot sign message, no private key present sometimes too that crashes ipfs as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant