Skip to content
This repository has been archived by the owner on Mar 18, 2020. It is now read-only.

AssertionError: Missing peerId. Use Peer.create(cb) to create one #3

Open
kumavis opened this issue Mar 1, 2018 · 7 comments
Open

Comments

@kumavis
Copy link
Member

kumavis commented Mar 1, 2018

https://sentry.io/metamask/mesh-testing/issues/475101665/

AssertionError: Missing peerId. Use Peer.create(cb) to create one
  at new PeerInfo (/mesh-testing/bundle.js:69583:5)
  at conn.getPeerInfo (/mesh-testing/bundle.js:24443:43)
  at Connection.getPeerInfo (/mesh-testing/bundle.js:18373:14)
  at Connection.getPeerInfo (/mesh-testing/bundle.js:18369:24)
  at Connection.getPeerInfo (/mesh-testing/bundle.js:18369:24)
...
(42 additional frame(s) were not displayed)
@kumavis
Copy link
Member Author

kumavis commented Mar 1, 2018

AssertionError: Missing peerId. Use Peer.create(cb) to create one
  at new PeerInfo(/mesh-testing/bundle.js:69583:5)
  at conn.getPeerInfo(/mesh-testing/bundle.js:24443:43)
  at Connection.getPeerInfo(/mesh-testing/bundle.js:18373:14)
  at Connection.getPeerInfo(/mesh-testing/bundle.js:18369:24)
  at Connection.getPeerInfo(/mesh-testing/bundle.js:18369:24)
  at finish(/mesh-testing/bundle.js:24439:12)
  at series(/mesh-testing/bundle.js:24343:5)
  at ? (/mesh-testing/bundle.js:3269:9)
  at ? (/mesh-testing/bundle.js:3210:16)
  at iterateeCallback(/mesh-testing/bundle.js:3039:17)
  at ? (/mesh-testing/bundle.js:3226:16)
  at ? (/mesh-testing/bundle.js:3266:13)
  at waterfall(/mesh-testing/bundle.js:24378:14)
  at ? (/mesh-testing/bundle.js:3210:16)
  at next(/mesh-testing/bundle.js:4152:29)
  at ? (/mesh-testing/bundle.js:3226:16)
  at Object.reader.read [as cb](/mesh-testing/bundle.js:72319:14)
  at drain(/mesh-testing/bundle.js:72614:23)
  at ? (/mesh-testing/bundle.js:72631:18)
  at ? (/mesh-testing/bundle.js:72592:7)
  at ? (/mesh-testing/bundle.js:72682:13)
  at ? (/mesh-testing/bundle.js:72682:13)
  at q.get(/mesh-testing/bundle.js:83482:16)
  at EventEmitter.ee.once(/mesh-testing/bundle.js:13115:16)
  at Object.onceWrapper(/mesh-testing/bundle.js:17760:30)
  at emitNone(/mesh-testing/bundle.js:17569:13)
  at EventEmitter.emit(/mesh-testing/bundle.js:17654:7)
  at Object.append(/mesh-testing/bundle.js:13095:10)
  at Socket.SIOSource.sio.on.err(/mesh-testing/bundle.js:83465:7)
  at Socket.Emitter.emit(/mesh-testing/bundle.js:12570:20)
  at Socket.onevent(/mesh-testing/bundle.js:82600:10)
  at Socket.onpacket(/mesh-testing/bundle.js:82558:12)
  at Manager.<anonymous>(/mesh-testing/bundle.js:12433:15)
  at Manager.Emitter.emit(/mesh-testing/bundle.js:12570:20)
  at Manager.ondecoded(/mesh-testing/bundle.js:82074:8)
  at Decoder.<anonymous>(/mesh-testing/bundle.js:12433:15)
  at Decoder.Emitter.emit(/mesh-testing/bundle.js:12570:20)
  at Decoder.add(/mesh-testing/bundle.js:83219:12)
  at Manager.ondata(/mesh-testing/bundle.js:82064:16)
  at Socket.<anonymous>(/mesh-testing/bundle.js:12433:15)
  at Socket.Emitter.emit(/mesh-testing/bundle.js:12570:20)
  at Socket.onPacket(/mesh-testing/bundle.js:14454:14)
  at WS.<anonymous>(/mesh-testing/bundle.js:14271:10)
  at WS.Emitter.emit(/mesh-testing/bundle.js:12570:20)
  at WS.Transport.onPacket(/mesh-testing/bundle.js:14889:8)
  at WS.Transport.onData(/mesh-testing/bundle.js:14881:8)
  at WebSocket.ws.onmessage(/mesh-testing/bundle.js:16007:10)

