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
Getting AUTHENTICATION_SERVICE_UNAVAILABLE when calling authorize. #166
Comments
@cjam Would really appreciate some guidance here, if you have any idea what may be causing this issue. |
Hey @fickleEfrit. Sorry have been swamped at work. Are you still having issues with this? Can I see your config? Also. Did you make sure to setup the URI handlers for your app? I think there is some notes about it in the docs, but on iOS you must setup not only the handler for your app but also the outgoing URL for Spotify. If the Spotify app doesn't open up that is where I would start. Double check the setup notes on the Spotify sdk docs. |
No worries @cjam, thank you for checking! I am attempting to connect in Android for now, rather than iOS. Also, I believe the URI handlers are properly setup as when authenticating with react-native-app-auth I am able to successfully open Spotify and receive the auth token with the same callback url. However, I am unable to simply pass that token into the spotify remote since it won't let me run any commands without having already run auth (even if I pass the token in). I looked through the docs and there appears to be a no auth version of the remote, but I couldn't see how that corresponded to the react native library. I'm new to React Native, so not sure if that just hasn't been added yet or if I am overlooking a method to run the remote sdk with an outside authorization source. Here is my config:
|
@fickleEfrit Which version of this library are you using? |
@cjam Looks like I'm currently using 0.3.2. I will try bumping to the latest version and update you on whether that works. |
I tried running on 0.3.10 (in fact I ran yarn upgrade and made sure all libraries are on the latest version now) but am still getting the same issue. The loading screen appears, but immediately closes before showing me any Spotify stuff, and I get the same error about the authentication service being unavailable. Additionally, the endpoints for the sample token swap server never get hit, as it never gets to that point. I'm really wondering what is throwing this error, since there's just about no results for it on the web. |
What version of Android are you using @fickleEfrit ? There was issue #169 which added some docs for those using Android 11 and above. Perhaps you could take a look. |
I'm on an emulated Pixel 2 on API level 29, Android 10. |
Facing the same issue @cjam |
Hmm which version of this package? There is a prerelease in @next that might be worth a try if you haven't. |
@cjam I just started using the lib and I'm getting that issue as well on Android (Samsung Galaxy S9 - Android 10) My lib version is 0.3.11-2 (next) Thanks! |
@fickleEfrit did you find a solution? I'm totally blocked by this :( |
Sorry for the delay on this. I’ve been swamped with work. Has anyone had a chance to debug through the android code and see if they can find any additional details?
Colter
…On Dec 7, 2021, 6:21 AM -0800, Mickaël Gagné ***@***.***>, wrote:
@fickleEfrit did you find a solution? I'm totally blocked by this :(
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@cjam I'm not a Java developer but I tried digging deeper and it seems the error really happens inside of the Spotify app after calling Would you know how to debug this further? |
@mickaeloak that looks like a good find. Not sure how to debug further. I'm still partially blocked by this as well, ended up going with some hacky usage of the web API but would very much prefer to switch to this module if this issue is ever resolved. The Spotify docs https://spotify.github.io/android-sdk/auth-lib/docs/ don't have any mention of this particular error code, and it only mentions that in order to make auth flow work
needs to be added to the manifest. My manifest has similar:
Could there be an issue with how the manifest is set up per the setup guide on react-native-spotify-remote? |
I'll have to try this on the example, I've been absolutely swamped at work and have no time to be able to spend on this project as of late. I appreciate the attempts to debug the Java code tho @mickaeloak. Out of curiosity, @mickaeloak / @fickleEfrit where are you located? There were some people on here with issues that came up as a result of Spotify changing some login / auth policies with respects to geo-location. I doubt that's the case here but just curious. The issue I was referring to: #165 (comment) |
@cjam thanks! No worries if you can't debug this now, you saved me tons of time already with this library. |
Same problem, I solved it after adding "Android packages" to the spotify dashboard |
@deng-yc I added only my own application, and it is now working. Thanks so much for the fix! @mickaeloak @shaurya2612 definitely give this a try. Going to close the issue now. |
@fickleEfrit Mine was already added, so that doesn't solve it on my side. I doubled checked the values too. |
@mickaeloak should I reopen the issue then? Sorry to hear that didn't work for you! |
Thank you very much all, you saved me a lot of time ! 🙏 It was still raising the AUTHENTICATION_SERVICE_UNAVAILABLE error on Android only, even with the "Android Packages" section well filled in my Spotify app's dashboard, until I gave a try, few days ago, to write my SHA-1 fingerprints uppercase (as it is shown in the placeholder) instead of lowercase, and it did the trick. So, fill your SHA-1 fingerprints 👉 uppercase 👈 in the Android Packages section of your Spotify app. |
@thomasdelobel wow thank you so much for this. The all caps thing was my issue 😐 |
Gettin same error AUTHENTICATION_SERVICE_UNAVAILABLE. Is this a solution that solves everyone’s problem with Spotify Auth just by using all caps for SHA-1 fingerprints? |
Hello, I am trying to get a React Native application working with this library. I previously had gotten authentication with Spotify to work when just using React Native App Auth on its own, but figured that if I'm going to be using this library to control Spotify in the background I should probably do the authentication with this as well.
However, when I call the authorize method of auth from an Android emulator I get the following:
The login screen for Spotify does not open, and only the first print statement comes through here:
I tried to look through the code for this library to see what might be causing this, but couldn't find anywhere that would throw this error within SpotifyAuth.ts. Do you have any idea what might be wrong in my configuration/code that would be causing this? I couldn't find anything similar online.
Thank you.
The text was updated successfully, but these errors were encountered: