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

panic: While parsing config: toml: expected newline but got U+0022 '"' #866

Closed
taitruong opened this issue Oct 18, 2023 · 3 comments
Closed

Comments

@taitruong
Copy link

I'm using v17.1.1 and did this:

export OUTPUT="json"
OUTPUT='{"":""}'
junod config node https://uni-rpc.reece.sh:443

Now junod config throws this error:

panic: While parsing config: toml: expected newline but got U+0022 '"'

goroutine 1 [running]:
github.com/CosmosContracts/juno/v17/cmd/junod/cmd.SetCustomEnvVariablesFromClientToml({{0x0, 0x0, 0x0}, {0x0, 0x0}, 0x0, {0x0, 0x0}, {0x342bf80, 0xc000f49ee0}, ...})
        github.com/CosmosContracts/juno/v17/cmd/junod/cmd/root.go:163 +0x20e
github.com/CosmosContracts/juno/v17/cmd/junod/cmd.NewRootCmd()
        github.com/CosmosContracts/juno/v17/cmd/junod/cmd/root.go:69 +0x7f8
main.main()
        github.com/CosmosContracts/juno/v17/cmd/junod/main.go:16 +0x1c

And now in client.toml this has changed: output = "{"":""}"

@taitruong
Copy link
Author

If I fix client.toml, and checking config by junod config, it still shows:

{
        "chain-id": "uni-6",
        "keyring-backend": "os",
        "output": "{\"\":\"\"}",
        "node": "https://uni-rpc.reece.sh:443",
        "broadcast-mode": "sync",
        "gas": "auto",
        "gas-prices": "",
        "gas-adjustment": "",
        "fees": "",
        "fee-granter": "",
        "fee-payer": "",
        "note": ""
}

Seems like junod is pointing to some other dir?!

@Reecepbcups
Copy link
Contributor

Reecepbcups commented Oct 18, 2023

Thanks for the report, this is reproducible on my end.

This is an SDK level issue as it does not use the envPrefix for setting the output.

It should require JUNOD_OUTPUT=json but does not. Also I do not think it is even supposed to set in this context? Either way these client configurations are upstream. Please make a report to: https://github.com/cosmos/cosmos-sdk.
It also should not auto set that when setting another variable

(This affects Gaia as well, not just Juno)

@taitruong
Copy link
Author

Created SDK issue: cosmos/cosmos-sdk#18332

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

No branches or pull requests

2 participants