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

issue = "invalid string. length must be a multiple of 4" #3541

Closed
in-eth opened this issue Jun 12, 2023 · 33 comments
Closed

issue = "invalid string. length must be a multiple of 4" #3541

in-eth opened this issue Jun 12, 2023 · 33 comments
Assignees
Labels
component:relayer Related to relayer. type:bug Something isn't working
Milestone

Comments

@in-eth
Copy link

in-eth commented Jun 12, 2023

Description

The relayer fails when following the IBC tutorial.

The ignite relayer connect command returns the error message:

invalid string. length must be a multiple of 4

What version are you using?

Ignite CLI version: v0.26.1-dev
Ignite CLI build date: 2023-06-05T14:58:40Z
Ignite CLI source hash: c63fd3e*
Ignite CLI config version: v1
Cosmos SDK version: v0.47.2
Your OS: linux
Your arch: amd64
Your go version: go version go1.19.3 linux/amd64

@in-eth in-eth changed the title Following docs error Following docs error (request) Jun 12, 2023
@in-eth in-eth changed the title Following docs error (request) Following docs error Jun 12, 2023
@0xkaz
Copy link

0xkaz commented Jun 19, 2023

I am having the same problem.

My version of ignite is 0.27.1 ( v0.26.0 ? ) and my version of CosmosSDK is 0.47.X.
When I used previous ignite version ( I forgot; but cosmos sdk was 0.46.X), there was no prob.

$ ignite version
Ignite CLI version: v0.27.1
Ignite CLI build date: 2023-06-13T13:42:09Z
Ignite CLI source hash: 4acd1f1
Ignite CLI config version: v1
Cosmos SDK version: v0.47.3
Your OS: darwin
Your arch: arm64
Your Node.js version: v18.15.0
Your go version: go version go1.20.2 darwin/arm64

@in-eth
Copy link
Author

in-eth commented Jun 19, 2023

I executed the command on the Ubuntu system without encountering any errors.I run the command in Ubuntu system, and got no error like that.

@0xkaz
Copy link

0xkaz commented Jun 19, 2023

With v0.25.2 ( cosmossdk 0.46.6 ) on macosx ( apple m2 ), no error.

Ignite CLI version: v0.25.2
Ignite CLI build date: 2022-11-21T18:08:22Z
Ignite CLI source hash: 8888014
Cosmos SDK version: v0.46.6
Your OS: darwin
Your arch: arm64
Your Node.js version: v18.15.0
Your go version: go version go1.20.2 darwin/arm64

@0xkaz
Copy link

0xkaz commented Jun 19, 2023

I executed the command on the Ubuntu system without encountering any errors.I run the command in Ubuntu system, and got no error like that.

@mdanny1209

I have tried "v0.27.1" on linux. but not working.

I use hermes instead, it's working.

@Pantani
Copy link
Collaborator

Pantani commented Jun 22, 2023

@0xkaz if you are using the v0.47.2 of the cosmos-sdk try to update to v0.47.3. Maybe it will solve the issue

@Akagi201
Copy link

Akagi201 commented Jun 25, 2023

@Pantani I use v0.47.3, still got the same error
@mdanny1209 And you'd better modify the issue's title to something meaningful, like ignite relayer connect failed
my side error:

❯ ignite relayer connect
✘ Invalid string. Length must be a multiple of 4

ignite version:

✖  ignite version
Ignite CLI version:             v0.27.1-nightly
Ignite CLI build date:          2023-06-19T14:03:04Z
Ignite CLI source hash:         d3dae760347f85c2164634498636a432c5e046d0*
Ignite CLI config version:      v1
Cosmos SDK version:             v0.47.3
Your OS:                        darwin
Your arch:                      arm64
Your Node.js version:           v18.16.0
Your go version:                go version go1.20.5 darwin/arm64
Your uname -a:                  Darwin akmacstudio.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64
Your cwd:                       /Users/akagi201/src/github.com/Akagi201/planet
Is on Gitpod:                   false

@Akagi201
Copy link

@0xkaz Could you provide how to use hermes, instead of ignite relayer connect

@limingxie
Copy link

me too

