Skip to content

"Unhandled 'error' event" when attempting to seed a hypercore which is neither drive nor bee #48

Description

@HDegroote

I believe this is either a bug or an incorrect error message, it depends on whether the client is supposed to be usable for sharing hypercores which are neither hyperdrives nor hyperbees.

When I try to seed a hypercore, I get the following error:

  hyp seed hyper://70e...6712/
  node:events:342
        throw er; // Unhandled 'error' event
        ^
  
  Error: key is required
      at Object.encodingLength (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/hyperspace-mirroring-service/rpc/messages.js:52:34)
      at Parser.send (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/arpeecee/parser.js:138:24)
      at RPC._push (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/arpeecee/index.js:159:25)
      at RPC._request (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/arpeecee/index.js:203:10)
      at Method.request (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/arpeecee/index.js:247:29)
      at HRPCServiceMirror.mirror (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/hyperspace-mirroring-service/rpc/index.js:63:25)
      at HyperspaceMirroringClient.mirror (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/hyperspace-mirroring-service/client.js:57:32)
      at command (file:///.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/lib/commands/seed.js:32:29)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Object.obj.command (file:///.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/bin/hyp.js:108:7)
  Emitted 'error' event on HRPCSession instance at:
      at RPC.<anonymous> (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/hyperspace-mirroring-service/rpc/index.js:117:101)
      at RPC.emit (node:events:377:35)
      at WritableState.afterDestroy (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/streamx/index.js:439:19)
      at RPC._destroy (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/arpeecee/index.js:190:5)
      at WritableState.updateNonPrimary (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/streamx/index.js:187:16)
      at WritableState.update (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/streamx/index.js:172:70)
      at updateWriteNT (/.nvm/versions/node/v16.1.0/lib/node_modules/@hyperspace/cli/node_modules/streamx/index.js:479:6)
      at processTicksAndRejections (node:internal/process/task_queues:82:21)

When I create a hyperdrive with hyp I can seed it without any issues.

Version info:
hyp --version 1.5.1

Running hyperspace/3.19.0 linux-x64 node-v16.1.0
Server is already running with the following status
API Version : 1.15.1
Holepunchable : true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions