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

Generated vue frontend is broken in 0.27.1 #3686

Closed
lxgr-linux opened this issue Oct 7, 2023 · 7 comments · Fixed by #3726
Closed

Generated vue frontend is broken in 0.27.1 #3686

lxgr-linux opened this issue Oct 7, 2023 · 7 comments · Fixed by #3726
Assignees
Labels
type:bug Something isn't working
Milestone

Comments

@lxgr-linux
Copy link
Contributor

Describe the bug
The generated vue frontend is broken in 0.27.1.
Produces:

IgntSend.vue:255 Error: TxClient:sendMsgSend: Could not broadcast Tx: Invalid string. Length must be a multiple of 4
    at Object.sendMsgSend (module.ts:101:11)
    at async sendTx (IgntSend.vue:244:22)

when sending requests from the frontend.
This is likely not related to #3638 but rather related to the cosmjs librarie versions used in the generated ts-client just not being suited for cosmos-sdk v0.47.3.

To reproduce

  • Scaffold and start a new chain and frontend:
ignite scaffold chain testchain
cd ./testchain
ignite scaffold vue
ignite generate composables
ignite chain build
ignite chain init
cd ./vue
npm i
npm run dev & testchaind start
  • Go to localhost:5174 in your web-browser
  • Log in with Keplr
  • Copy cosmos1... address to clipboard
  • Transfer some stake or credits to user:
testchaind tx bank send alice cosmos1... 10stake --from alice
  • Go back to frontend and transfer some stake (what ever) back to alice
  • Get error in console:
IgntSend.vue:255 Error: TxClient:sendMsgSend: Could not broadcast Tx: Invalid string. Length must be a multiple of 4
    at Object.sendMsgSend (module.ts:101:11)
    at async sendTx (IgntSend.vue:244:22)

What version are you using?

Ignite CLI version:		v0.27.1
Ignite CLI build date:		2023-06-13T13:42:09Z
Ignite CLI source hash:		4acd1f185afb6d8d1a837e54f04c091121cfae01
Ignite CLI config version:	v1
Cosmos SDK version:		v0.47.3
Your OS:			linux
Your arch:			amd64
Your Node.js version:		v20.8.0
Your go version:		go version go1.21.1 linux/amd64
Your uname -a:			Linux archframework 6.5.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 23 Sep 2023 22:55:13 +0000 x86_64 GNU/Linux
Your cwd:			/home/arch
Is on Gitpod:			false
@nlsui
Copy link

nlsui commented Oct 13, 2023

I have the same problem, will there be a fix soon?

@julienrbrt
Copy link
Member

This seems likely because it is using a too old version.
Which version cosmjs is being used?

@lxgr-linux
Copy link
Contributor Author

The automatically set versions. 0.27.0 for ts client and 0.29.3 in the generated vue frontend.

@julienrbrt
Copy link
Member

Okay, it should be using v0.30 or at best v0.31: cosmos/cosmjs#1353 (comment)
cc @clockworkgr

@lxgr-linux
Copy link
Contributor Author

When manually pulling up the versions in ts-client, the error still appears at 0.29.3 and the autogenerated code starts to break at 0.30.0.

@MaFeLP
Copy link

MaFeLP commented Oct 13, 2023

I just tried to scaffold a project as well and had the same issue.

Thanks for your great project!

@patrickwieth
Copy link

This basically stops us from upgrading to cosmos-sdk 0.47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

7 participants