0

I have just published my Instant App (IA) to the production channel but experiencing issues with the "Try Now" functionality. The app downloads, attempts to open but then crashes with the below errors appearing in the logs. The default URL for the IA is brant.app/oceanlife/instant and following the download, navigating to this URL correctly loads the IA.

The experience from Try Now though appears broken...

2019-05-03 11:49:15.896 1146-3755/? E/ActivityManager: applyOptionsLocked: Unknown animationType=0
2019-05-03 11:49:15.904 20657-20806/? E/libc: Access denied finding property "vendor.debug.egl.profiler"
2019-05-03 11:49:16.025 20657-20831/? E/libc: Access denied finding property "ro.vendor.graphics.memory"
2019-05-03 11:49:16.044 20657-20831/? E/libc: Access denied finding property "vendor.gralloc.enable_ahardware_buffer"
2019-05-03 11:49:17.250 24917-20500/? E/ctxmgr: [AppIntervalImpl]closeInterval: ongoing [CONTEXT service_id=47 ]
    com.android.volley.VolleyError: Unable to obtain auth token - is the device online?
        at eme.a(:com.google.android.gms@16091037@16.0.91 (100400-244116403):31)
        at eha.run(:com.google.android.gms@16091037@16.0.91 (100400-244116403):2)
        at egy.handleMessage(:com.google.android.gms@16091037@16.0.91 (100400-244116403):3)
        at rlu.run(:com.google.android.gms@16091037@16.0.91 (100400-244116403):8)
        at rmf.b(:com.google.android.gms@16091037@16.0.91 (100400-244116403):32)
        at rmf.run(:com.google.android.gms@16091037@16.0.91 (100400-244116403):18)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at rsc.run(Unknown Source:7)
        at java.lang.Thread.run(Thread.java:764)
2019-05-03 11:49:18.061 862-21776/? E/installd: Failed to delete /data/app/vmdl2072380660.tmp: No such file or directory
2019-05-03 11:49:18.188 20847-20847/? E/com.oceanlife: Not starting debugger since process cannot load the jdwp agent.
2019-05-03 11:49:18.290 20847-20863/? E/libc: Access denied finding property "vendor.debug.egl.profiler"
2019-05-03 11:49:18.358 1991-2008/? E/Icon: Unable to find pkg=com.oceanlife for icon Icon(typ=RESOURCE pkg=com.oceanlife id=0x7f070084)
    android.content.pm.PackageManager$NameNotFoundException: com.oceanlife
        at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:395)
        at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:377)
        at android.graphics.drawable.Icon.loadDrawableInner(Icon.java:345)
        at android.graphics.drawable.Icon.loadDrawable(Icon.java:313)
        at android.service.notification.NotificationListenerService.createLegacyIconExtras(NotificationListenerService.java:1172)
        at android.service.notification.NotificationListenerService.access$100(NotificationListenerService.java:94)
        at android.service.notification.NotificationListenerService$NotificationListenerWrapper.onNotificationPosted(NotificationListenerService.java:1234)
        at android.service.notification.INotificationListener$Stub.onTransact(INotificationListener.java:72)
        at android.os.Binder.execTransact(Binder.java:731)
2019-05-03 11:49:18.358 12768-12780/? E/Icon: Unable to find pkg=com.oceanlife for icon Icon(typ=RESOURCE pkg=com.oceanlife id=0x7f070084)
    android.content.pm.PackageManager$NameNotFoundException: com.oceanlife
        at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:395)
        at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:377)
        at android.graphics.drawable.Icon.loadDrawableInner(Icon.java:345)
        at android.graphics.drawable.Icon.loadDrawable(Icon.java:313)
        at android.service.notification.NotificationListenerService.createLegacyIconExtras(NotificationListenerService.java:1172)
        at android.service.notification.NotificationListenerService.access$100(NotificationListenerService.java:94)
        at android.service.notification.NotificationListenerService$NotificationListenerWrapper.onNotificationPosted(NotificationListenerService.java:1234)
        at android.service.notification.INotificationListener$Stub.onTransact(INotificationListener.java:72)
        at android.os.Binder.execTransact(Binder.java:731)
2019-05-03 11:49:18.359 13290-13309/? E/Icon: Unable to find pkg=com.oceanlife for icon Icon(typ=RESOURCE pkg=com.oceanlife id=0x7f070084)
    android.content.pm.PackageManager$NameNotFoundException: com.oceanlife
        at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:395)
        at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:377)
        at android.graphics.drawable.Icon.loadDrawableInner(Icon.java:345)
        at android.graphics.drawable.Icon.loadDrawable(Icon.java:313)
        at android.service.notification.NotificationListenerService.createLegacyIconExtras(NotificationListenerService.java:1172)
        at android.service.notification.NotificationListenerService.access$100(NotificationListenerService.java:94)
        at android.service.notification.NotificationListenerService$NotificationListenerWrapper.onNotificationPosted(NotificationListenerService.java:1234)
        at android.service.notification.INotificationListener$Stub.onTransact(INotificationListener.java:72)
        at android.os.Binder.execTransact(Binder.java:731)
2019-05-03 11:49:18.360 28965-17990/? E/Icon: Unable to find pkg=com.oceanlife for icon Icon(typ=RESOURCE pkg=com.oceanlife id=0x7f070084)
    android.content.pm.PackageManager$NameNotFoundException: com.oceanlife
        at android.app.ApplicationPackageManager.getApplicationInfoAsUser(ApplicationPackageManager.java:395)
        at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:377)
        at android.graphics.drawable.Icon.loadDrawableInner(Icon.java:345)
        at android.graphics.drawable.Icon.loadDrawable(Icon.java:313)
        at android.service.notification.NotificationListenerService.createLegacyIconExtras(NotificationListenerService.java:1172)
        at android.service.notification.NotificationListenerService.access$100(NotificationListenerService.java:94)
        at android.service.notification.NotificationListenerService$NotificationListenerWrapper.onNotificationPosted(NotificationListenerService.java:1234)
        at android.service.notification.INotificationListener$Stub.onTransact(INotificationListener.java:72)
        at android.os.Binder.execTransact(Binder.java:731)

What could be the reason for "Try Now" not working?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
BrantApps
  • 6,362
  • 2
  • 27
  • 60
  • Did you try on a different device? Also, do you happen to have stacktraces from a crash reporting tool (Android Vitals in Google Play Developer Console, or Crashlytics, etc...)? I think what you posted isn't the cause for the crash, as I remember seeing similar system traces when running instant apps, and they don't crash the app. – Hassan Ibraheem May 04 '19 at 06:19
  • Hi Hassan, thanks for getting back. Nothing in Vitals or Crashlytics! Could you try and start my instant app and see if the try now button works? It resides here; https://play.google.com/store/apps/details?id=com.oceanlife – BrantApps May 05 '19 at 23:29
  • Thanks. Why do you think it's crashing? It doesn't appear to be crashing for me, but looks like the application finishes itself. Maybe check in your code if you explicitly call `finish()` in some flows that the instant app is hitting, or some intent firing order is causing the app to close right away? – Hassan Ibraheem May 06 '19 at 04:31
  • 1
    You're right, there is one flow that causes a finish() call.... When the URL is malformed. Alas, i'm not sure how it would be wrong since the instant app uses the default URL? Wondering if it isn't as simple as that when running under prod. Analytics time! Will report back... – BrantApps May 06 '19 at 15:37
  • 1
    I think Google Play adds some parameters to the URL on its own. I think the only one I saw was `?referrer=` where you get a URL encoded string of UTM parameters for tracking. Hope this helps. – Hassan Ibraheem May 06 '19 at 16:01
  • Ah I bet that's it. Trying now... – BrantApps May 06 '19 at 16:53
  • That was it Hassan! Add that as an answer and I'll adorn you your SO points. Thing I did wrong was basically centered around an equality check on the default-url to default some values for the try-now experience. Couldn't be a string equality since unknown params were added to the URL as you described. – BrantApps May 07 '19 at 00:46

1 Answers1

1

The stacktraces posted are warnings happening outside the app, and shouldn't cause issues in the app itself. While the app isn't crashing, it appears to be just finishing itself.

Google Play may add some query parameters, particularly for instant apps. You may get an extra referrer query parameter that indicates where the user is coming from (Same format as the install referrer), which your parsing may not expect from instant app URLs.

Hassan Ibraheem
  • 2,329
  • 1
  • 17
  • 23