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

Bad Credentials #1500

Closed
lm12000 opened this issue Aug 12, 2024 · 64 comments
Closed

Bad Credentials #1500

lm12000 opened this issue Aug 12, 2024 · 64 comments
Labels
bug Something isn't working

Comments

@lm12000
Copy link

lm12000 commented Aug 12, 2024

Describe the bug
I can't login with my Spotify Family Account.
I am assuming it has to do with the Account being a shared one in a Family Plan ? (Which is Premium.)

To Reproduce
Steps to reproduce the behavior:

  1. Try Login.
  2. "Connection error: Login failed with reason: Bad Credentials"

Expected behavior
Being able to use the application.

System (please complete the following information):

  • OS: Linux Pop!_OS 22.04 LTS
  • Installed from: flatpak

PS: I am really new to Linux so please forgive me if this is just a simple fix or something.
I did try the actual username of the account as well as the email linked to it. Both did not work.

@lm12000 lm12000 added the bug Something isn't working label Aug 12, 2024
@Apollo-XIV
Copy link

having the same issue here, also on a family account. It's worked for me in the past but now doesn't, although I'm unsure of when that changed. I've checked multiple times and my password works through the browser and I'm confident I'm entering it correctly.

@hrkfdn
Copy link
Owner

hrkfdn commented Aug 13, 2024

It's probably related to this: librespot-org/librespot#1308

Could be we need to change our login method

@lm12000
Copy link
Author

lm12000 commented Aug 13, 2024

having the same issue here, also on a family account. It's worked for me in the past but now doesn't, although I'm unsure of when that changed. I've checked multiple times and my password works through the browser and I'm confident I'm entering it correctly.

This is exactly my problem as well.
I was now somehow logged out of my spotify on my phone etc. too, which is strange.
When I tried logging back in my password wasnt working anymore.
I could eventually log back in over a link through email from spotify.
Now I changed the password and it still does not work. Weird.

@lm12000
Copy link
Author

lm12000 commented Aug 13, 2024

It's probably related to this: librespot-org/librespot#1308

Could be we need to change our login method

Ah I see, so its a bigger problem with the login method entirely, not just a Family Plan thing?

@signaleleven
Copy link

Seems like it was rolled out for different users at different times. I have a partner plan and I was also affected today (and Spotify Connect Home assistant addon, which uses librespot like ncspot - retried so much I got forced to change my password) whereas in the librespot issue it looks like it's being going on for over 2 months for other users.

