Open christxph opened 4 years ago
@christxph did you manage to fix this? I've got the exact same error and don't know how to solve this.
@pimvdmolen Unfortunately not, as this crash is happening in a SumUp Activity LoadSumUpPaymentsActivity
, which is outside of the host app's control. So this would need to be fixed in the SDK.
@christxph thank you for your reply. I had contact with sumup and they changed the scope which i used to connect with. After they did that the error was gone so maybe this might be also the solution for you.
Is there any update on this? This crash is still the most common one for our app.
This is still happening in v3.3.0 of the SDK, just with a slightly different stacktrace because some classes were moved in the recent SDK update:
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'com.sumup.merchant.reader.identitylib.models.IdentityModel$Country com.sumup.merchant.reader.identitylib.models.IdentityModel$Business.getCountry()' on a null object reference
at com.sumup.merchant.reader.identitylib.models.IdentityModel.getServerCurrencyCode(IdentityModel.java:188)
at com.sumup.merchant.reader.models.OrderModel.getCurrency(OrderModel.java:248)
at com.sumup.merchant.reader.models.AffiliateModel.getErrorMessageForApiInformation(AffiliateModel.java:244)
at com.sumup.merchant.reader.ui.activities.CardReaderPaymentAPIDrivenPageActivity.validateApiInformation(CardReaderPaymentAPIDrivenPageActivity.java:235)
at com.sumup.merchant.reader.ui.activities.CardReaderPaymentAPIDrivenPageActivity.onSafeCreate(CardReaderPaymentAPIDrivenPageActivity.java:150)
at com.sumup.merchant.reader.ui.activities.SumUpReaderModuleBaseActivity.onCreate(SumUpReaderModuleBaseActivity.java:50)
at android.app.Activity.performCreate(Activity.java:7957)
at android.app.Activity.performCreate(Activity.java:7946)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3598)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3775)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2261)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8107)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
Is this issue being worked on or is there any workaround to prevent this crash? This is happening on a high percentage of our app users.
We are also affected by this issue. We only see this crash happening with some customers but it is happening. Any investigations here?
Having exact same issue. But I guess this repo is dead anyhow.
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{mypackage.something/com.sumup.merchant.reader.ui.activities.CardReaderPaymentAPIDrivenPageActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'com.sumup.merchant.reader.identitylib.models.IdentityModel$Country com.sumup.merchant.reader.identitylib.models.IdentityModel$Business.getCountry()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4060)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4247)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2613)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'com.sumup.merchant.reader.identitylib.models.IdentityModel$Country com.sumup.merchant.reader.identitylib.models.IdentityModel$Business.getCountry()' on a null object reference
at com.sumup.merchant.reader.identitylib.models.IdentityModel.getServerCurrencyCode(SourceFile:188)
at com.sumup.merchant.reader.models.OrderModel.getCurrency(SourceFile:248)
at com.sumup.merchant.reader.models.AffiliateModel.getErrorMessageForApiInformation(SourceFile:244)
at com.sumup.merchant.reader.ui.activities.CardReaderPaymentAPIDrivenPageActivity.validateApiInformation(SourceFile:235)
at com.sumup.merchant.reader.ui.activities.CardReaderPaymentAPIDrivenPageActivity.onSafeCreate(SourceFile:150)
at com.sumup.merchant.reader.ui.activities.SumUpReaderModuleBaseActivity.onCreate(SourceFile:50)
at android.app.Activity.performCreate(Activity.java:8214)
at android.app.Activity.performCreate(Activity.java:8202)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4033)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4247)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2613)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
We are occasionally getting this crash report in Crashlytics and have also had it happen in debug builds. This happens because
UserModel#mUserDetails
isnull
when callingUserModel#getBusiness
.The attached crash log is from SumUp SDK v3.2.2 on Android 7.1 but it happens on various device+OS combinations.