$ ignite version
Ignite CLI version: v0.27.1
Ignite CLI build date: 2023-06-13T13:42:09Z
Ignite CLI source hash: 4acd1f1
Ignite CLI config version: v1
Cosmos SDK version: v0.47.3
Your OS: darwin
Your arch: amd64
Your Node.js version: v18.16.0
Your go version: go version go1.20.4 darwin/amd64
Your uname -a: Darwin bogon 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:51:50 PDT 2023; root:xnu-8796.121.2~5/RELEASE_X86_64 x86_64
Your cwd: /Users/limingxie
Is on Gitpod: false

@BadUncleX
Copy link

BadUncleX commented Jun 26, 2023

I tested several versions, here is conclusion for ignite relayer connect:

0.26.1 version is good.
all other versions are bad. (22,24, 27.1, 27.1-nightly)

invalid string. length must be a multiple of 4

@BornPsych
Copy link

BornPsych commented Jun 28, 2023

Does anyone get any hack around this error? I am too getting this error and don't know how to move ahead

" ✘ Invalid string. Length must be a multiple of 4 "

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:           v18.7.0
Your go version:                go version go1.19.5 linux/amd64
Your uname -a:                  Linux sunil 5.19.0-23-generic #24-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 14 15:39:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Your cwd:                       /root/Yogesh-ignite-cli/athena
Is on Gitpod:                   false

@in-eth in-eth changed the title Following docs error issue = "invalid string. length must be a multiple of 4" Jun 28, 2023
@limingxie
Copy link

There is no such problem

Ignite CLI version: v0.25.2

@BornPsych
Copy link

BornPsych commented Jun 28, 2023

Can you please find the other workaround?

Since I can't downgrade my ignite version because

Ignite (v0.25.2) comes with cosmos-sdk(v0.46.6) and I am working on a project with cosmwasm (wasmd) and

CosmWasm does not support officially the v0.46 line of the SDK.

For the matter of fact that v0.26.0, v0.25.2, v0.25.1 comes with v0.46 SDK

@limingxie
Copy link

pray to solve problems....ㅠㅠ

@llwinner
Copy link

I am having the same problem. When I used the 0.0.0.0:4500 in earth.yml and mars.yml, got faucet can not operational error. I change 0.0.0.0 to 127.0.0.1 and receive the "invalid string. length must be a multiple of 4" error. I'll try 0.26.2.
And within 0.27.1, I can't receive any errors in raw_log field, I follow the doc about blog. When I type some wrong prompt in purpose, the raw_log field is empty, anybody get the same error?

@BornPsych
Copy link

BornPsych commented Jun 30, 2023

Even if I try to transfer the tokens without creating the module it still shows the same error... from the default bank module

@lshoo
Copy link

lshoo commented Jun 30, 2023

I have tested several versions of Ignite, including 0.25.2 (sdk 0.46.6), 0.26.1 (0.46.7), and 0.27.1 (0.47.3), but encountered the same error in all of them.

ignite relayer connect
Invalid string. Length must be a multiple of 4

and

 ignite version
Ignite CLI version:     v0.25.2
Ignite CLI build date:  2022-11-21T18:08:22Z
Ignite CLI source hash: 8888014f4cc05f9c92119200f57cad5080d42a3e
Cosmos SDK version:     v0.46.6
Your OS:                linux
Your arch:              amd64
Your Node.js version:   v18.16.0
Your go version:        go version go1.20.4 linux/amd64
Your uname -a:          Linux tb-lshoo 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Your cwd:               /home/lshoo/software
Is on Gitpod:           false

@mindcarver
Copy link

I also encountered the same problem, I am an ignite with 0.27.1 and Cosmos sdk0.47.3, but I can execute Cosmos sdk0.46.7 with an ignite with 0.27.1. Why

@t2dk49580
Copy link

Ignite CLI version: v0.27.1
Ignite CLI build date: 2023-06-13T13:42:09Z
Ignite CLI source hash: 4acd1f1
Ignite CLI config version: v1
Cosmos SDK version: v0.47.3
Your OS: linux
Your arch: amd64
Your Node.js version: v16.9.0
Your go version: go version go1.20.5 linux/amd64
Your uname -a: Linux sai 5.15.0-76-generic #83~20.04.1-Ubuntu SMP Wed Jun 21 20:23:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Your cwd: /home/sai
Is on Gitpod: false

