justin025 / onthespot

OnTheSpot is an easy-to-use music downloader built with Python and Qt. Search for songs, albums, or playlists and download them directly to your device.
GNU General Public License v2.0
71 stars 8 forks source link

MacOS Login Issues #7

Open thethirteenthgay opened 1 month ago

thethirteenthgay commented 1 month ago

Opened OnTheSpot for the first time and clicked to start the login process, received the notification 'Login Service Started... Select 'OnTheSpot' under devices in the Spotify Desktop App.' Selected 'OK' and was notified that OnTheSpot was 'waiting', but it's not appearing as an available device in the devices list on Spotify.

I'm aware this issue was raised before but the fix was just the latest version. As far as I know I have installed the latest version, though as the dmg didn't work for me I had to follow the instructions at 1.2 here and couldn't just click the dmg for the latest update.

Other potentially relevant information:

Apologies for raising an issue that's been raised before, but I'm encountering the same problem and given that the fix was a since-deleted gofile link or an updated version, that doesn't solve my problem unless the instructions here install an older version, in which case guidance on how to install the most updated version in the above manner would be appreciated.

justin025 commented 4 weeks ago

I'm not sure why everyone apologizes when opening an issue, I thought this was the whole point of the issues tab.

macos_zeroconf.txt

You found a bug, I've attached the log above. It only outputs this error interestingly when opening the spotify devices tab, my guess would be that the macos spotify app is build differently then the windows and linux one. Infact I received a crashreport from spotify's StartUpHelper, I am not sure if this is related.

You have two options, wait until I come up with a fix or login on a windows/linux machine and copy your credentials to your macbook. If you need instructions on how to do that I am more than willing to help, good luck.

thethirteenthgay commented 4 weeks ago

Thank you for the response! I don't have a Windows or Linux so I'm happy to wait for a fix, glad it wasn't just my own incompetence here.

(As to the apologising, that'll be the anxiety! I'm very much a newbie here.)

zerog13 commented 4 weeks ago

I'm not sure why everyone apologizes when opening an issue, I thought this was the whole point of the issues tab.

some people don't like being told there is a bug or issue with their app. and there are a hundred posts about how to fix it, which looks like he went through them. sometimes it's hard to report an issue with a basically free app, kinda like overstaying your welcome.

justin025 commented 3 weeks ago

I have a fix on the way for macos users, if you'd like it now follow the instructions below:

brew install rust
git clone https://github.com/dspearson/librespot-auth
cd librespot-auth
cargo build --release 
./target/release/librespot-auth --name "OnTheSpot" --class=computer --path "~/.config/onthespot/sessions/ots_login_a.json"
# Select OnTheSpot in spotify devices
sed -i 's|"accounts"\: \[\],|"accounts"\: \[\["EMAIL","true",1,"a"]],|g' ~/.config/onthespot/config.json
# /\ put your email in the EMAIL field above

This should log you in, If you don't have brew installed on your mac I can share a librespot auth binary.

Just a bit of background: librespot-python (what this project depends on) is a rewrite of librespot in rust. Librespot in rust seems much more feature complete including oauth logins which are far superior to the current implementation in zeroconf (what we use now). As much as I hate rust I believe this entire application should be rewritten because librespot-python has been abandoned by its original dev, this process will take a long time. In the meantime I plan to release a 'login' binary alongside the macos release (or some sort of shim) so that users can still use the current application in the mean time.

justin025 commented 3 weeks ago

I found a much better solution that doesn't require compiling or downloading anything, just run the following command and logins should work on macos.

echo "127.0.0.1 $HOST" | sudo tee -a /etc/hosts

After the login you can remove the line by editing the file /etc/hosts if you want. Let me know if this works for you.