I would follow the issue linked above :(

@cyqsimon
Copy link
Contributor

Affected me today on a family plan. Seems like Spotify broke their own API.

@geekmuse
Copy link

Regular premium user here (no Family plan) and am experiencing the same issue.

@donwlewis
Copy link

Yup. I also ran into this issue.

@psaumur
Copy link

psaumur commented Aug 16, 2024

Am using a Family Plan and had ncspot working on Debian.

When I tried authenticating manually on Mint Edge, it failed a few times, until I copied over the credentials.json file from the working Debian instance.

After listening for a while, Spotify decided to reset my password so my credentials were no longer good.

Trying to reset my credentials for both Debian and Mint Edge have failed today.


Backtrace.log

   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: main
  13: <unknown>
  14: __libc_start_main
  15: <unknown>

panicked at /run/build/ncspot/cargo/vendor/librespot-core-0.4.2/src/connection/mod.rs:146:46:
EOF

@RobinCamarasa
Copy link

Same issue here using a Duo plan

@tomasApo
Copy link

Same issue here with family plan

@psaumur
Copy link

psaumur commented Aug 18, 2024

As others have already mentioned, the credentials generated via the zeroconf authentication mechanism appear long-lived and is the officially sanctioned way to authenticate Spotify Connect devices. I noted some people using downstream clients (those depending upon librespot) were having difficulty in generating the credentials.json file, so I thinly wrapped just this functionality and tried to make it as trivial to use as I could think; maybe it helps others who stumble here with similar problems.

Downloading the Linux Spotify client, running Dominic's Rust/Cargo application (link above) in the background, pulls out working credentials. Everything works again.

@lm12000
Copy link
Author

lm12000 commented Aug 18, 2024

As others have already mentioned, the credentials generated via the zeroconf authentication mechanism appear long-lived and is the officially sanctioned way to authenticate Spotify Connect devices. I noted some people using downstream clients (those depending upon librespot) were having difficulty in generating the credentials.json file, so I thinly wrapped just this functionality and tried to make it as trivial to use as I could think; maybe it helps others who stumble here with similar problems.

Downloading the Linux Spotify client, running Dominic's Rust/Cargo application (link above) in the background, pulls out working credentials. Everything works again.

I tried this and got the credentials.json but after putting it in the .cache/ncspot/librespot as well as the .config/ncspot/credentials I still get prompted to put in my credentials at the login screen. Am I doing this wrong?

@psaumur
Copy link

psaumur commented Aug 18, 2024

I tried this and got the credentials.json but after putting it in the .cache/ncspot/librespot as well as the .config/ncspot/credentials I still get prompted to put in my credentials at the login screen. Am I doing this wrong?

Credentials, for ncspot, by default, go:

~/.var/app/io.github.hrkfdn.ncspot/cache/ncspot/librespot/

or wherever the "cache" path is when you type ncspot info + /librespot/

@lm12000
Copy link
Author

lm12000 commented Aug 18, 2024

I tried this and got the credentials.json but after putting it in the .cache/ncspot/librespot as well as the .config/ncspot/credentials I still get prompted to put in my credentials at the login screen. Am I doing this wrong?

Credentials, for ncspot, by default, go:

~/.var/app/io.github.hrkfdn.ncspot/cache/ncspot/librespot/

or wherever the "cache" path is when you type ncspot info + /librespot/

Wow! thank you very much, that did work.

@hrkfdn hrkfdn changed the title Bad Credentials: Family Account Problem ? Bad Credentials Aug 19, 2024
@chocoblin
Copy link

As others have already mentioned, the credentials generated via the zeroconf authentication mechanism appear long-lived and is the officially sanctioned way to authenticate Spotify Connect devices. I noted some people using downstream clients (those depending upon librespot) were having difficulty in generating the credentials.json file, so I thinly wrapped just this functionality and tried to make it as trivial to use as I could think; maybe it helps others who stumble here with similar problems.

Downloading the Linux Spotify client, running Dominic's Rust/Cargo application (link above) in the background, pulls out working credentials. Everything works again.

can you please write out the steps for a noob like me to follow? I don;t understand what to do to install librespot-auth even after going to that page

@cyqsimon
Copy link
Contributor

@chocoblin git clone then cargo run. After that follow README.

@Zardexd
Copy link

Zardexd commented Aug 27, 2024

Having this issue with app/dev.alextren.Spot/x86_64/stable flatpak too , just logged with same credentials from browser.

freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Aug 27, 2024
Changelog: https://github.com/hrkfdn/ncspot/releases/tag/v1.1.2

This update don't fix the login issue reporting bad credential
reported here: hrkfdn/ncspot#1500
@thecisco
Copy link

@cyqsimon What exactly is git clone and cargo run? I just got into Linux and got the flatpak ver. of ncspot and I am having the same issue. Sorry for not being knowledgeable in these topics, that is why I must inquire.

@cyqsimon
Copy link
Contributor

@cyqsimon What exactly is git clone and cargo run? I just got into Linux and got the flatpak ver. of ncspot and I am having the same issue. Sorry for not being knowledgeable in these topics, that is why I must inquire.

Use Google first please 🤦.

@cyqsimon
Copy link
Contributor

Not trying to be condescending, but questions like these waste my time and yours. Mine because I could be doing something else; yours because there are plenty of answers online that do a better job than I ever could.

@Zardexd
Copy link

Zardexd commented Aug 28, 2024

What exactly is git clone and cargo run? I just got into Linux and got the flatpak ver. of ncspot and I am having the same issue. Sorry for not being knowledgeable in these topics, that is why I must inquire.

Allows to clone (download) git repository. Repo's are used to store, collaborate and manage code changes.

Cargo is a package and build system for Rust programming language. Allows you to assemble a program from its sources (usually stored in repo's), or install packets/libraries that are used throughout the process of developing software.

Don't be afraid to google things, without it you can't really survive as newbie. Most of questions were already answered. Use Archwiki, other resources. And welcome to Linux

And about this credentials issue, just wait until devs fix everything, there is nothing you can do and most likely you did nothing wrong. Just sudden changes in spotify's API, and it broke things. Use web version for now, or official app.

@roblox-model
Copy link

For some reason librespot-auth's device doesnt appear / doesn't get recognized in the device list at all so i can't generate a credentials.json, could anyone send me a template on what the credentials.json contain and i'll try adding the stuff by myself please ?

@psaumur
Copy link

psaumur commented Aug 29, 2024 via email

nanorkyo pushed a commit to nanorkyo/freebsd-ports that referenced this issue Aug 31, 2024
Changelog: https://github.com/hrkfdn/ncspot/releases/tag/v1.1.2

This update don't fix the login issue reporting bad credential
reported here: hrkfdn/ncspot#1500
@Joachim-42he
Copy link

Yes I am. I have attached a debug log.
ncspot.debug.txt

@hrkfdn
Copy link
Owner

hrkfdn commented Sep 21, 2024

That's odd. Looks like it has received the token and the logs indicate no problem either 😕

@BajekekButLost
Copy link

hey, having the same issue here. I installed with winget and I cant log in with a Family plan account. Ik im late to this issue but as I read thru I still couldn't find anything that could fix my issue

@hrkfdn
Copy link
Owner

hrkfdn commented Sep 21, 2024

@BajekekButLost The fix isn't released yet.

@lucasbeiler
Copy link

lucasbeiler commented Sep 22, 2024

Hm. Ncspot tells me to login via OAuth2 in my browser and after I have done that it tells me to return to the terminal but then nothing happens. It could be that my using i3-WM without a DE might lead to problems here.

Hi, @hrkfdn. On Friday morning I had the same issue as @Joachim-42he after building ncspot in the same way as the official Arch Linux PKGBUILD:

git clone https://github.com/hrkfdn/ncspot
cd ncspot
cargo fetch --locked
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --features cover

Today, I just built it again, but simply with git clone https://github.com/hrkfdn/ncspot && cd ncspot && cargo build --release, and now it works perfectly. It might be due to the latest commit in the main branch since then that may have fixed the problem, or the way I built it on Friday uncovered some bug.

EDIT: Yes. When I build like I did on Friday, ncspot still exits when I try to open, even now. For now, simply building with git clone https://github.com/hrkfdn/ncspot && cd ncspot && cargo build --release is what fixed it for me. And it also seems that the problem is related with the --features cover build flag that I used back then.

@psaumur
Copy link

psaumur commented Sep 22, 2024 via email

@hrkfdn
Copy link
Owner

hrkfdn commented Sep 22, 2024

Thanks for the helpful reports, glad it's working :)

@Drexxl-the-Walrus
Copy link

For me neither cargo run nor starting after cargo build --release works. I just get this error after authentication:

"Failed to exchange code for access token (Server returned error response)"

@Joachim-42he
Copy link

@hrkfdn It seems that ncspot does not create a cache for the credentials. I have removed the cache folder and rebuilt and rerun ncspot and it still stops after the spotify login. It does create ~/.cache/ncspot/librespot but that folder remains empty. Can I test somenthing more to help?

@hrkfdn
Copy link
Owner

hrkfdn commented Sep 23, 2024

If the problem also occurs with librespot you may have more luck reporting it there, @Joachim-42he, as we're mostly reusing what they use to perform OAuth2. Raising aware on their end would be much appreciated.

@Joachim-42he
Copy link

@hrkfdn I found the reason for one part of the error at least: A while back, I was suffering from this error and still had the workaround (a different ip for ap-gew4.spotify.com) in my /etc/hosts. Sorry.
Now the authorization seems to go through ok, but then ncspot suddenly quits, could you have a look at my debug log again?
ncspot.debug.txt

@hrkfdn
Copy link
Owner

hrkfdn commented Sep 24, 2024

@Joachim-42he Hmm, the logs look OK. Is there a backtrace in your cache folder? Did you try opening it another time?

@Joachim-42he
Copy link

@hrkfdn Yes, there is

 0: ncspot::panic::register_backtrace_panic_handler::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::panicking::panic_const::panic_const_div_by_zero
   7: ncspot::application::Application::new
   8: ncspot::main
   9: std::sys::backtrace::__rust_begin_short_backtrace
  10: main
  11: <unknown>
  12: __libc_start_main
  13: _start

panicked at src/ui/cover.rs:51:35:
attempt to divide by zero

@Joachim-42he
Copy link

After simply reading the backtrace and building ncspot without the cover feature, it is running again. Thank you @hrkfdn Is there a thread where I could be of help debugging this error?

@rawfootageguy
Copy link

henloo~, it seems I'm the odd Windows user here. I just installed ncspot with scoop (relatively new to this) and ran into the same bad credentials error even after changing my password. For the username field I tried my email and the letter splatter username spotify seems to give you on their back end, but both to no avail.

As I read this I presume a fix might be out sooner or later? just want to confirm. going to leave ncspot alone for now and come back whenever it might be working again <3

@undonepotato
Copy link

henloo~, it seems I'm the odd Windows user here. I just installed ncspot with scoop (relatively new to this) and ran into the same bad credentials error even after changing my password. For the username field I tried my email and the letter splatter username spotify seems to give you on their back end, but both to no avail.

As I read this I presume a fix might be out sooner or later? just want to confirm. going to leave ncspot alone for now and come back whenever it might be working again <3

@rawfootageguy I've just been reading a lot of things here (since I had to reinstall ncspot and then ran into this issue). From what I can tell, this issue was fixed in 8b83837 last week and it seems to be working for people (including me). However, this hasn't been made into a release yet, so the only way to use it at this point is by building it from the latest git yourself. You can do this by git cloneing the repository and building it with cargo build --release (more instructions in developers.md and in previous comments; you might have to set an audio backend since you're not on Linux).
Building with the cover feature is also causing sudden crashes (which was really frustrating me earlier), so don't do that if you plan to build right now since that's probably a bug.

Alternatively, you could just wait for the next release/scoop to add it, where this will be fixed and you can use your normal installation method.

However you get ncspot working eventually, make sure to use your letter-splatter username -- email doesn't work.

Hope this helps and correct me if I'm wrong!

@rawfootageguy
Copy link

thank you so much for your reply ! <33, I'm considering trying to build it (and learn more about how building works), though spotify did go down yesterday and on my end I'm not actually able to log in to my account regularly still. I'll likely try this after my spotify seems to be working alright, and if by then there's a new ncspot release then I'll download that and be on my way <33 thank you again, this provided a lot of clarity for me

@hrkfdn
Copy link
Owner

hrkfdn commented Oct 9, 2024

I'm reopening this for visibility until we can publish a new release as the issue reports keep coming.

The bottom line is: this should be fixed in main. You'll either have to compile the main branch or wait until the librespot release (one of ncspot's dependencies) is out, so that I can publish as well.

@hrkfdn hrkfdn reopened this Oct 9, 2024
@hrkfdn hrkfdn pinned this issue Oct 9, 2024
@ifneq
Copy link

ifneq commented Oct 10, 2024

I've been struggling with compiling for the past few hours, can you make a build guide for Windows or MacOS? Whenever I try to build on MacOS or Windows, I get a cc.exe or linker.exe error stating:
LINK : fatal error LNK1181: cannot open input file ':libpulse-simple-0.dll.lib'
ld: library not found for -l:libpulse-simple.0.dylib

or if someone can make an unofficial release, that would be greatly appreciated!

@ocntscha
Copy link

Same credentials problem her with my Spotify premium family account after installing on Fedora40 Linux through its built in app installer.

The work around of creating a credentials.json file with librespot-auth utility and placing it in ~/.var/app/io.github.hrkfdn.ncspot/cache/ncspot/librespot/ was amazingly easy since I already have official the Spotify client installed and there is a statically compiled binary of librespot-auth in the releases which was super simple and worked perfectly

@Gh0stjaw
Copy link

Had the same issue in Void Linux, with the package installed from xbps-install ncspot.

Did this to make it work..

First just removed the xbps package
sudo xbps-remove ncspot
then:
git clone https://github.com/hrkfdn/ncspot
cargo install --path to/where/you/put/your/git/clone
(only other issue but non related, I were missing openssl-devel, just installed it through sudo xbps-install openssl-devel).

At first run it gave me a long url (The OAuth which were missing from the initial install) to just open with a browser, then its all good to go :-)

@hrkfdn
Copy link
Owner

hrkfdn commented Oct 15, 2024

ncspot 1.2.0 is out! This should be fixed now.

@hrkfdn hrkfdn closed this as completed Oct 15, 2024
@hrkfdn hrkfdn unpinned this issue Oct 15, 2024
@Tachi107
Copy link

@hrkfdn great news! I'd personally keep this pinned for a little longer so that people using an older version are more likely to see this and avoid reporting a useless issue

@hrkfdn hrkfdn pinned this issue Oct 15, 2024
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