nwesterhausen / valheim-discordconnector

A plugin to connect a Valheim server to a discord webhook.
https://discord-connector.valheim.games.nwest.one/
MIT License
27 stars 13 forks source link

webhook works locally but not on dedicated server? [BUG] #298

Open petey212 opened 3 months ago

petey212 commented 3 months ago

So - we just migrated our mp world to a new dedicated server and now the webhook is failing to send messages? I've double-checked the configuration, even stripped back to default and it's loading the config but then not sending the messages.

I've tested locally and it still works there, so this is less a bug and more of a further info required as I can't find this anywhere (not in your notes or discords).

What port does the mod need to be open? I assumed 443 but wasn't sure.

Happy to do any further testing as required or send configs.

nwesterhausen commented 3 months ago

There should be no requirement besides it being able to send a web request to discord. It's possible it is having trouble doing that? Do you have access to the logs, are you seeing any warning/errors there?

petey212 commented 3 months ago

all the logs I have access to attached plus my json dump :-) config-dump.json LogOutput.log stdout.log

nwesterhausen commented 2 months ago

Can you set the "Toggles.DebugMessages" option to True (in the toggles config file) and run again to provide more visibility into the calls to the Discord API to send the webhook messages? From what you sent it is unclear why it isn't working, so we'll have to try and get more information.

petey212 commented 2 months ago

done.

config-dump.json LogOutput.log stdout.log

nwesterhausen commented 1 week ago

I wasn't able to determine anything, but just did update the logging regarding webhooks. Can you see if the version here gives us improved results? If it doesn't, we should be able to get better info from the BepInEx/config/games.nwest.valheim-discord-connector/vdc.log file.

Artifact here: https://github.com/nwesterhausen/valheim-discordconnector/actions/runs/11600610353

petey212 commented 1 week ago

welp, I tried but no dice still. Is there a file it reads off that it needs permissions to? anything along those lines? I mean, it's apparently not firewall but it must be some kind of server config issue, right?

Anyway, here are the new logs:

config-dump.json LogOutput.log stdout.log vdc.log

nwesterhausen commented 1 week ago

So weird. it's like it doesn't even try to do anything

nwesterhausen commented 1 week ago

There's only one file it's trying to read/write and that would be the records.db in the same folder as its config.

I don't even see it attempting to make the requests to discord to send the message which is the strange part. We should see it trying and failing in the VDC log. One thing that's not normal is immediately after it loads up, it is closing the litedb connection which it should only do during its shutdown procedure.