PromyLOPh / pianobar

Console-based pandora.com player
http://6xq.net/pianobar/
Other
1.73k stars 323 forks source link

Hangs on "Get stations..." #737

Closed knightofiam closed 3 months ago

knightofiam commented 1 year ago

Subject of the issue

As of October 31, 2022, pianobar hangs on "Get stations..." after logging in. I can play Pandora via the website just fine using the same login. I use pianobar just about every day and it was working fine before the 31st. I haven't made any changes to the pianobar version, configuration, my pandora account, or my system recently.

Your environment

Steps to reproduce

$ pianobar
Welcome to pianobar (2022.04.01)! Press ? for a list of commands.
(i) Control fifo at /Users/aaron/.config/pianobar/ctl opened
[?] Email: [redacted]@[redacted].com
[?] Password:
(i) Login... Ok.
(i) Get stations...

Expected behaviour

Autostart station should start playing after login.

Actual behaviour

Hangs on "Get stations..." after login. No error messages.

Debugging steps I've tried

Deleted content of ~/.config/pianobar. No change. Restarted computer. No change. sudo killall pianobar, then execute pianobar again. No change.

PromyLOPh commented 1 year ago

Is this still an issue? If so, could you please run PIANOBAR_DEBUG=1 pianobar with a debug build. This should print network requests and responses. Does pianobar respond to Control-C when “locked up”?

knightofiam commented 1 year ago

It's working again today, and I have no idea why. Didn't get a chance to debug - I will if it happens again. I was wondering if it could be a firewall issue at the specific WiFi location where it happened, but it seems pianobar only uses http/s, and I was able to stream from pandora.com with no problem at the same location, so I don't think that's the cause. It will be interesting to test again at that location again though to see if it continues working. Or maybe it was an ephemeral, region-specific, pandora outage? I guess we can't tell without the debugging info. Sorry!

PromyLOPh commented 1 year ago

No problem. Note that pianobar is using the mobile API, not the one for web clients. That’s why behavior may be different.

knightofiam commented 1 year ago

Thanks, I'll keep that in mind in case I find myself in the same situation again, and see if I can run Pandora's iOS app on my phone.

knightofiam commented 1 year ago

So I discovered it's only occurring on a specific Wi-Fi network. The iOS app works just fine so the API must be doing something different than the mobile app. I ran PIANOBAR_DEBUG=1 pianobar but you said "on a debug build", and I can't find any documentation on how to create a debug build. I didn't get any debugging output on the installed version, which is via Homebrew.

I also examined the ruby script for any clues on how to set a debug flag, but not seeing anything:

https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/pianobar.rb

I really don't want to reinvent the wheel by reverse engineering the ruby script, to get pianobar built from source on macOS. It would be great it if it was something along the lines of git clone, ./configure, make, make install, and it just worked. But unfortunately it looks like there's a lot of technicalities involving editing the Makefile, configuring compiler flags, tweaking environment variables, installing dependencies, etc. Otherwise, if you could explain the simplest way to get a debug build on macOS, I'd be willing to test it.

PromyLOPh commented 1 year ago

Debug build means building without -DNDEBUG. This flag is set by most distributions, thus they build non-debug versions by default. I don’t have a Mac, so I can’t provide you with further instructions/binaries, but I’m guessing you can just remove that flag from the build script?