Fatal Exception: java.lang.NoSuchMethodError
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)
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.
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
I have chrome browser
Thanks @crashfiredeep. We are actively working on solve this issue. Will keep you updated.
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.
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.
Again same error is coming in latest version 2.1.1, on same android device
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.
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
Resolved again with 2.1.4 thank you.