3

This is my code. I am simply calling get a request for my profile through the activity. And I got this error for that. when I comment the method call (Get Request method) it works fine and shows me my UI. but when calling it just showing a black screen with this recursive following response.

I/art: Background sticky concurrent mark sweep GC freed 8216(299KB) AllocSpace objects, 0(0B) LOS objects, 14% free, 93MB/109MB, paused 5.381ms total 19.009ms

Please help stuck here...

//Error

E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 1575704)
E/AndroidRuntime: Error reporting crash
              android.os.TransactionTooLargeException: data parcel size 1575704 bytes
                  at android.os.BinderProxy.transactNative(Native Method)
                  at android.os.BinderProxy.transact(Binder.java:503)
                  at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:4480)
                  at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:90)
                  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
                  at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)

//Activity

  @Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.admin_profile_activity);
    mAPIService = ApiUtils.getAPIService();

   //method call
   requestProfileDetail(LoginActivity.authTOken);
   
}

//method

private void requestProfileDetails(String authoken){
    mAPIService.getProfileDetails(authoken).enqueue(new 
      Callback<AdminProfileRequest>() {
        @Override
        public void onResponse(Call<AdminProfileRequest> call,Response<AdminProfileRequest> response) {
            if(response.isSuccessful()) {
                Log.d("Name","Name ");

            }else{
                Log.d("response", "code = " + response.code());
                Log.d("response: ","boyd= "+response.body());
                APIError error = ErrorUtils.parseError(response);

                Log.d("error message", ""+error.message());
            }
        }

        @Override
        public void onFailure(Call<AdminProfileRequest> call, Throwable t) {

        }
    });
}

//request_Call_from_interface

@GET("getuserprofile")
Call<AdminProfileRequest> getDetails(@Header("Authorization") String 
authToken);
aminography
  • 18,195
  • 11
  • 51
  • 57

1 Answers1

0

I was having the same issue. After many many many tests, I finally found the cause: my model (the one used in method response, in your case AdminProfileRequest) was implementing Parcelable which internally I needed in other instances of my app. Removing that implementation (and implementing a work-around for passing data between activities/fragments) fixed the crash.