Open monstermac77 opened 1 year ago
try updating dependencies
implementation 'com.google.androidbrowserhelper:billing:1.0.0-alpha10'
implementation 'com.google.androidbrowserhelper:androidbrowserhelper:2.5.0'
We are on the above specified versions and we continue to get clientAppUnavailable error. @monstermac77 are you able to fix it?
@ramakula we have not been able to fix it. At this point, we're looking now at switching to native push notifications for our TWA (now that postMessage support has been added, allowing easy communication between the Android wrapper and web app), and once we've done that I think we'll revive our native Android billing inside the wrapper, so that we can just use something we know works, since the support for billing in a TWA is pretty scant right now. We're probably losing 10% of Android revenue do to this.
That said, we've posted this issue all over the place, so maybe as more people adopt TWA and struggle with billing, Google will handle this issue.
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.