kawaiiDango / pano-scrobbler

Scrobbles to last.fm, ListenBrainz, libre.fm, GNU FM, Maloja, Pleroma or to a file, on Android
https://play.google.com/store/apps/details?id=com.arn.scrobble
GNU General Public License v3.0
1.1k stars 29 forks source link

Listenbrainz connection not working on Android 7 #418

Open regorxxx opened 7 months ago

regorxxx commented 7 months ago

Describe the bug Have been using the scrobbler for some time and since some months I have not been able to make it work with ListenBrainz. My use case is a DAP (fiio m11) which only gets connected from time to time to internet to send pending listens.

The token has been working fine on other apps, but now it just hangs and if I try to reconnect with the token it always reports "handshake failed".

Steps to Reproduce

App version 3.17 (and lower)

Other Android 7.0 (can not be updated)

regorxxx commented 7 months ago

Upon further investigation, the problem is the certificate... https://community.letsencrypt.org/t/letsencrypt-certificates-fails-on-android-phones-running-android-7-or-older/205686

So right now no scrobbler works for android 7, and since I can not log in, there is no way to at least record the listens.

Would it be possible to change the actual behavior of forcing to log in after installing? And allow to record listens offline and then export them (since ListenBrainz allow importing of a json file for ex.).

This method would ensure compatibility with any service and device for the future.

regorxxx commented 7 months ago

https://tickets.metabrainz.org/browse/LB-1523

For reference, in case you want to offer a similar approach-.

forenta commented 7 months ago

I have at least not noticed that in the past few days on Android 13.

kawaiiDango commented 7 months ago

So I looked up for workarounds for this and other than the letsencrypt root certificate not existing on Android 7.1 and lower, Android 7.0 specifically has a EC cipher bug:

https://community.letsencrypt.org/t/any-info-on-the-upcoming-ecdsa-certificate-chain-with-android-compatibility/149613

https://issuetracker.google.com/issues/37122132

Your best bet here would be to host a proxy that forwards requests to listenbrainz, that uses ZeroSSL or something with a cipher suite compatible with Android 7.0

I couldn't find any information about ListenBrainz allowing importing of a json file officially.

regorxxx commented 6 months ago

Well at least with this, I can send a batch of listens: https://listenbrainz.readthedocs.io/en/latest/users/json.html#submission-json There is a maximum of listens to send at a single time, but that can easily be coded on python or JS. Thanks for the last update allowing to save to JSON.

There have been multiple talks at the forums and tracker about allowing to import a json file with listens at the web; since listenbrainz currently allows to export the entire listening history, it made sense to allow to re-import it too. At that point it will be easier; if I find any update about it I will let you know.