question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught Error: unknown pubkey type: undefined

See original GitHub issue

Hi,

So when running the following script using node I get the following output bellow:

const {
    Tendermint34Client
} = require("@cosmjs/tendermint-rpc");

async function main() {
        const client = await Tendermint34Client.connect('https://rpc.cosmos.network:443');
        await client.blockResults(9170003)
}

main()

The following is the output:

/home/krubot/Projects/test/node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:81
            throw new Error(`unknown pubkey type: ${data.type}`);
                  ^

Error: unknown pubkey type: undefined
    at decodePubkey (/home/krubot/Projects/test/node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:81:19)
    at decodeValidatorUpdate (/home/krubot/Projects/test/node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:86:17)
    at Array.map (<anonymous>)
    at decodeBlockResults (/home/krubot/Projects/test/node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:120:58)
    at decodeBlockResults (/home/krubot/Projects/test/node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:371:16)
    at Tendermint34Client.doCall (/home/krubot/Projects/test/node_modules/@cosmjs/tendermint-rpc/build/tendermint34/tendermint34client.js:295:16)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async main (/home/krubot/Projects/test/test.js:8:2)

Might be missing something obvious here but can’t workout why its saying the pubkey type is undefined. Should also be using the latest and greatest package here of @cosmjs/tendermint-rpc:

$ npm install @cosmjs/tendermint-rpc@v0.28.4

added 1 package, removed 2 packages, changed 8 packages, and audited 386 packages in 13s

61 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Thanks in advance any help here would be great!

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
webmaster128commented, May 19, 2022

Do you think this is a bug in the TM response or should the fix be made here to unwrap the Sum nesting? I can submit a PR for the latter.

I think for Tendermint 0.34 the format in the API will not change and we should adapt the client. If you can work on a PR that would be much appreciated.

0reactions
webmaster128commented, May 20, 2022

Nice, thanks. Then let’s create a new type RpcPubkey2 or something like this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Error: Unknown dialect undefined" when deploying Strapi 4.0 ...
I had a similar issue when I was connecting pg locally and then realised my connection config was incorrect. When I replaced it...
Read more >
PHP 8: Setup PHP_SSH2 - John Hanley
This article describes a problem that I ran into while developing an SSH application with PHP 8.0 on Windows 10 and the solution....
Read more >
Troubleshooting Prysm
If you're running into unexpected outputs or errors, use the following checklist to check the status of your configuration. In many cases, this...
Read more >
ssh - Go Packages
PublicKey represents a public key using an unspecified algorithm. ... the client // should be presented a challenge even if the user is...
Read more >
Errors | Node.js v19.3.0 Documentation
How these errors are reported and handled depends entirely on the type of Error ... causing the Node.js process to report an uncaught...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found