svgomg-twa: App crashes with IllegalStateException

Hi,

We’re getting a small number of crashes from various devices with the following stack trace:

java.lang.IllegalStateException: 
  at android.support.customtabs.trusted.TwaLauncher.launchWhenSessionEstablished (TwaLauncher.java:176)
  at android.support.customtabs.trusted.TwaLauncher.lambda$launchTwa$0$TwaLauncher (TwaLauncher.java:158)
  at android.support.customtabs.trusted.-$$Lambda$TwaLauncher$0c_zkUHgDllmcAlOM3gechJInp0.run (Unknown Source:8)
  at android.support.customtabs.trusted.TwaLauncher$TwaCustomTabsServiceConnection.onCustomTabsServiceConnected (TwaLauncher.java:226)
  at android.support.customtabs.CustomTabsServiceConnection.onServiceConnected (CustomTabsServiceConnection.java:44)
  at android.app.LoadedApk$ServiceDispatcher.doConnected (LoadedApk.java:1839)
  at android.app.LoadedApk$ServiceDispatcher$RunConnection.run (LoadedApk.java:1871)
  at android.os.Handler.handleCallback (Handler.java:873)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:214)
  at android.app.ActivityThread.main (ActivityThread.java:7050)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)

Seems to be something going wrong when trying to establish the session. Is this a known issue?

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

+1 to that. The Feature Request is being tracked in this issue: http://crbug.com/989606 It’d be great if you could chime in and add any details you can on what you are building.

Can you confirm the version of the Support Library being used? The latest version is 91b4a1270b.

How do we find the latest version? From Google’s documentation, they says to use 7a2c1374a3. But this didn’t work for me. Is there way to find the latest version support library? How we will know when a new version is released?

91b4a1270b also didn’t work for me. From Logcat it says, java.lang.IllegalAccessError: Method 'android.os.Bundle android.support.customtabs.CustomTabColorSchemeParams.toBundle()' is inaccessible to class 'androidx.browser.customtabs.CustomTabsIntent$Builder'

From a different example, I got this version 7ab7178ae0 and it worked for me.