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

Uncaught exception: Cannot read properties of undefined (reading '0') #5733

Closed
nflaig opened this issue Jul 7, 2023 · 3 comments · Fixed by #5736
Closed

Uncaught exception: Cannot read properties of undefined (reading '0') #5733

nflaig opened this issue Jul 7, 2023 · 3 comments · Fixed by #5736

Comments

@nflaig
Copy link
Member

nflaig commented Jul 7, 2023

Describe the bug

After upgrade to libp2p 0.45.9, there are frequent uncaught exceptions

Jul-05 13:35:02.052[]                error: uncaughtException: Cannot read properties of undefined (reading '0')
TypeError: Cannot read properties of undefined (reading '0')
    at Libp2pNode.PeerDiscovery.onDiscoveredPeer (file:///home/devops/goerli/lodestar/packages/beacon-node/src/network/peers/discover.ts:276:60)
    at Libp2pNode.[nodejs.internal.kHybridDispatch] (node:internal/event_target:762:20)
    at Libp2pNode.dispatchEvent (node:internal/event_target:704:26)
    at Libp2pNode.dispatchEvent (file:///home/devops/goerli/lodestar/node_modules/@libp2p/interfaces/src/events.ts:64:26)
    at Libp2pNode.safeDispatchEvent (file:///home/devops/goerli/lodestar/node_modules/@libp2p/interfaces/src/events.ts:79:17)
    at EventEmitter.<anonymous> (file:///home/devops/goerli/lodestar/node_modules/libp2p/src/libp2p.ts:102:14)
    at EventEmitter.[nodejs.internal.kHybridDispatch] (node:internal/event_target:762:20)
    at EventEmitter.dispatchEvent (node:internal/event_target:704:26)
    at EventEmitter.dispatchEvent (file:///home/devops/goerli/lodestar/node_modules/@libp2p/interfaces/src/events.ts:64:26)
    at EventEmitter.Libp2pNode.events.dispatchEvent (file:///home/devops/goerli/lodestar/node_modules/libp2p/src/libp2p.ts:65:30) Cannot read properties of undefined (reading '0'

Expected behavior

No uncaught exception

Steps to reproduce

No response

Additional context

No response

Operating system

Linux

Lodestar version or commit hash

7280234

@dapplion
Copy link
Contributor

dapplion commented Jul 7, 2023

CC @wemeetagain

@wemeetagain
Copy link
Member

onDiscoveredPeer is called when a libp2p emits a newly discovered peer via a configured peer discovery module.

I believe the only peer discovery module (controlled by libp2p) that we may enable is mdns.
Do you have mdns enabled?

@nflaig
Copy link
Member Author

nflaig commented Jul 7, 2023

Do you have mdns enabled?

No, I am using default network options

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

Successfully merging a pull request may close this issue.

3 participants