sdk-android icon indicating copy to clipboard operation
sdk-android copied to clipboard

Fatal Exception: java.lang.NoSuchMethodError

Open crashfiredeep opened this issue 3 years ago • 9 comments

Expected Behavior

App should open after updating to latest version (1.34.3, Not working) from 1.14.15 (This was working previously)

Current Behavior

App is crashing with error on device android 10 tablet venturer vct9t48q34eu

Steps to Reproduce

I have updated library to latest version which is 1.34.3. And then run on Android 10 device. and it is crashing.

  • Operating Version: Android 10 tablet venturer vct9t48q34eu
  • SDK version: API 29

Failure Logs

Fatal Exception: java.lang.NoSuchMethodError No virtual method setDefaultColorSchemeParams(Landroidx/browser/customtabs/CustomTabColorSchemeParams;)Landroidx/browser/customtabs/CustomTabsIntent$Builder; in class Landroidx/browser/customtabs/CustomTabsIntent$Builder; or its super classes (declaration of 'androidx.browser.customtabs.CustomTabsIntent$Builder' appears in /data/app/com.pospal.pospal-LAhTdDFU-3qKcdpYHVk3ew==/base.apk)

Fatal Exception: java.lang.NoSuchMethodError: No virtual method setDefaultColorSchemeParams(Landroidx/browser/customtabs/CustomTabColorSchemeParams;)Landroidx/browser/customtabs/CustomTabsIntent$Builder; in class Landroidx/browser/customtabs/CustomTabsIntent$Builder; or its super classes (declaration of 'androidx.browser.customtabs.CustomTabsIntent$Builder' appears in /data/app/com.pospal.pospal-LAhTdDFU-3qKcdpYHVk3ew==/base.apk) at com.izettle.android.auth.AuthWebLauncherImpl.launchCustomTab$auth_release(SourceFile:8) at com.izettle.android.auth.AuthWebLauncherImpl.launchInBrowser(SourceFile:2) at com.izettle.android.auth.OAuthActivity.onResume(SourceFile:10) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1453) at android.app.Activity.performResume(Activity.java:7939) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4223) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4265) at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2041) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7386) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)

crashfiredeep avatar Jan 01 '23 15:01 crashfiredeep

Thank you @crashfiredeep for reporting us this issue. May I know what's the default browser app in your tablet? maybe you can try to update the browser app to newer version.

CheZhongSdk avatar Jan 02 '23 14:01 CheZhongSdk

Thank you @crashfiredeep for reporting us this issue. May I know what's the default browser app in your tablet? maybe you can try to update the browser app to newer version.

I have chrome browser

crashfiredeep avatar Jan 03 '23 04:01 crashfiredeep

I have chrome browser

Thanks @crashfiredeep. We are actively working on solve this issue. Will keep you updated.

CheZhongSdk avatar Jan 03 '23 11:01 CheZhongSdk

We had this problem today in one of our apps with a customer. The following workaround helped for the end user, without having to change the SDK version:

  • disable Chrome, so the Custom Tab feature cannot be used anymore
  • install Firefox or some other browser
  • the Zettle SDK then automatically opens your new default browser to show the OAuth login page

It looks like the issue is additionally caused inside the SDK by broken exception handling for opening of the custom tab. Normally it should fall back to use the default browser instead, but instead of that, it crashes.

robbi5 avatar Jan 19 '23 15:01 robbi5

Hi @crashfiredeep @robbi5 , Sincere apologies for the delay in getting back to you! Now the issue should be fixed in the new release version 1.36.8. Please try it out, and let us know if you still have the same issue. Cheers.

CheZhongSdk avatar Feb 22 '23 08:02 CheZhongSdk

Again same error is coming in latest version 2.1.1, on same android device

crashfiredeep avatar Aug 09 '23 16:08 crashfiredeep

Issue on devices running android 10. Seems to be okay on 11+

I can as robbi5 mentioned above disable Chrome and use another browser with success but otherwise SDK crashes again like previously reported.

hennaboy avatar Aug 09 '23 17:08 hennaboy

Thank you for reporting the issue to us! This issue should be fixed in the new release 2.1.4. Please try it out, let us know if you still have the issue. Thanks! @hennaboy @crashfiredeep

CheZhongSdk avatar Aug 10 '23 14:08 CheZhongSdk

Resolved again with 2.1.4 thank you.

hennaboy avatar Aug 11 '23 20:08 hennaboy