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

Crash on VPN billing #27751

Closed
SergeyZhukovsky opened this issue Jan 11, 2023 · 5 comments · Fixed by brave/brave-core#16795 or RevenueCat/purchases-android#1248
Closed

Crash on VPN billing #27751

SergeyZhukovsky opened this issue Jan 11, 2023 · 5 comments · Fixed by brave/brave-core#16795 or RevenueCat/purchases-android#1248
Assignees
Labels
crash OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA/Yes release-notes/include

Comments

@SergeyZhukovsky
Copy link
Member

I found that crash stack on GPS on 1.46.x stable build. It looks like we need to limit retries in that place https://github.com/brave/brave-core/blob/1.46.x/android/java/org/chromium/chrome/browser/vpn/utils/InAppPurchaseWrapper.java#L181

Crash stack:

Exception java.lang.IllegalStateException: Too many bind requests(999+) for service Intent { act=com.android.vending.billing.InAppBillingService.BIND pkg=com.android.vending cmp=com.android.vending/com.google.android.finsky.billing.iab.InAppBillingService (has extras) }
  at android.app.ContextImpl.bindServiceCommon (ContextImpl.java:2115)
  at android.app.ContextImpl.bindService (ContextImpl.java:2024)
  at android.content.ContextWrapper.bindService (ContextWrapper.java:870)
  at com.android.billingclient.api.BillingClientImpl.startConnection (BillingClientImpl.java:55)
  at org.chromium.chrome.browser.vpn.utils.InAppPurchaseWrapper.connectToBillingService (InAppPurchaseWrapper.java:93)
  at org.chromium.chrome.browser.vpn.utils.InAppPurchaseWrapper$1.onBillingServiceDisconnected (InAppPurchaseWrapper.java:202)
  at com.android.billingclient.api.zzaf.onServiceDisconnected (com.android.billingclient:billing@@4.0.0:4)
  at android.app.LoadedApk$ServiceDispatcher.doConnected (LoadedApk.java:2341)
  at android.app.LoadedApk$ServiceDispatcher$RunConnection.run (LoadedApk.java:2381)
  at android.os.Handler.handleCallback (Handler.java:942)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8741)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)
@kjozwiak
Copy link
Member

kjozwiak commented Jan 24, 2023

The above requires 1.47.182 or higher for 1.47.x verification 👍 @Uni-verse @srirambv STR/Cases can be found via brave/brave-core#16795 (comment). Basically spot checking VPN and ensuring everything is working as expected as we don't have exact STR/Cases as the crash report came form the GPS dashboard.

@Uni-verse
Copy link
Contributor

Verified on Samsung GS 21 using version:

Brave	1.47.182 Chromium: 109.0.5414.87 (Official Build) (64-bit) 
Revision	2dc18eb511c56e012081b4abc9e38c81c885f7d4-refs/branch-heads/5414@{#1241}
OS	Android 13; Build/TP1A.220624.014
  • Verified completing purchase flow and VPN functionality
Example Example Example Example Example Example Example
screenshot-1674572338156 screenshot-1674572345285 screenshot-1674572358746 screenshot-1674572366576 screenshot-1674572376716 screenshot-1674572426132 screenshot-1674572604788

@SergeyZhukovsky
Copy link
Member Author

That is still a problem and I see it in 1.47.x in GPS. We need to take a look on what could cause it as it looks like it's not related to retries.

@kjozwiak
Copy link
Member

kjozwiak commented Mar 8, 2023

@SergeyZhukovsky I moved the above back into 1.48.x - Release #4 as the original PR associated with this fix was merged/released via 1.48.x - Release #4 and mentioned in the release notes. I created a duplicate via #28946. I also updated both brave/brave-core#17495 and brave/brave-core#17499 to use #28946.

@SergeyZhukovsky
Copy link
Member Author

@kjozwiak sounds good, I will duplicate such issues in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA/Yes release-notes/include
Projects
None yet
6 participants