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

Bug🐛: getOfflineSigner() of cosmos-kit library throwing : "Cannot read properties of undefined (reading 'client')" #105

Open
kombos opened this issue Feb 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@kombos
Copy link
Member

kombos commented Feb 11, 2023

Describe the bug.

using the getOfflineSigner() from the useChain() feature of cosmos-kit is leading to the error:
"Cannot read properties of undefined (reading 'client')"

Describe the steps to reproduce the behavior

The test conditions have been reproduced in the branch: testBranch1

the getOfflineSigner() is being used to get the signer in the file: data/txApi.js, in the function sendIbcTokenToMantle().
This function is being called in views/GravityToEthBridge.js file, under handleSubmit2() function.

to reproduce this error, run the dev instance of this app, go to "Bridge" main menu item, add amount value in form of 'gravity bridge' then click on "Send to Mantle Chain" button. The error log received:

Expected behavior.

the ibc transaction from gravitybridge chain to assetmantle chain, should go through without incident.

Screenshots.

error generated in chrome browser console :

next-dev.js?3515:20 Error during transaction:  Cannot read properties of undefined (reading 'client')

window.console.error @ next-dev.js?3515:20

GravityToEthBridge.js?a307:121 action.payload:  0.003

GravityToEthBridge.js?a307:336 availableBalanceIBCToken:  50000

GravityToEthBridge.js?a307:121 action.payload:  0.003

GravityToEthBridge.js?a307:336 availableBalanceIBCToken:  50000

GravityToEthBridge.js?a307:292 response:  null  error:  TypeError: Cannot read properties of undefined (reading 'client')

    at getOfflineSigner (client.js?fded:21:1)

    at clientMethodAssert (hooks.js?2a7b:110:1)

    at getOfflineSigner (hooks.js?2a7b:147:1)

    at eval (txApi.js?906a:552:26)

    at step (tslib.es6.js?a65a:102:1)

    at Object.eval [as next] (tslib.es6.js?a65a:83:46)

    at asyncGeneratorStep (_async_to_generator.mjs?55c2:3:1)

    at _next (_async_to_generator.mjs?55c2:25:1)

    at eval (_async_to_generator.mjs?55c2:32:1)

    at new Promise (<anonymous>)

    at eval (_async_to_generator.mjs?55c2:21:1)

    at sendIbcTokenToMantle (txApi.js?906a:529:7)

    at eval (GravityToEthBridge.js?a307:284:61)

    at step (tslib.es6.js?a65a:102:1)

    at Object.eval [as next] (tslib.es6.js?a65a:83:46)

    at asyncGeneratorStep (_async_to_generator.mjs?55c2:3:1)

    at _next (_async_to_generator.mjs?55c2:25:1)

    at eval (_async_to_generator.mjs?55c2:32:1)

    at new Promise (<anonymous>)

    at eval (_async_to_generator.mjs?55c2:21:1)

    at handleSubmit2 (GravityToEthBridge.js?a307:253:33)

    at HTMLUnknownElement.callCallback (react-dom.development.js?ac89:4164:1)

    at Object.invokeGuardedCallbackDev (react-dom.development.js?ac89:4213:1)

    at invokeGuardedCallback (react-dom.development.js?ac89:4277:1)

    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js?ac89:4291:1)

    at executeDispatch (react-dom.development.js?ac89:9041:1)

    at processDispatchQueueItemsInOrder (react-dom.development.js?ac89:9073:1)

    at processDispatchQueue (react-dom.development.js?ac89:9086:1)

    at dispatchEventsForPlugins (react-dom.development.js?ac89:9097:1)

    at eval (react-dom.development.js?ac89:9288:1)

    at batchedUpdates$1 (react-dom.development.js?ac89:26140:1)

    at batchedUpdates (react-dom.development.js?ac89:3991:1)

    at dispatchEventForPluginEventSystem (react-dom.development.js?ac89:9287:1)

    at dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay (react-dom.development.js?ac89:6465:1)

    at dispatchEvent (react-dom.development.js?ac89:6457:1)

    at dispatchDiscreteEvent (react-dom.development.js?ac89:6430:1)

Operating environment

macOS Ventura

Additional context

No response

@kombos kombos added the bug Something isn't working label Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant