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.onDiscoveryPeer fails with Uncaught TypeError: Cannot read properties of undefined (reading 'id') #52

Closed
SgtPooki opened this issue Mar 14, 2023 · 3 comments

Comments

@SgtPooki
Copy link
Member

I'm trying to implement some ipfs-examples/helia-examples (part of #43) and I was trying to debug peer connections by listening to events using onDiscoveryPeer and it's failing with the error Uncaught TypeError: Cannot read properties of undefined (reading 'id')

@SgtPooki
Copy link
Member Author

This should probably be transferred to the appropriate libp2p repo, but I thought it appropriate to node issues with using helia while it's still being built up

@SgtPooki
Copy link
Member Author

this works though

  helia.libp2p.addEventListener('peer:discovery', (evt) => {
    console.log('Discovered %s', evt.detail.id.toString()) // Log discovered peer
  })

@achingbrain
Copy link
Member

Unfortunately I don't think you can transfer issues between orgs. Please can you examine the stack trace to see where the code tries to read the id property and open an issue in the appropriate repo.

achingbrain added a commit that referenced this issue Jan 8, 2024
Expands the tests to test using `secp256k1` and `RSA` keys as well
as `Ed25519` where possible.

Kubo doesn't support generating or importing `secp256k1` keys so
those tests are skipped, as are `RSA` keys for pubsub resolution since
the DHT needs to be enabled to resolve the public key component.
achingbrain pushed a commit that referenced this issue Jan 8, 2024
achingbrain added a commit that referenced this issue Jan 8, 2024
Updates all deps and fixes linting errors.

BREAKING CHANGE: uses multiformats v13 and helia v3
achingbrain pushed a commit that referenced this issue Jan 8, 2024
## [@helia/car-v2.0.0](https://github.com/ipfs/helia-car/compare/@helia/car-v1.0.4...@helia/car-v2.0.0) (2024-01-08)

### ⚠ BREAKING CHANGES

* uses multiformats v13 and helia v3

### Features

* update helia to v3 and multiformats to v13 ([#52](ipfs/helia-car#52)) ([6405c34](ipfs/helia-car@6405c34))
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

2 participants