SpoticordMusic / spoticord

The official Spoticord Music Discord bot
https://spoticord.com/
GNU Affero General Public License v3.0
47 stars 7 forks source link

[BUG] Error in user data setup: environment variable not found #38

Open nennneko5787 opened 1 week ago

nennneko5787 commented 1 week ago

Describe the bug After building the bot from source code and setting environment variables, I get an Error in user data setup: environment variable not found, presense is not updated and commands are not responding

To Reproduce Steps to reproduce the behavior:

  1. Build the bot using the cargo build --release command
  2. Place the .env file and set environment variables as per README
  3. run the ./target/release/spoticord command
  4. See error

Expected behavior Error log

ubuntu@ip-172-31-32-225:~/spoticord$ ./target/release/spoticord
[2024-09-18T13:55:39Z INFO spoticord]Today is a good day!
[2024-09-18T13:55:39Z INFO spoticord]- Spoticord
[2024-09-18T13:55:42Z INFO spoticord::bot]Successfully logged in as SpotiPlayer
Error in user data setup: environment variable not found

Screenshots image

Additional context This occurs with or without sudo

ZorgordianInZilo commented 7 hours ago

Also getting this:

{66679050-F65F-405A-8095-D4C525769C44}

ZorgordianInZilo commented 6 hours ago

I added a Redis Cache server to my stack and that issue went away after assigning it to KV_URL environment variable.

DaXcess commented 3 hours ago

The kv feature is enabled by default, which requires you to supply a KV_URL for stats collection. For simple self hosting, this feature isn't needed, and can be disabled by using --no-default-features during build/run.