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

librespot unable to play songs #1277

Closed
isolatedvirus opened this issue Apr 23, 2024 · 3 comments
Closed

librespot unable to play songs #1277

isolatedvirus opened this issue Apr 23, 2024 · 3 comments
Labels

Comments

@isolatedvirus
Copy link

isolatedvirus commented Apr 23, 2024

Describe the bug
Failure to decrypt file for playback. No audio.

To reproduce
Steps to reproduce the behavior:

  1. Launch librespot
  2. Connect with mobile phone to librespot
  3. Attempt to play a song
  4. See error

Log
Unable to load encrypted file: Error { kind: Unavailable, error: hyper::Error(Connect, Custom { kind: Other, error: Custom { kind: Other, error: Custom { kind: InvalidData, error: InvalidCertificate(UnknownIssuer) } } }) }

Host (what you are running librespot on):

  • OS: Fedora 38
  • librespot being started via snapserver

Additional context
Connecting via android phone, using official spotify app. Some songs work, but appear to be songs that have been played before and are likely in the cache.

@roderickvd
Copy link
Member

So it’s saying there’s something up with the cerificate. Do you know what that could be, is there indeed tampering, wrong certificates, anything like that?

@roderickvd roderickvd closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2024
@SilverMira
Copy link
Contributor

SilverMira commented Nov 19, 2024

Can this be reopened? It does reproduce even on 0.6.0 when running librespot on Android.

logcat looks something like this when trying to Session::connect

logcat
11-19 16:46:46.873 14890 14927 V rust_lib_frb_base::ap..: Connecting to librespot
11-19 16:46:46.873 14890 14927 D librespot_core::apres..: new ApResolver
11-19 16:46:46.873 14890 14927 D librespot_core::http_..: Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient
11-19 16:46:46.874 14890 14927 W librespot_core::apres..: Failed to resolve all access points, using fallbacks
11-19 16:46:46.874 14890 14927 W librespot_core::apres..: Resolve access points error: Requested entity was not found { no native root CA certificates found (errors: []) }
11-19 16:46:46.874 14890 14927 I librespot_core::session: Connecting to AP "ap.spotify.com:443"
11-19 16:46:47.499 14890 14930 D librespot_core::conne..: Authenticating with AP using AUTHENTICATION_SPOTIFY_TOKEN
11-19 16:46:47.779 14890 14930 W librespot_core::session: Instructed to try another access point...
11-19 16:46:47.780 14890 14930 D librespot_core::http_..: Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient
11-19 16:46:47.780 14890 14930 W librespot_core::apres..: Failed to resolve all access points, using fallbacks
11-19 16:46:47.780 14890 14930 W librespot_core::apres..: Resolve access points error: Requested entity was not found { no native root CA certificates found (errors: []) }
11-19 16:46:47.780 14890 14930 I librespot_core::session: Connecting to AP "ap.spotify.com:443"
11-19 16:46:48.057 14890 14914 D EGL_emulation: app_time_stats: avg=19.43ms min=1.18ms max=500.33ms count=38
11-19 16:46:48.406 14890 14930 D librespot_core::conne..: Authenticating with AP using AUTHENTICATION_SPOTIFY_TOKEN
11-19 16:46:48.674 14890 14930 W librespot_core::session: Instructed to try another access point...
11-19 16:46:48.674 14890 14930 D librespot_core::http_..: Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient
11-19 16:46:48.674 14890 14930 W librespot_core::apres..: Failed to resolve all access points, using fallbacks
11-19 16:46:48.674 14890 14930 W librespot_core::apres..: Resolve access points error: Requested entity was not found { no native root CA certificates found (errors: []) }
11-19 16:46:48.674 14890 14930 I librespot_core::session: Connecting to AP "ap.spotify.com:443"
11-19 16:46:49.059 14890 14914 D EGL_emulation: app_time_stats: avg=500.72ms min=500.23ms max=501.21ms count=2
11-19 16:46:49.214 14890 14930 D librespot_core::conne..: Authenticating with AP using AUTHENTICATION_SPOTIFY_TOKEN
11-19 16:46:49.479 14890 14930 W librespot_core::session: Instructed to try another access point...
11-19 16:46:49.479 14890 14930 D librespot_core::http_..: Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient
11-19 16:46:49.480 14890 14930 W librespot_core::apres..: Failed to resolve all access points, using fallbacks
11-19 16:46:49.480 14890 14930 W librespot_core::apres..: Resolve access points error: Requested entity was not found { no native root CA certificates found (errors: []) }
11-19 16:46:49.480 14890 14930 I librespot_core::session: Connecting to AP "ap.spotify.com:443"
11-19 16:46:49.914 14890 14930 D librespot_core::conne..: Authenticating with AP using AUTHENTICATION_SPOTIFY_TOKEN
11-19 16:46:50.011 14890 14930 W librespot_core::session: Instructed to try another access point...
11-19 16:46:50.011 14890 14930 D librespot_core::http_..: Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient
11-19 16:46:50.011 14890 14930 W librespot_core::apres..: Failed to resolve all access points, using fallbacks
11-19 16:46:50.011 14890 14930 W librespot_core::apres..: Resolve access points error: Requested entity was not found { no native root CA certificates found (errors: []) }
11-19 16:46:50.011 14890 14930 I librespot_core::session: Connecting to AP "ap.spotify.com:443"
11-19 16:46:50.555 14890 14930 D librespot_core::conne..: Authenticating with AP using AUTHENTICATION_SPOTIFY_TOKEN
11-19 16:46:50.557 14890 14914 D EGL_emulation: app_time_stats: avg=499.41ms min=498.30ms max=499.97ms count=3
11-19 16:46:50.823 14890 14930 W librespot_core::session: Instructed to try another access point...
11-19 16:46:50.823 14890 14930 D librespot_core::http_..: Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient
11-19 16:46:50.823 14890 14930 W librespot_core::apres..: Failed to resolve all access points, using fallbacks
11-19 16:46:50.823 14890 14930 W librespot_core::apres..: Resolve access points error: Requested entity was not found { no native root CA certificates found (errors: []) }
11-19 16:46:50.824 14890 14930 I librespot_core::session: Connecting to AP "ap.spotify.com:443"
11-19 16:46:51.416 14890 14930 D librespot_core::conne..: Authenticating with AP using AUTHENTICATION_SPOTIFY_TOKEN
11-19 16:46:51.558 14890 14914 D EGL_emulation: app_time_stats: avg=500.38ms min=499.46ms max=501.31ms count=2
11-19 16:46:51.670 14890 14930 E librespot_core::session: Tried too many access points
11-19 16:46:51.670 14890 14930 E rust_lib_frb_base::ap..: Error connecting to librespot: Error { kind: PermissionDenied, error: LoginFailed(TryAnotherAP) }
11-19 16:46:51.671 14890 14930 D librespot_core::session: drop Session
11-19 16:46:51.671 14890 14930 D librespot_core::apres..: drop ApResolver

I'm suspecting we are hitting this issue, where rustls-native-certs doesn't actually support Android/IOS and instead recommends using rustls-platform-verifier instead.

Relevant rustls-native-certs usage here

I will try to put up a minimal repro repo sometime, currently my repro uses docker to cross compile apk since I couldn't actually get aws-lc-sys to compile from Windows

Edit: maybe I misunderstood this issue, it seems to be about using librespot on another desktop and connecting from the official android app, whereas the issue I'm facing is running librespot directly on Android for playback.

@roderickvd
Copy link
Member

Yes, let's make it a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants