2016-11-08 1 views
2

インテントでアカウントキットを開こうとすると、このlogcatがユーザーから届きました。クラッシュアカウントキットFacebook android AppEventsLogger

com.facebook.accountkit.internal.AppEventsLogger.handleResponse(AppEventsLogger.java:526)でjava.lang.NullPointerExceptionが1 com.facebook.accountkit.internal.AppEventsLogger.access $ 600で 2(AppEventsLogger .java:57) com.facebook.accountkit.internal.AppEventsLogger $ 4.onCompleted(AppEventsLogger.java:510)で3 4 com.facebook.accountkit.internal.AccountKitGraphRequestAsyncTask.onPostExecute(AccountKitGraphRequestAsyncTask.java:188)で 5 at com.facebook.accountkit.internal.AccountKitGraphRequestAsyncTask.onPostExecute(AccountKitGra phRequestAsyncTask.java:42) android.os.AsyncTask.finish(AsyncTask.java:631)7 at android.os.AsyncTask.access $ 600(AsyncTask.java:177)8 at android.os.AsyncTask $ InternalHandler.handleMessage(AsyncTask.java:644) 9 android.os.Handler.dispatchMessage(Handler.java:99)10 at android.os.Looper.loop(Looper.java:137)11 at android.app .ActivityThread.main(ActivityThread.java:5041)12 at java.lang.reflect.Method.invokeNative(ネイティブメソッド)13 at java.lang.reflect.Method.invoke(Method.java:511)14 at com .android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:793) 15 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 4+

プラットフォーム(複数可)(のiOS、アンドロイド、またはその両方?)::dalvik.system.NativeStart.main(ネイティブメト

D)

はネイティブアカウントキットのバージョンを反応させるのに16 Android

あなたからのフィードバックが必要です。

ありがとう!

答えて

0

編集:は今、Facebookのチームがアカウント-KIT-SDKで4.18.0

をこのバグを修正私はアカウント-KIT-SDKで何度4.17.0

がafater読んでこのバグを発見しましたいくつかのケースでは、AppEventsLogger.this.handleResponse(stateKey, postRequest, response, sessionEventsState, flushState);を実行しますthis.callback.onCompleted(result);メソッドが呼び出さ

protected void onPostExecute(AccountKitGraphResponse result) { 
     super.onPostExecute(result); 
     if(result != null && result.getError() != null && result.getError().getException().getError().getErrorType() == Type.NETWORK_CONNECTION_ERROR && result.getError().getException().getError().getDetailErrorCode() != 101 && this.numRetries < 4) { 
      Handler mainHandler = new Handler(AccountKitController.getApplicationContext().getMainLooper()); 
      mainHandler.post(new Runnable() { 
       public void run() { 
        int newNumRetries = AccountKitGraphRequestAsyncTask.this.numRetries + 1; 
        final AccountKitGraphRequestAsyncTask asyncTask = new AccountKitGraphRequestAsyncTask((HttpURLConnection)null, AccountKitGraphRequestAsyncTask.this.request, AccountKitGraphRequestAsyncTask.this.callback, newNumRetries, null); 
        Utility.getBackgroundExecutor().schedule(new Runnable() { 
         public void run() { 
          if(!AccountKitGraphRequestAsyncTask.this.isCancelled() && !asyncTask.isCancelled()) { 
           asyncTask.executeOnExecutor(Utility.getThreadPoolExecutor(), new Void[0]); 
          } 

         } 
        }, (long)(5 * newNumRetries), TimeUnit.SECONDS); 
        if(AccountKitGraphRequestAsyncTask.this.request.isLoginRequest()) { 
         AccountKitGraphRequestAsyncTask.currentAsyncTask = asyncTask; 
        } 

       } 
      }); 
     } else { 
      if(this.callback != null) { 
       this.callback.onCompleted(result); 
      } 

      if(this.exception != null) { 
       Log.d(TAG, String.format("onPostExecute: exception encountered during request: %s", new Object[]{this.exception.getMessage()})); 
      } 

     } 
    } 

private void handleResponse(AppEventsLogger.SessionEventsStateKey stateKey, AccountKitGraphRequest request, AccountKitGraphResponse response, AppEventsLogger.SessionEventsState sessionEventsState, AppEventsLogger.FlushStatistics flushState) { 
     AccountKitRequestError error = response.getError(); 
     String resultDescription = "Success"; 
     ... 
    } 

AccountKitGraphResponseについてとAppEventsLogger deompliedクラスは、responseはですNullPointerExceptionが

の原因となりますオブジェクト は、私は、この変更

if(this.callback != null && result != null) { 
    this.callback.onCompleted(result); 
} 
を提案します