Closed BitForger closed 3 years ago
@BitForger any special characters in your username or password?
also having this issue. no special chars.
@Chrisys I tried with one that had a bunch, then changed it to one with only underscores. Same result for both.
So I was digging into this a bit more and I think the issue is that concatenating the options into a string and then using it in the exec line isn't turning the string into cli options. It seems the librespot args interpreter is seeing it as a single string option instead of parsing the string as multiple options.
I changed my test script to this:
SPOTIFY_CREDENTIALS="--username \"$SPOTIFY_LOGIN\" --password \"$SPOTIFY_PASSWORD\""
echo $SPOTIFY_CREDENTIALS
exec /Users/admin/.cargo/bin/librespot --name "test" -p $SPOTIFY_PASSWORD -u $SPOTIFY_LOGIN
In this format it works perfectly fine.
I don't know how to fix something like this as I'm not a huge bash scripter so the only thing I can think of is having two different exec lines based on if credentials are present. In the README it says that credentials are required because that's how librespot works so maybe that's alright?
For me it started working finally when I remove quotes and escapes from spotify/start.sh line:23
- SPOTIFY_CREDENTIALS="--username \"$SPOTIFY_LOGIN\" --password \"$SPOTIFY_PASSWORD\""
+ SPOTIFY_CREDENTIALS="--username $SPOTIFY_LOGIN --password $SPOTIFY_PASSWORD"
Otherwise it looks as variables were not assigned properly.
For me it started working finally when I remove quotes and escapes from spotify/start.sh line:23
Interesting.. so it seems that escaping the variables so you can have passwords with spaces breaks the functionality for people with normal passwords.
What env variables are you using? Any default output ones?
I found that removing them magically made it work. I'm also on a non-wireless (no-bt) Pi and I had both set to 10 (CONNECTION_NOTIFY_VOLUME might be BT-only?).
What env variables are you using? Any default output ones?
I was setting the output volume to 100.
Does someone found a fix?
@marrobHD read the comments before telling there wasnt found a fix: https://github.com/balenalabs/balena-sound/issues/131#issuecomment-609097555
Does someone found a fix?
The fix is kinda complicated.. I just made some tweaks to get it to work for me...
You can check out what I did here: https://github.com/BitForger/balena-sound
Hi All! Fix is simple: put a space in your password and it works :')
[rahul-thakoor] This issue has attached support thread https://jel.ly.fish/eefba502-fb7a-4888-8e67-297fcc3ab227
Should be fixed as of v3.1.11. Let me know otherwise. Thanks!
[saintaardvark] This issue has attached support thread https://jel.ly.fish/d47fe563-471d-4231-8993-7c6011999a5e
Hey all,
So I've been enjoying balena sound so far, but I keep running into a problem with authentication with spotify. I add the credentials like directed however when ever it attempts to run from the command line it just doesn't like to authenticate. Here is what I see:
So running the librespot command straight in the CLI with the variables
SPOTIFY_LOGIN
andSPOTIFY_PASSWORD
defined in my env works just fine. It doesn't like if I try to run it in a script like the container does. Here is my test script:I run it like so
This logs out the correct values for the login and password that I set, but it throws the 'BadCredentials' error that I was getting before. I'm not sure if it's me using it wrong or if this is a bug with librespot that I need to bring to them.
Any suggestions?