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

Cannot log in #1512

Closed
nloyola opened this issue Sep 4, 2024 · 8 comments
Closed

Cannot log in #1512

nloyola opened this issue Sep 4, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@nloyola
Copy link

nloyola commented Sep 4, 2024

Describe the bug
Cannot log in.

To Reproduce
Steps to reproduce the behavior:

  1. Start ncspot in Linux terminal
  2. Select "Login" on startup screen
  3. Enter login credentials when prompted

Expected behavior
Shown this message: Connection error: Login failed with reason: Bad credentials

I have used the same login credentials on the Spotify website and was able to log in.

System (please complete the following information):

  • OS: Debian GNU/Linux 12 (bookworm)
  • Terminal: Alacritty
  • Version: 1.1.2
  • Installed from: cargo

Backtrace/Debug log

Instructions on how to capture debug logs: https://github.com/hrkfdn/ncspot#debugging

!!! the above link is broken !!! no such section on the page !!!

[2024-09-04][09:39:24] [ncspot::authentication] [INFO] Attempting to resolve credentials via username/password commands
[2024-09-04][09:39:24] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:24] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:24] [mio::poll] [TRACE] registering event source with poller: token=Token(0), interests=READABLE
[2024-09-04][09:39:24] [mio::poll] [TRACE] registering event source with poller: token=Token(1), interests=READABLE
[2024-09-04][09:39:25] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:25] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:25] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:25] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:26] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:26] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:26] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:26] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:26] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:26] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:26] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:26] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:26] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:26] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:26] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:26] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:27] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:27] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:28] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:28] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:28] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:28] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:29] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:29] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:29] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:29] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:30] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:30] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:30] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:30] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:30] [cursive_core::views::list_view] [DEBUG] Available: 18
[2024-09-04][09:39:30] [cursive_core::views::list_view] [DEBUG] Offset: 9
[2024-09-04][09:39:30] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:30] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:30] [ncspot::spotify] [DEBUG] No HTTP proxy set
[2024-09-04][09:39:30] [librespot_core::session] [INFO] Connecting to AP "ap2-gew4.spotify.com:4070"
[2024-09-04][09:39:30] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:30] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:32] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:32] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:32] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:32] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:33] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:33] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:34] [cursive_buffered_backend] [DEBUG] output_all_to_backend started
[2024-09-04][09:39:34] [cursive_buffered_backend] [DEBUG] output_all_to_backend finished
[2024-09-04][09:39:34] [ncspot] [ERROR] Didn't obtain any credentials
@nloyola nloyola added the bug Something isn't working label Sep 4, 2024
@haruInDisguise
Copy link
Contributor

haruInDisguise commented Sep 4, 2024

Directly login in through credentials does not work anymore for now. See this comment for a workaround.
Move the generated credentials.json file into the librespot folder in ncspots cache directory. If you don't know where it is, just run ncspot info.
See #1500

@nloyola
Copy link
Author

nloyola commented Sep 4, 2024

Thanks @haruInDisguise. It worked.

@Skaterjess2012
Copy link

@haruInDisguise that also worked for me. thanks!

@hrkfdn
Copy link
Owner

hrkfdn commented Sep 6, 2024

Duplicate of #1500

@hrkfdn hrkfdn marked this as a duplicate of #1500 Sep 6, 2024
@hrkfdn hrkfdn closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2024
@Denyreal
Copy link

Directly login in through credentials does not work anymore for now. See this comment for a workaround. Move the generated credentials.json file into the librespot folder in ncspots cache directory. If you don't know where it is, just run ncspot info. See #1500

i maybe a total dumb person but there are not clear instructions how to install and generate that credentials.json via librespot-auth . Could someone talk to the plebs ?

@nloyola
Copy link
Author

nloyola commented Sep 12, 2024

@Denyreal this is what you have to do:

  1. Clone https://github.com/dspearson/librespot-auth
  2. build it with cargo build --release
  3. run it like this ./target/release/librespot-auth --name "Second Laptop" --class=computer
  4. Open the Spotify app on the same computer
  5. On the Spotify app, log in (you may need to log out first)
  6. On the Spotify app, click on Connect to a device
  7. Select "Second Laptop": in the terminal that was running librespot-auth you will see a message like Credentials saved: credentials.json
  8. Copy credentials.json to $HOME/.cache/ncspot/librespot
  9. Open ncspot

I did this on Debian bookworm. It may be different if you are using a different OS.

@Ahwxorg
Copy link

Ahwxorg commented Oct 13, 2024

Is there some other way to do this? librespot-auth does not seem to work for me...

@osheas1atwit
Copy link

With Arch and the version of ncspot installed via yay unfortunately this does not work. I have tried credentials generated with both cargo run and cargo build --release, and putting them in the cache folder does not help. I still get prompted to enter credentials and are told they are bad no matter what.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants