2

Here I developed one app with instant app supported with the document of Android Instant App.

The App and Instant App has the same version code, App is published as open beta testing, Instant App is published as pre-release.

It's running well on my device, it can be launch through dynamic link in Google App, Chrome, Email, but since several hours ago it always jump to the related web site.

I have cleared the both cache data and app data of Google Play Service and Google Play Service for Instant App, re-login my google account, re-enable instant app, cleared the Chrome history and cache data, re-login my google account in Chrome. Re-checked the assetslink.json, re-checked the urls intent in manifest file, all are the same as previous version, nothing changed except the version code build.gradle.

I tested wish, it's instant app can be opened in Chrome, but my Instant App can not be opened, only show me the web site, even with the adb command to launch.

adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d https://xxxx.xxxx.com/index.html -n "com.google.android.instantapps.supervisor/.UrlHandler"

Only the debug version can be access with WH Dev Manager running.

Developmemt Environment

  • The android device is Pixel Android 7.1.2
  • Android Studio is 3.0
  • Canary 7 Build #AI-171.4182969, built on July 15, 2017
  • JRE:1.8.0_152-release-884-b01 x86_64
  • JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  • Mac OS X 10.11.6

Website is hosted on Amazon S3, the domain name is handled by CloudFront.

What should I check next?

New:

After check the logcat output carefully, found one line as below

07-21 11:32:24.650 20801-20801/? W/cr_GoogleAuth:  
Bad URI 'intent://xs4js.app.goo.gl/qL6j#Intent;package=com.google.android.gms;scheme=https;S.browser_fallback_url=https://xxxx.xxxx.com/index.html;end;'

Update:

Found another info in logcat.

07-23 20:35:51.456 1977-27698/? W/Conscrypt: Could not set socket write timeout:

07-23 20:35:51.458 1977-27698/? W/Conscrypt:    

java.lang.reflect.Method.invoke(Native Method)

07-23 20:35:51.458 1977-27698/? W/Conscrypt: wrp.a(:com.google.android.gms:58)

07-23 20:35:52.651 26256-27085/? I/cr_omaha: Attempting to schedule next job for: Mon Jul 24 01:06:11 PDT 2017

07-23 20:35:52.665 26256-26256/? I/cr_omaha: Scheduled using JobService

07-23 20:35:52.665 26256-26256/? E/cr_BkgrdTaskJS: Tried finishing non-current BackgroundTask.

07-23 20:35:52.736 26916-26916/? E/OptInDirector: Instant app launch failed for an unknown reason (getInstantAppPreLaunchInfo failed - check previous logcat)

07-23 20:35:52.736 26916-26916/? E/Supervisor: Opt-in aborted.

07-23 20:35:52.737 26916-26916/? W/Supervisor: Fallback handler not found with CATEGORY_BROWSABLE
Prags
  • 2,457
  • 2
  • 21
  • 38
Rui.Xie
  • 51
  • 8
  • 1
    Please try this: 1. Google > Instant Apps > turn "off" (top-right) | 2. Uninstall ⸢Google Play services for Instant Apps⸥ (and if the installed-app is installed, also uninstall) | 3. re-run your instant-app – TWL Jul 24 '17 at 22:21
  • Have tried re-install Google Play Service for Instant Apps, but it's still not work. – Rui.Xie Jul 25 '17 at 10:48
  • A critical step is `1. Google > Instant Apps > turn "off" (top-right)` before uninstall, did you do this? – TWL Jul 25 '17 at 23:33
  • yes, for sure. Have tried such steps. 1. Delete all app data in [Google Play Service]. 2. Delete All app data in [Google Game Service]. 3. Delete all app data in [Google Play Service for Instant Apps]. 4. Turn off [Instant Apps]. 5. Uninstall [Google Play Service for Instant Apps]. 6. Re enable [Instant Apps] it will reinstall [Google Play Service for Instant Apps] 7. Run Debug Instant App. 8. Clear Debug Instant Apps data. 9. Uninstall [Install Apps Dev Manager] from notification. 10. Launch the dynamic link in [Google] But it still has problem. I will attach full log. – Rui.Xie Jul 27 '17 at 02:02
  • @TWL logs here https://s3.amazonaws.com/sanguo-instantapp/logs/instantapplog001 https://s3.amazonaws.com/sanguo-instantapp/logs/instantlog002 One more thing about environment, I'm using VPN on device to sign in US Google Play Account since Instant Apps only available in several regions, just make sure it's working. – Rui.Xie Jul 27 '17 at 02:07
  • @TWL Thanks for reply. I have found the root cause, and solved the problem successfully without any tricky. The root cause is one of our member has changed the distribution countries while publish to open beta, while the selected countries are listed on the list of supported countries for Instant Apps but the truth is they are not actually!! So two hours later when I added United States, it can be opened. – Rui.Xie Jul 27 '17 at 06:08
  • @Rui.Xie Please post this as an answer, as it can help other people – Volo Aug 07 '17 at 09:43

1 Answers1

1

@TWL Thanks for reply. I have found the root cause, and solved the problem successfully without any tricky. The root cause is one of our member has changed the distribution countries while publish to open beta, while the selected countries are listed on the list of supported countries for Instant Apps but the truth is they are not actually!! So two hours later when I added United States, it can be opened.

Rui.Xie
  • 51
  • 8