Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DigitalGoodsService not working after app installation, have to close the app and reopen to work #498

Open
fabiel-leon-autofact opened this issue Mar 24, 2025 · 0 comments

Comments

@fabiel-leon-autofact
Copy link

Describe the bug
After installation the DigitalGoodsService api is unavailable DigitalGoodsService error: OperationError: clientAppUnavailable clientAppUnavailable , i have to close the app and reopen to have access
iam executing this code

 try {
     const e = await window.getDigitalGoodsService("https://play.google.com/billing");
     if (e) {
        const s = await e.listPurchases();
        console.log("Second verifications: ", s),
        this.result = !0
      }
     } catch (e) {
        console.error("DigitalGoodsService error:", e)
     }

To Reproduce
Steps to reproduce the behavior:

  1. Install an app that List purchases on first render
  2. Open the app after installation and crash
  3. Close the app and reopen <<- IT WORKS
  4. uninstall and repeat from step 1

Expected behavior
Digital goods api should work after installation

Did this ever used to work
IDK, first time using twa.

Screenshots
Image

Smartphone (please complete the following information):

  • Device: Pixel 8 Pro API 35 , and others phones
  • OS: Android 15
  • Browsers Installed Chrome
  • Browser Versions 133.0.6943.21
  • 'com.google.androidbrowserhelper:androidbrowserhelper:2.5.0'
    'com.google.androidbrowserhelper:billing:1.0.0-alpha11'

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant