Skip to content

RPC event subscription problems #1099

Closed
@mappum

Description

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Tendermint version (use tendermint version or git rev-parse --verify HEAD if installed from source):
0.15.0

ABCI app (name for built-in, URL for self-written if it's publicly available):
gaia

Merkleeyes version (use git rev-parse --verify HEAD, skip if you don't use it):

Environment:

  • OS (e.g. from /etc/os-release): macOS High Sierra
  • Install tools:
  • Others:

What happened:
When subscribing to events via websocket RPC, I'm getting a single empty JSON object as a response, and no event responses.

What you expected to happen:
An error if I'm using the pubsub query incorrectly, otherwise I should see event data.

How to reproduce it (as minimally and precisely as possible):

main.js:

let Tendermint = require('tendermint')
let rpc = Tendermint('ws://localhost:46657')

rpc.subscribe({ query: "tm.events.type = 'NewBlock'" }, (err, event) => {
  console.log(err, event)
})
$ npm install tendermint
$ node main.js

Anything else do we need to know:
I can't find docs for this, but a cursory reading of the code made me think this was the correct new way to subscribe.

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