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

crashes - ReferenceError: CustomEvent is not defined - with stack trace #2920

Open
ducksandgoats opened this issue Jan 22, 2025 · 1 comment
Labels
need/triage Needs initial labeling and prioritization

Comments

@ducksandgoats
Copy link

ducksandgoats commented Jan 22, 2025

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

Severity: Critical, at least High

Description:

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

Steps to reproduce the error:

clone the repo https://github.com/HybridWare/hybrid-browser
use npm install
then use npm run start
and it crashes because of libp2p
it crashes on both linux and windows, i do not have a mac system so i can't test it on mac
this is the stack trace it gives

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)
@ducksandgoats ducksandgoats added the need/triage Needs initial labeling and prioritization label Jan 22, 2025
@ducksandgoats ducksandgoats changed the title ReferenceError: CustomEvent is not defined - with stack trace crashes - ReferenceError: CustomEvent is not defined - with stack trace Jan 23, 2025
@ducksandgoats
Copy link
Author

ducksandgoats commented Jan 23, 2025

i disabled ipfs/libp2p on my app and my app works now. so there is some issue with ipfs/libp2p. i either get this ReferenceError or i get Error: Cannot sign message, no private key present when i enable ipfs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

1 participant