android-sdk icon indicating copy to clipboard operation
android-sdk copied to clipboard

unable to login through spotify (auth) if with spotify app installed but not logged in

Open hereisderek opened this issue 1 year ago • 0 comments

Issue found on 20241019 with the current sample app

SDK Version: 2.1.2

OS Version: android 13

Scope(s):"user-read-email"

Steps to reproduce:

  1. have spotify installed but not logged in
  2. connect spotify normally in the custom app by calling AuthorizationClient.openLoginActivity(this, SPOTIFY_AUTH_REQUEST_CODE, request),
  3. the app with be redirected to spotify and ask for login. user then put in spotify username and password.

Expected behaviour:

user exited from the spotify app and brought back to custom app with the correct spotify token received from onActivityResult

Actual behaviour:

callback from onActivityResult was never called and the app stuck in this screen

image

with it eventually timeout

login will succeed on another attempt as it'd be already logged in on spotify

it's tested on the sample app, with lifecycle event printed out (onCreate, onResume, onPause and onActivityResult)

13:10:05.018 nativeloader      D  Configuring clns-4 for other apk /data/app/~~C0-KJ1gWKNkCeia3GCseug==/com.spotify.sdk.android.authentication.sample-wgqpzZeY00M1F4M845cTvw==/base.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/~~C0-KJ1gWKNkCeia3GCseug==/com.spotify.sdk.android.authentication.sample-wgqpzZeY00M1F4M845cTvw==/lib/arm64, permitted_path=/data:/mnt/expand:/data/user/0/com.spotify.sdk.android.authentication.sample
13:10:05.034 Graphic...onment  V  ANGLE Developer option for 'com.spotify.sdk.android.authentication.sample' set to: 'default'
13:10:05.035                   V  ANGLE GameManagerService for com.spotify.sdk.android.authentication.sample: false
13:10:05.035                   V  Updatable production driver is not supported on the device.
13:10:05.042 Network...Config  D  No Network Security Config specified, using platform default
13:10:05.043                   D  No Network Security Config specified, using platform default
13:10:05.259 MainAct...Sample  D  onResume
13:10:05.345 Parcel            W  Expecting binder but got null!
13:10:09.855 MainAct...Sample  D  onPause
13:10:09.872 com.spo...tivity  D  Spotify Auth starting with the request [https://accounts.spotify.com/authorize?client_id=089d841ccc194c10a77afad9e1c11d54&response_type=code&redirect_uri=spotify-sdk%3A%2F%2Fauth&show_dialog=false&utm_source=spotify-sdk&utm_medium=android-sdk&utm_campaign=your-campaign-token&scope=user-read-email]
13:10:09.925 Parcel            W  Expecting binder but got null!
13:10:32.174 System            W  A resource failed to call close. 
13:12:18.880 com.spo...tivity  I  Spotify auth completing. The response is in EXTRA with key 'response'
13:12:18.915 MainAct...Sample  I  onActivityResult requestCode:17, resultCode:-1 code:null, error:CONNECTION_TIMEOUT
13:12:18.918                   D  onResume

hereisderek avatar Oct 21 '24 00:10 hereisderek