Open monstermac77 opened 1 year ago
This sounds like an issue more appropriate to file at https://github.com/GoogleChrome/android-browser-helper/ or bugs.chromium.org.
I found the solution for this error: https://github.com/GoogleChromeLabs/bubblewrap/issues/640#issuecomment-2020384965 Non-obvious behavior and lack of understandable logs. I don't know where the problem lies, maybe in Chrome Custom Tabs.
We recently released our TWA (our app) to customers and on day 1 are experiencing a very consistent issue with Google Play Billing. When we try to call
getDetails()
on a SKU as well as when we calllistPurchases()
, we receive a "DOMException: clientAppUnavailable", and the promise fails. Here are the tracebacks:We are confident though that Play Services are being initialized:
After a lot of debugging, our current lead is that the issue may be with our Delegation Service. On Android 11, the Delegation Service runs and the extra command handler is registered successfully. On Android 13, the Delegation Service fails to run and a clientAppUnavailable DOM exception is raised. Below are all the files we believe are relevant:
web_app_manifest.json
AndroidManifest.xml
build.gradle(:app)
DelegationService.kt
manifest.json (on our server)
purchase.js
Here's our device information:
Device: Galaxy A03s (working)
Device: Galaxy S22 Ultra (not working)
Here's a comprehensive list of everything we've tried so far:
It seems like others have encountered this issue as well, although any fix they found did not work for us, and they in general were targeting older SDK versions:
Thank you so much for any assistance you can provide. We're really excited about our new PWA and this is the only major issue we've encountered during our conversion from native.