$ ignite relayer connect
✘ Invalid string. Length must be a multiple of 4

@jeronimoalbi
Copy link
Member

Ignite relayer command intention is to help during development, it works by wrapping confio/ts-relayer; While updating it I found that ts-relayer is using a client for Tendermint v0.34 which I believe might be the issue because it would be incompatible with the latest Ignite CLI version.

As mentioned before using Hermes is a good idea.
We are planning to integrate with Hermes.

@atmoner
Copy link

atmoner commented Oct 6, 2023

I tried all possible configurations and not work...

On the other hand, I know this error from the front and it can be corrected by using Tendermint37Client instead of Tendermint34Client on cosmJs

Exactly the same error (Length must be a multiple of 4)

image

@jeronimoalbi
Copy link
Member

I tried all possible configurations and not work...

On the other hand, I know this error from the front and it can be corrected by using Tendermint37Client instead of Tendermint34Client on cosmJs

Exactly the same error (Length must be a multiple of 4)

The issue should be fixed in #3601 but at the moment is only available in the nightly release

@jeronimoalbi
Copy link
Member

I executed the command on the Ubuntu system without encountering any errors.I run the command in Ubuntu system, and got no error like that.

@mdanny1209
I have tried "v0.27.1" on linux. but not working.
I use hermes instead, it's working.

I installed the hermes Could you tell me how to use hermes instead of 'ignite relayer connect'? :)

We are working on an Ignite App in ignite/apps#3 that will make it easier to run Hermes during development

@Pantani Pantani added this to the v0.30 milestone Oct 17, 2023
@atmoner
Copy link

atmoner commented Oct 20, 2023

The issue should be fixed in #3601 but at the moment is only available in the nightly release

image

I just tried with the nightly release (v0.27.2-dev), still the same problem...
Don't hesitate to ping me if you find a solution and need to test it! 👍

@Pantani Pantani modified the milestones: v0.30, v0.29 Oct 31, 2023
@taryune
Copy link

taryune commented Nov 1, 2023

In v0.27.1, the package.json generated by ignite g ts-client uses the old version 0.27.0 of CosmJS.
I think the error occurs because this version is not compatible with CometBFT v0.37.x.
In my case, upgrading the version of CosmJS in package.json to 0.31.x solved the problem.

From:

"@cosmjs/proto-signing": "0.27.0"
"@cosmjs/stargate": "0.27.0"

To:

"@cosmjs/proto-signing": "^0.31",
"@cosmjs/stargate": "^0.31",

Diff: https://github.com/mycel-domain/mycel-sdk-ts/pull/2/files

Related Issue:
cosmos/cosmjs#1353

@Pantani
Copy link
Collaborator

Pantani commented Nov 1, 2023

@clockworkgr I assigned you because it is related the IBC update into the ts-relayer

@Pantani Pantani moved this from Backlog to In Progress in Ignite CLI Masterboard Nov 1, 2023
@jeronimoalbi
Copy link
Member

PR #3726 updates CosmJS

@salmad3 salmad3 added type:bug Something isn't working component:relayer Related to relayer. labels Nov 26, 2023
@julienrbrt
Copy link
Member

Is this still relevant? I think we can close this.

@atmoner
Copy link

atmoner commented Dec 20, 2023

Is this still relevant? I think we can close this.

Yep, is still relevant... Same problem
Tomorrow I will make a detailed report with the new version of ignite

Please don't close the issue

@julienrbrt
Copy link
Member

julienrbrt commented Dec 20, 2023

Is this still relevant? I think we can close this.

Yep, is still relevant... Same problem

Tomorrow I will make a detailed report with the new version of ignite

Please don't close the issue

Alright, are you testing with v28.0.0 / latest main?

@atmoner
Copy link

atmoner commented Dec 20, 2023

Alright, are you testing with v28.0.0 / latest main?

Hmmm... I use this version
image

Dev version? ok... let me update it....

@atmoner
Copy link

atmoner commented Dec 21, 2023

Alright, are you testing with v28.0.0 / latest main?

My bad! It work perfecty with v28.0.0

image

Can be closed =)

@Pantani Pantani moved this from In Progress to Done in Ignite CLI Masterboard Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:relayer Related to relayer. type:bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests