Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AuthenticationError out of nowhere #54

Open
gjorgdy opened this issue Aug 9, 2024 · 8 comments · May be fixed by #55
Open

AuthenticationError out of nowhere #54

gjorgdy opened this issue Aug 9, 2024 · 8 comments · May be fixed by #55

Comments

@gjorgdy
Copy link

gjorgdy commented Aug 9, 2024

Without initially changing my login info the bot started randomly throwing this error. After changing my password, resetting the bot token and completely redeploying the bot, the issue persists.

Error creating session: AuthenticationError(LoginFailed(BadCredentials))
stack backtrace:
   0:     0x7fc796892955 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h56c396e6ec1a6d25
   1:     0x7fc7968d911b - core::fmt::write::h8d9f62e4196a6251
   2:     0x7fc79688f30f - std::io::Write::write_fmt::hfeda4b672809964d
   3:     0x7fc79689272e - std::sys_common::backtrace::print::h92792842c9200fcf
   4:     0x7fc796893b89 - std::panicking::default_hook::{{closure}}::h4fa40162feafd3ea
   5:     0x7fc7968938cd - std::panicking::default_hook::h5a52bd4fbc34f99c
   6:     0x7fc796894023 - std::panicking::rust_panic_with_hook::h33e85abbf3f92159
   7:     0x7fc796893f04 - std::panicking::begin_panic_handler::{{closure}}::h6e89e0968a11dcc7
   8:     0x7fc796892e19 - std::sys_common::backtrace::__rust_end_short_backtrace::h6f80b72bde67d6fa
   9:     0x7fc796893c37 - rust_begin_unwind
  10:     0x7fc795bd6193 - core::panicking::panic_fmt::hb37c2646452904e3
  11:     0x7fc795bd6626 - core::result::unwrap_failed::h95d9de04097dd2c4
  12:     0x7fc795c756d3 - tokio::park::thread::CachedParkThread::block_on::hd895f2033877e8c0
  13:     0x7fc795cb912c - aoede::main::ha78334ca8f072fe4
  14:     0x7fc795d5eea3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h9b5c3c6c0dbe6e5d
  15:     0x7fc795dd8d59 - std::rt::lang_start::{{closure}}::h56f4d6a086b65f76
  16:     0x7fc796887ded - std::rt::lang_start_internal::ha99684538b0582d2
  17:     0x7fc795cb9345 - main```
@ChrisMoriarty
Copy link
Contributor

I'm seeing the same, and I'm using the docker container if that's useful.

@gerrowadat
Copy link

My guess is this is server-side - I'm seeing this with current and also previous version of Aoede.

@shiftybitshiftr
Copy link

It appears basic auth for apps has been deprecated by Spotify:
librespot-org/librespot#1308 (comment)

@codetheweb
Copy link
Owner

Happy to accept a PR that updates the README / credential handling.

@shiftybitshiftr shiftybitshiftr linked a pull request Aug 19, 2024 that will close this issue
@tomich
Copy link
Contributor

tomich commented Sep 5, 2024

Hey @shiftybitshiftr . I just built your branch. The bot doesn't work if I don't input my user AND password. And it still claims failed auth and Spotify ends up resetting my password. Did you implement the new auth in a ready usable state or do I need to do something else?

As it is right now I dont think this is mergable as it doesn't work out of the box.

Maybe I'm missing something?

EDIT: I'm super stupid. Sorry. I built the main and zeroconf branches and was testing the main one. My bad. Will test zeroconf now. Sorry for my mistake.

@shiftybitshiftr
Copy link

shiftybitshiftr commented Sep 5, 2024 via email

@tomich
Copy link
Contributor

tomich commented Sep 5, 2024

My mistake @shiftybitshiftr . Sorry. I built main and zeroconf branches and was using the main-based docker file.

I've built from the zeroconf to test. I'm building the Dockerfile (if that info is useful in any way).

I still need a SPOTIFY_USERNAME even if it's not mentioned in the readme.

After setting SPOTIFY_USERNAME it doesn't work because I believe the docker container is running inside the docker network. That is going to be a problem for people running this bot in production environments outside a local home network. I'll check what ports I need for the spotify autodiscovery to work (I guess 5353 UDP) and if I need to set any special routing in addition. I don't think 5353/udp will be a simple thing to share from within Docker environments.

@shiftybitshiftr
Copy link

shiftybitshiftr commented Sep 5, 2024

Thanks for the feedback, let's move discussion into #55.

You need to set --net=host for docker run or network_mode: host for compose to get the mDNS to propagate (although it ultimately depends on how your local network is configured).
We will save the generated auth blob to file so it can be run in a remote environment after initial setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants