foundry icon indicating copy to clipboard operation
foundry copied to clipboard

The application panicked (crashed).

Open L0GYKAL opened this issue 4 years ago • 4 comments

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 at :

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering. zsh: IOT instruction (core dumped) forge build"

L0GYKAL avatar Sep 18 '22 11:09 L0GYKAL

@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?

rkrasiuk avatar Sep 18 '22 12:09 rkrasiuk

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"

mattsse avatar Sep 19 '22 15:09 mattsse

I don't have the files anymore, but yes I think I did that

L0GYKAL avatar Sep 20 '22 08:09 L0GYKAL

closing as this was due to malformed toml

mattsse avatar Sep 20 '22 12:09 mattsse