brim-borium / spotify_sdk

Flutter Package to connect the spotify sdk
https://pub.dev/packages/spotify_sdk
Apache License 2.0
152 stars 82 forks source link

Authentication failing #149

Closed vikrantyadav7 closed 2 years ago

vikrantyadav7 commented 2 years ago

I cloned this repo and added my app id and redirect uri in the .env file . after calling the get authtoken function .it tries to connect through spotify and shows loading and then it gives an error . but if I uninstall my spotify app , it gives me TOKEN . but then remote access fails due to not having spotify app . here is the error E/Parcel (20425): Reading a NULL string not supported here. E/libEGL (20425): Invalid file path for libcolorx-loader.so D/com.spotify.sdk.android.auth.LoginActivity(20425): Spotify Auth starting with the request [https://accounts.spotify.com/authorize?client_id=bbc2d117bece48ebaa067a59dc8885f9&response_type=token&redirect_uri=http%3A%2F%2Flocalhost%3A8090%2Fapp%2FGoogleCallback&show_dialog=false&utm_source=spotify-sdk&utm_medium=android-sdk&utm_campaign=android-sdk&scope=app-remote-control%20%20user-modify-playback-state%20%20playlist-read-private%20%20playlist-modify-public%20user-read-currently-playing] E/Parcel (20425): Reading a NULL string not supported here. D/ColorViewRootUtil(20425): initSwipState, isDisplayCompatApp false D/ColorViewRootUtil(20425): mScreenHeight 2340, mScreenWidth 1080 D/WindowManager(20425): Add to mViews: DecorView@a22a49a[LoginActivity],pkg= de.minimalme.spotify_sdk_example V/OplusZoomWindowDecorViewHelper(20425): setLastReportedMergedConfiguration mZoomDisplayHeight: 2340 getDecorView.DecorView@a22a49a[LoginActivity] I/com.spotify.sdk.android.auth.LoginActivity(20425): Spotify auth completing. The response is in EXTRA with key 'response' I/flutter (20425): ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── I/flutter (20425): │ #0 SpotifySdk._logException (package:spotify_sdk/spotify_sdk.dart:618:15) I/flutter (20425): │ #1 SpotifySdk.getAuthenticationToken (package:spotify_sdk/spotify_sdk.dart:128:7) I/flutter (20425): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ I/flutter (20425): │ ⛔ getAuthenticationToken failed with: Authentication went wrong I/flutter (20425): │ ⛔ AUTHENTICATION_SERVICE_UNAVAILABLE I/flutter (20425): └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── I/flutter (20425): ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── I/flutter (20425): │ #0 _HomeState.setStatus (package:spotify_sdk_example/main.dart:656:13) I/flutter (20425): │ #1 _HomeState.getAuthenticationToken (package:spotify_sdk_example/main.dart:471:7) I/flutter (20425): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ I/flutter (20425): │ 14:44:05.964 (+0:06:11.639098) I/flutter (20425): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ I/flutter (20425): │ 💡 authenticationTokenErrorAuthentication went wrong I/flutter (20425): └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── E/flutter (20425): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(authenticationTokenError, Authentication went wrong, AUTHENTICATION_SERVICE_UNAVAILABLE, null).code: PlatformException(authenticationTokenError, Authentication went wrong, AUTHENTICATION_SERVICE_UNAVAILABLE, null).message E/flutter (20425):

Sahilhawal commented 1 year ago

@vikrantyadav7 how did you fix this issue

vikrantyadav7 commented 1 year ago

@vikrantyadav7 how did you fix this issue

its been a long time the package has been updated now you don't even need those things.