日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網為廣大站長提供免費收錄網站服務,提交前請做好本站友鏈:【 網站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

本文介紹了如何修復'"com.spotify.error.client_authentication_failed"的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在制作一個使用Spotify Remote SDK的Android應用程序。但在連接到Spotify服務器時會出現錯誤。代碼與SDK附帶的Spotify示例工程的代碼相同。我將客戶端id en reDirect uri的值更改為我的,但它給出了身份驗證錯誤。我的客戶ID和重定向URI工作正常,因為我正在制作相同的應用程序,如果一切正常的話。

有人知道如何解決這個問題嗎?

我使用的是0.6.2版

我嘗試實現身份驗證SDK,但錯誤仍然存在。

提前感謝!

        onConnecting();
        connect(false);
    }

    public void onConnectAndAuthorizedClicked(View view) {
        onConnecting();
        connect(true);
    }

    private void connect(boolean showAuthView) {

        SpotifyAppRemote.disconnect(mSpotifyAppRemote);
        SpotifyAppRemote.connect(this, new ConnectionParams.Builder(CLIENT_ID)
                        .setRedirectUri(REDIRECT_URI)
                        .showAuthView(showAuthView)
                        .build(),
                new Connector.ConnectionListener() {

                    @Override
                    public void onConnected(SpotifyAppRemote spotifyAppRemote) {
                        mSpotifyAppRemote = spotifyAppRemote;
                        Log.d("MainActivity", "Connected! Yay!");

                        // Now you can start interacting with App Remote
                        mSpotifyAppRemote = spotifyAppRemote;
                        SpotifyAppRemoteActivity.this.onConnected();
                    }

                    @Override
                    public void onFailure(Throwable throwable) {
                        Log.e("MainActivity", throwable.getMessage(), throwable);

                        // Something went wrong when attempting to connect! Handle errors here
                    }
                });
        SpotifyAppRemote.connect(
                getApplication(),
                new ConnectionParams.Builder(CLIENT_ID)
                        .setRedirectUri(REDIRECT_URI)
                        .showAuthView(showAuthView)
                        .build(),
                new Connector.ConnectionListener() {
                    @Override
                    public void onConnected(SpotifyAppRemote spotifyAppRemote) {

                    }

                    @Override
                    public void onFailure(Throwable error) {
                        if (error instanceof SpotifyRemoteServiceException) {
                            if (error.getCause() instanceof SecurityException) {
                                logError(error, "SecurityException");
                            } else if (error.getCause() instanceof IllegalStateException) {
                                logError(error, "IllegalStateException");
                            }
                        } else if (error instanceof NotLoggedInException) {
                            logError(error, "NotLoggedInException");
                        } else if (error instanceof AuthenticationFailedException) {
                            logError(error, "AuthenticationFailedException");
                        } else if (error instanceof CouldNotFindSpotifyApp) {
                            logError(error, "CouldNotFindSpotifyApp");
                        } else if (error instanceof LoggedOutException) {
                            logError(error, "LoggedOutException");
                        } else if (error instanceof OfflineModeException) {
                            logError(error, "OfflineModeException");
                        } else if (error instanceof UserNotAuthorizedException) {
                            logError(error, "UserNotAuthorizedException");
                        } else if (error instanceof UnsupportedFeatureVersionException) {
                            logError(error, "UnsupportedFeatureVersionException");
                        } else if (error instanceof SpotifyDisconnectedException) {
                            logError(error, "SpotifyDisconnectedException");
                        } else if (error instanceof SpotifyConnectionTerminatedException) {
                            logError(error, "SpotifyConnectionTerminatedException");
                        } else {
                            logError(error, String.format("Connection failed: %s", error));
                        }
                        SpotifyAppRemoteActivity.this.onDisconnected();
                    }
                });
    }```

D/SPOTIFY_APP_REMOTE(24936): Message from Spotify: [3,{"message":"com.spotify.mobile.android.spotlets.appprotocol.model.AppProtocol$Message"},"com.spotify.error.client_authentication_failed"]
D/SPOTIFY_APP_REMOTE(24936): Connection failed.
D/SPOTIFY_APP_REMOTE(24936): com.spotify.protocol.client.error.RemoteClientException: {"message":"com.spotify.mobile.android.spotlets.appprotocol.model.AppProtocol$Message"}
D/SPOTIFY_APP_REMOTE(24936):    at com.spotify.protocol.client.RemoteWampClient.getRemoteClientException(RemoteWampClient.java:139)
D/SPOTIFY_APP_REMOTE(24936):    at com.spotify.protocol.client.RemoteWampClient.access$200(RemoteWampClient.java:16)
D/SPOTIFY_APP_REMOTE(24936):    at com.spotify.protocol.client.RemoteWampClient$1.onAbort(RemoteWampClient.java:44)
D/SPOTIFY_APP_REMOTE(24936):    at com.spotify.protocol.client.WampRouterImpl.routeAbort(WampRouterImpl.java:100)
D/SPOTIFY_APP_REMOTE(24936):    at com.spotify.protocol.client.WampRouterImpl.route(WampRouterImpl.java:26)
D/SPOTIFY_APP_REMOTE(24936):    at com.spotify.protocol.client.AppProtocolCommunicator.onData(AppProtocolCommunicator.java:78)
D/SPOTIFY_APP_REMOTE(24936):    at com.spotify.android.appremote.internal.RemoteServiceIo.handleMessage(RemoteServiceIo.java:113)
D/SPOTIFY_APP_REMOTE(24936):    at com.spotify.android.appremote.internal.RemoteServiceIo.access$000(RemoteServiceIo.java:47)
D/SPOTIFY_APP_REMOTE(24936):    at com.spotify.android.appremote.internal.RemoteServiceIo$IncomingHandler.handleMessage(RemoteServiceIo.java:91)
D/SPOTIFY_APP_REMOTE(24936):    at android.os.Handler.dispatchMessage(Handler.java:106)
D/SPOTIFY_APP_REMOTE(24936):    at android.os.Looper.loop(Looper.java:214)
D/SPOTIFY_APP_REMOTE(24936):    at android.app.ActivityThread.main(ActivityThread.java:7073)
D/SPOTIFY_APP_REMOTE(24936):    at java.lang.reflect.Method.invoke(Native Method)
D/SPOTIFY_APP_REMOTE(24936):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
D/SPOTIFY_APP_REMOTE(24936):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
D/SPOTIFY_APP_REMOTE(24936): Stop remote client
E/SpotifyAppRemoteActivity(24936): AuthenticationFailedException
E/SpotifyAppRemoteActivity(24936): com.spotify.android.appremote.api.error.AuthenticationFailedException: {"message":"com.spotify.mobile.android.spotlets.appprotocol.model.AppProtocol$Message"}
E/SpotifyAppRemoteActivity(24936):  at com.spotify.android.appremote.api.LocalConnector.asAppRemoteException(LocalConnector.java:131)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.android.appremote.api.LocalConnector.access$000(LocalConnector.java:35)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.android.appremote.api.LocalConnector$1.onConnectionFailed(LocalConnector.java:111)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.android.appremote.internal.SdkRemoteClientConnector$ConnectionTask.onPostExecute(SdkRemoteClientConnector.java:142)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.android.appremote.internal.SdkRemoteClientConnector$ConnectionTask.onPostExecute(SdkRemoteClientConnector.java:75)
E/SpotifyAppRemoteActivity(24936):  at android.os.AsyncTask.finish(AsyncTask.java:695)
E/SpotifyAppRemoteActivity(24936):  at android.os.AsyncTask.access$600(AsyncTask.java:180)
E/SpotifyAppRemoteActivity(24936):  at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
E/SpotifyAppRemoteActivity(24936):  at android.os.Handler.dispatchMessage(Handler.java:106)
E/SpotifyAppRemoteActivity(24936):  at android.os.Looper.loop(Looper.java:214)
E/SpotifyAppRemoteActivity(24936):  at android.app.ActivityThread.main(ActivityThread.java:7073)
E/SpotifyAppRemoteActivity(24936):  at java.lang.reflect.Method.invoke(Native Method)
E/SpotifyAppRemoteActivity(24936):  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/SpotifyAppRemoteActivity(24936):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
E/SpotifyAppRemoteActivity(24936): Caused by: com.spotify.protocol.client.error.RemoteClientException: {"message":"com.spotify.mobile.android.spotlets.appprotocol.model.AppProtocol$Message"}
E/SpotifyAppRemoteActivity(24936):  at com.spotify.protocol.client.RemoteWampClient.getRemoteClientException(RemoteWampClient.java:139)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.protocol.client.RemoteWampClient.access$200(RemoteWampClient.java:16)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.protocol.client.RemoteWampClient$1.onAbort(RemoteWampClient.java:44)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.protocol.client.WampRouterImpl.routeAbort(WampRouterImpl.java:100)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.protocol.client.WampRouterImpl.route(WampRouterImpl.java:26)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.protocol.client.AppProtocolCommunicator.onData(AppProtocolCommunicator.java:78)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.android.appremote.internal.RemoteServiceIo.handleMessage(RemoteServiceIo.java:113)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.android.appremote.internal.RemoteServiceIo.access$000(RemoteServiceIo.java:47)
E/SpotifyAppRemoteActivity(24936):  at com.spotify.android.appremote.internal.RemoteServiceIo$IncomingHandler.handleMessage(RemoteServiceIo.java:91)
E/SpotifyAppRemoteActivity(24936):  ... 6 more

推薦答案

我遇到了類似的問題,here了解更多詳細信息。

您需要將您的應用程序注冊到Spotify儀表板。轉到Spotify儀表板并編輯您的項目。

如官方文件中所述。

您還應該添加程序包名和應用指紋,因為它們用于驗證您的應用程序的身份。

您可以按照documentation中的說明生成/獲取指紋。

MAC/Linux

keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore

Windows

keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%.androiddebug.keystore

當您有指紋時,您需要注冊到Spotify儀表板,應該可以。

這篇關于如何修復'"com.spotify.error.client_authentication_failed"的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,

分享到:
標簽:amp client_authentication_failed ERROR Quot Spotify 修復
用戶無頭像

網友整理

注冊時間:

網站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網站吧!
最新入駐小程序

數獨大挑戰2018-06-03

數獨一種數學游戲,玩家需要根據9

答題星2018-06-03

您可以通過答題星輕松地創建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學四六

運動步數有氧達人2018-06-03

記錄運動步數,積累氧氣值。還可偷

每日養生app2018-06-03

每日養生,天天健康

體育訓練成績評定2018-06-03

通用課目體育訓練成績評定