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

Non UTF-8 Go code #48

Open
Buckram123 opened this issue Jan 24, 2024 · 3 comments · May be fixed by #51
Open

Non UTF-8 Go code #48

Buckram123 opened this issue Jan 24, 2024 · 3 comments · May be fixed by #51

Comments

@Buckram123
Copy link

I just got this panic:

thread 'deposit_lands' panicked at .../.cargo/registry/src/index.crates.io-6f17d22bba15001f/test-tube-0.3.0/src/runner/result.rs:222:18:
Go code must encode valid UTF-8 string: Utf8Error { valid_up_to: 127, error_len: Some(1)

You can see it here:

let content_string = CString::new(content)
.unwrap()
.to_str()
.expect("Go code must encode valid UTF-8 string")
.to_string();

Converting error to the lossy string helped me figure out the issue:

[.../.cargo/registry/src/index.crates.io-6f17d22bba15001f/test-tube-0.3.0/src/runner/result.rs:221] lossy = "failed to execute message; message index: 0: dispatch: submessages: dispatch: submessages: failed to update grant with key \u{1}\u{14}\u{f6ec} ��Gl�O�=\u{1e}�\u{18}N�L�* �=\u{10}�\u{11}�V\t�\u{10}\u{1b}��mr>����G��tn�R\u{b}j��W/osmosis.concentratedliquidity.v1beta1.MsgCreatePosition: authorization not found"

I would like to at least get the lossy error in case of the Non UTF-8 strings

@Buckram123
Copy link
Author

#50 (comment)

@iboss-ptk I would like to contribute on this! Would you prefer just always lossy string or different error type if it's non-utf8?

@Buckram123 Buckram123 linked a pull request Mar 8, 2024 that will close this issue
@iboss-ptk
Copy link
Collaborator

Hey! Wonder what creates non-utf8 content, what does that look like?

@Buckram123
Copy link
Author

Hey! Wonder what creates non-utf8 content, what does that look like?

The error that is in description was from smart contract trying to use authz grant, but that grant didn't exist. Grant keys are non utf-8

See #51

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

Successfully merging a pull request may close this issue.

2 participants