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

RPC event subscription problems #1099

Closed
mappum opened this issue Jan 11, 2018 · 5 comments
Closed

RPC event subscription problems #1099

mappum opened this issue Jan 11, 2018 · 5 comments

Comments

@mappum
Copy link
Contributor

mappum commented Jan 11, 2018

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.

@ebuchman
Copy link
Contributor

Just tested and it works with "tm.event = 'NewBlock'"

Please re-open if you still having trouble.

@ebuchman
Copy link
Contributor

#1100

@minhxtran
Copy link

If i am using curl to do this what would it look like?

@mappum
Copy link
Contributor Author

mappum commented Nov 6, 2018

@minhxtran You won't be able to do this through curl, since event subscription only works through Websocket and not plain HTTP.

You may want to look at the js-tendermint repo.

@minhxtran
Copy link

@minhxtran You won't be able to do this through curl, since event subscription only works through Websocket and not plain HTTP.

You may want to look at the js-tendermint repo.

Thanks for the clarification.

Cashmaney pushed a commit to scrtlabs/tendermint that referenced this issue Aug 2, 2023
…dermint#1099)

Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](docker/setup-buildx-action@v2.8.0...v2.9.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

3 participants