@daviddias
Copy link

related - ipfs/js-ipfs#1221

@kumavis
Copy link
Member Author

kumavis commented Mar 1, 2018

same stack different format

/mesh-testing/bundle.js in new PeerInfo at line 69583:5
/mesh-testing/bundle.js in conn.getPeerInfo at line 24443:43
/mesh-testing/bundle.js in Connection.getPeerInfo at line 18373:14
/mesh-testing/bundle.js in Connection.getPeerInfo at line 18369:241
/mesh-testing/bundle.js in finish at line 24439:12
/mesh-testing/bundle.js in series at line 24343:5
/mesh-testing/bundle.js at line 3269:9
/mesh-testing/bundle.js at line 3210:16
/mesh-testing/bundle.js in iterateeCallback at line 3039:17
/mesh-testing/bundle.js at line 3226:16
/mesh-testing/bundle.js at line 3266:13
/mesh-testing/bundle.js in waterfall at line 24378:14
/mesh-testing/bundle.js at line 3210:16
/mesh-testing/bundle.js in next at line 4152:29
/mesh-testing/bundle.js at line 3226:16
/mesh-testing/bundle.js in Object.reader.read [as cb] at line 72319:14
/mesh-testing/bundle.js in drain at line 72614:23
/mesh-testing/bundle.js at line 72631:18
/mesh-testing/bundle.js at line 72592:7
/mesh-testing/bundle.js at line 72682:131
/mesh-testing/bundle.js in q.get at line 83482:16
/mesh-testing/bundle.js in EventEmitter.ee.once at line 13115:16
/mesh-testing/bundle.js in Object.onceWrapper at line 17760:30
/mesh-testing/bundle.js in emitNone at line 17569:13
/mesh-testing/bundle.js in EventEmitter.emit at line 17654:7
/mesh-testing/bundle.js in Object.append at line 13095:10
/mesh-testing/bundle.js in Socket.SIOSource.sio.on.err at line 83465:7
/mesh-testing/bundle.js in Socket.Emitter.emit at line 12570:20
/mesh-testing/bundle.js in Socket.onevent at line 82600:10
/mesh-testing/bundle.js in Socket.onpacket at line 82558:12
/mesh-testing/bundle.js in Manager.<anonymous> at line 12433:15
/mesh-testing/bundle.js in Manager.Emitter.emit at line 12570:20
/mesh-testing/bundle.js in Manager.ondecoded at line 82074:8
/mesh-testing/bundle.js in Decoder.<anonymous> at line 12433:15
/mesh-testing/bundle.js in Decoder.Emitter.emit at line 12570:20
/mesh-testing/bundle.js in Decoder.add at line 83219:12
/mesh-testing/bundle.js in Manager.ondata at line 82064:16
/mesh-testing/bundle.js in Socket.<anonymous> at line 12433:15
/mesh-testing/bundle.js in Socket.Emitter.emit at line 12570:20
/mesh-testing/bundle.js in Socket.onPacket at line 14454:14
/mesh-testing/bundle.js in WS.<anonymous> at line 14271:10
/mesh-testing/bundle.js in WS.Emitter.emit at line 12570:20
/mesh-testing/bundle.js in WS.Transport.onPacket at line 14889:8
/mesh-testing/bundle.js in WS.Transport.onData at line 14881:8
/mesh-testing/bundle.js in WebSocket.ws.onmessage at line 16007:10

@daviddias
Copy link

daviddias commented Mar 1, 2018

The issue is on:

https://github.com/libp2p/js-libp2p-secio/blob/master/src/index.js#L37-L46

I suspect that something goes wrong with the SECIO handshake and the node never learns about the PeerId. Apparently this only happens when dialing to go-ipfs nodes.

@pgte @mkg20001 does this look like something you could handle?

@victorb
Copy link

victorb commented Mar 7, 2018

This is something I see sometimes once every 2 minutes. Right now, running a node is basically impossible. Would be good to have this fixed real soon as it stops you from being able to just be online and connect with peers.

@daviddias
Copy link

Glad that we started ipfs/js-ipfs#804 with the goal of exactly dogfooding js-ipfs daemon and finding these ourselves :)

@daviddias
Copy link

This was solved with libp2p/js-libp2p-secio#101

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

No branches or pull requests

3 participants