android-browser-helper: NullPointerException - CustomTabsSession is required for launching a TWA

We recently launched our TWA application and saw a few of these crashes come in. We are using 0.1.0-alpha1. I have not experienced this issue myself so I have no way of reproducing it.

java.lang.NullPointerException: CustomTabsSession is required for launching a TWA
    at androidx.browser.trusted.TrustedWebActivityIntentBuilder.build(TrustedWebActivityIntentBuilder.java:15)
    at com.google.androidbrowserhelper.trusted.TwaLauncher.launchWhenSplashScreenReady(TwaLauncher.java:2)
    at com.google.androidbrowserhelper.trusted.TwaLauncher.lambda$launchWhenSessionEstablished$2(TwaLauncher.java:1)
    at com.google.androidbrowserhelper.trusted.-$$Lambda$TwaLauncher$wy2yMaTyWzqDYy88T6GKCwq94sM.run
    at com.google.androidbrowserhelper.trusted.splashscreens.PwaWrapperSplashScreenStrategy.onSplashImageTransferred(PwaWrapperSplashScreenStrategy.java:2)
    at com.google.androidbrowserhelper.trusted.splashscreens.-$$Lambda$PwaWrapperSplashScreenStrategy$w9o5iqMEy62ZZ2i_sMAmRiQ7IGw.onFinished
    at com.google.androidbrowserhelper.trusted.splashscreens.SplashImageTransferTask$1.onPostExecute(SplashImageTransferTask.java:3)
    at android.os.AsyncTask.finish(AsyncTask.java:695)
    at android.os.AsyncTask.access$600(AsyncTask.java:180)
    at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7050)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 29 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Linking to the issue on bugs.chromium.org: https://bugs.chromium.org/p/chromium/issues/detail?id=1052367

@rockeynebhwani would you have an updated list of devices where the crash is happening?