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

Base64 error for non-padded attributes in decodeTxData #1539

Closed
mdyring opened this issue Jan 8, 2024 · 2 comments
Closed

Base64 error for non-padded attributes in decodeTxData #1539

mdyring opened this issue Jan 8, 2024 · 2 comments

Comments

@mdyring
Copy link

mdyring commented Jan 8, 2024

I'm seeing the below error popping up (often) against Osmosis mainnet.

base64-js is expecting encoded data to always be "=" padded, but this now seems to break.

Error: Invalid string. Length must be a multiple of 4
    at getLens (.../node_modules/base64-js/index.js:26:11)
    at Object.toByteArray (.../node_modules/base64-js/index.js:55:14)
    at fromBase64 (.../node_modules/@cosmjs/encoding/build/base64.js:36:21)
    at decodeAttribute (.../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:43:40)
    at Array.map (<anonymous>)
    at decodeAttributes (.../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:48:53)
    at decodeEvent (.../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:53:40)
    at Array.map (<anonymous>)
    at decodeEvents (.../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:58:49)
    at decodeTxData (.../node_modules/@cosmjs/tendermint-rpc/build/tendermint34/adaptor/responses.js:66:31
@mdyring mdyring changed the title Base64 error in decodeTxData Base64 error for non-padded attributes in decodeTxData Jan 8, 2024
@webmaster128
Copy link
Member

Osmosis requires a Tendermint 0.37 client since the upgrade. See osmosis-labs/osmojs#71. The latest version of CosmJS should do the auto-detection correctly behind the scenes.

@mdyring
Copy link
Author

mdyring commented Jan 9, 2024

Thank you @webmaster128 - changed Tendermint34Client to Tendermint37Client and it works like a charm.

@mdyring mdyring closed this as completed Jan 9, 2024
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

2 participants