-
DescriptionThe error goes away when setting the environment variable --> WEBHOOK_INCLUDE_PUBLIC_IP: 0 Stack Tracevanilla-plus | 2024-02-23 11:18:24 - [Valheim][INFO]: Starting server...
vanilla-plus | [ODIN][INFO] - Setting up start scripts...
vanilla-plus | [ODIN][INFO] - Sending discord notification <3
vanilla-plus | thread 'main' panicked at src/odin/notifications/enums/notification_event.rs:67:49:
vanilla-plus | called `Result::unwrap()` on an `Err` value: AddrParseError(SocketV4)
vanilla-plus | stack backtrace:
vanilla-plus | 0: rust_begin_unwind
vanilla-plus | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
vanilla-plus | 1: core::panicking::panic_fmt
vanilla-plus | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
vanilla-plus | 2: core::result::unwrap_failed
vanilla-plus | at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/result.rs:1649:5
vanilla-plus | 3: odin::notifications::enums::notification_event::parse_server_name_for_notification
vanilla-plus | 4: <odin::notifications::discord::DiscordWebHookBody as core::convert::From<&odin::notifications::NotificationMessage>>::from
vanilla-plus | 5: odin::notifications::enums::notification_event::NotificationEvent::send_custom_notification
vanilla-plus | 6: odin::notifications::enums::notification_event::NotificationEvent::send_notification
vanilla-plus | 7: odin::commands::start::invoke
vanilla-plus | 8: odin::main
vanilla-plus | note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Is it somehow because the env ADDRESS is not set? I can see from source that src/odin/utils/fetch_public_address.rs--> fetch_public_address() expects this Variable to be set. EditIt seems to be added in https://github.com/mbround18/valheim-docker/pull/774/files#diff-87de5bbe5413b2e057cf468061315358b8ef3a958d2eca9fad4db0bcfcf1288f at line: 43 of entrypoint.sh I don't see the docs reflecting this though. pub fn fetch_public_address() -> Result<SocketAddrV4, AddrParseError> {
let current_port: u16 = fetch_var("PORT", "2456").parse().unwrap();
let current_ip = match env::var("ADDRESS") {
Ok(found_address) => found_address,
Err(_) => {
// Make request
match reqwest::blocking::get("https://api.ipify.org") {
Ok(result) => String::from(&result.text().unwrap()),
// Fallback to local IP address
Err(_) => String::from("127.0.0.1"),
}
}
};
SocketAddrV4::from_str(&format!("{}:{}", current_ip, current_port + 1))
}
|
Beta Was this translation helpful? Give feedback.
-
Seems to be the same issue I'm having :(. Version 2.3.2 is the last one where the public IP setting works. |
Beta Was this translation helpful? Give feedback.
-
@fclante reworking this logic atm #811 If you dont mind could you try |
Beta Was this translation helpful? Give feedback.
@fclante reworking this logic atm #811
If you dont mind could you try
mbround18/valheim:sha-c5eddb9