chainapsis / keplr-example

https://example.keplr.app
61 stars 63 forks source link

Error when using with cosmJS.getAccount() #20

Open ap-justin opened 2 years ago

ap-justin commented 2 years ago

Hi! I'd really appreciate some help on resolving this. I am trying to use Keplr with cosmJS as demonstrated here https://stackblitz.com/edit/react-ts-pezzyd?file=Keplr.tsx

and gets this error when calling cosmJS.getAccount

auth.ts:72 Uncaught (in promise) Error: Unexpected response data format
    at Object.account (auth.ts:72)
    at async SigningCosmosClient.getAccount (cosmosclient.ts:222)
    at async connect (VM48 Keplr.tsx:37)
Thunnini commented 2 years ago

Hmm... I think this is an error from cosmjs, not from Keplr. Try using the stargate version cosmjs instead of launchpad. If that doesn't work, it might be better to ask in the cosmjs repo.

ap-justin commented 2 years ago

Thank you! @Thunnini. I will try your suggestion