The application panicked (crashed).
Component
Forge
Have you ensured that all of these are up to date?
- [X] Foundry
- [X] Foundryup
What version of Foundry are you on?
forge 0.2.0 (c2816ca 2022-09-14T00:12:29.080011374Z)
What command(s) is the bug in?
forge build
Operating System
Linux
Describe the bug
I added an ".env" file to store my Etherscan-key.
The cast command wasn't working for some reason (not linked to the etherscan key).
I tried removing the Etherscan-key constant from the .env file, then I typed "forge build" and forge crashed.
"Message: called Result::unwrap() on an Err value: ExtractConfigError { error: Error { tag: Tag(Default, 4), profile: Some(Profile(Uncased { string: "default" })), metadata: None, path: [], kind: Message("invalid TOML value, did you mean to use a quoted string? at line 5 column 21"), prev: Some(Error { tag: Tag(Default, 4), profile: Some(Profile(Uncased { string: "default" })), metadata: None, path: [], kind: Message("invalid TOML value, did you mean to use a quoted string? at line 5 column 21"), prev: Some(Error { tag: Tag(Default, 19), profile: Some(Profile(Uncased { string: "default" })), metadata: None, path: [], kind: Message("invalid TOML value, did you mean to use a quoted string? at line 5 column 21"), prev: Some(Error { tag: Tag(Default, 20), profile: Some(Profile(Uncased { string: "default" })), metadata: None, path: [], kind: Message("invalid TOML value, did you mean to use a quoted string? at line 5 column 21"), prev: None }) }) }) } }
Location: config/src/lib.rs:426
This is a bug. Consider reporting it at https://github.com/foundry-rs/foundry
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: __libc_start_main
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering. zsh: IOT instruction (core dumped) forge build"
@L0GYKAL the error seems to suggest that your foundry.toml is invalid. did you surround the api key with quotes when you were pasting it back into the config file?
we definitely need to improve the error here and ideally extract only the message here
"invalid TOML value, did you mean to use a quoted string? at line 5 column 21"
I don't have the files anymore, but yes I think I did that
closing as this was due to malformed toml