Skip to content

Query tips and the subscription separately - #196

Merged
emir-hasanbegovic merged 1 commit into
mainfrom
fix/billing-catalog-query-split
Sep 14, 2026
Merged

emir-hasanbegovic merged 1 commit into
mainfrom
fix/billing-catalog-query-split

Conversation

@emir-hasanbegovic

Copy link
Copy Markdown
Contributor

On the 2.1.0 Play build the donate screen sits on "Contacting Google Play..." forever. Logcat on a Pixel 8 running the internal-testing install shows IllegalArgumentException: All products should be of the same product type escaping into the application scope: the catalog query mixed the six INAPP tips and the SUBS product in one QueryProductDetailsParams, and its builder rejects that before any call to Play. The open() job died and the state never left CONNECTING.

  • PlayBillingGateway.catalog runs one queryProductDetailsAsync per product type and merges the results, the way ownedPurchases already does
  • TipJarSource.open treats any gateway exception as UNAVAILABLE (cancellation rethrown), so the screen can no longer wedge on the spinner
  • Fake gateway gains a throwing hook; new test covers the wedge

Tests: :app:testPlayDebugUnitTest --tests "*TipJarSourceTest" (12 pass), :app:ktlintCheck, :app:detekt. Needs a 2.1.1 Play build; 2.1.0 on internal testing cannot sell anything.

On the 2.1.0 Play build the donate screen never leaves "Contacting Google
Play": the catalog query put the six INAPP tips and the SUBS product in one
QueryProductDetailsParams, whose builder throws "All products should be of
the same product type". The exception escaped the open() coroutine into
the application scope, so the state stayed CONNECTING. The gateway now runs
one query per product type and merges the results, and open() turns any
gateway exception into UNAVAILABLE instead of wedging.
@emir-hasanbegovic
emir-hasanbegovic enabled auto-merge (squash) September 14, 2026 21:56
@emir-hasanbegovic
emir-hasanbegovic merged commit a693ec0 into main Sep 14, 2026
9 checks passed
@emir-hasanbegovic
emir-hasanbegovic deleted the fix/billing-catalog-query-split branch September 14, 2026 22:05
emir-hasanbegovic added a commit that referenced this pull request Sep 14, 2026
The HTML report only says "Test instrumentation process crashed. Check
<test>.txt for details"; that file lives under
app/build/outputs/androidTest-results and never reached the artifact, so
the crash on main's post-merge run for #196 cannot be diagnosed. The
upload now carries that directory alongside the report.
emir-hasanbegovic added a commit that referenced this pull request Sep 14, 2026
2.1.0 reached internal testing with a donate screen that cannot load its
catalog (#196), so the Play rollout continues as 2.1.1 (code 20101).

- CHANGELOG gets a dated 2.1.1 entry with the fix
- `changelogs/20101.txt` in all five locales repeats the 2.1.0 copy with
the version bumped, since no production user saw 2.1.0

Tests: `EXPECTED_VERSION_CODE=20101 python
scripts/check_play_metadata.py` passes (0 errors, 0 warnings). Tag 2.1.1
only after this and #196 are both on main.
emir-hasanbegovic added a commit that referenced this pull request Sep 14, 2026
The HTML report only says "Test instrumentation process crashed. Check
<test>.txt for details"; that file lives under
app/build/outputs/androidTest-results and never reached the artifact, so
the crash on main's post-merge run for #196 cannot be diagnosed. The
upload now carries that directory alongside the report.
emir-hasanbegovic added a commit that referenced this pull request Sep 14, 2026
…199)

Main's post-merge emulator run for #196 (run 34902301799, attempt 2)
failed with "Test instrumentation process crashed. Check
`SatelliteProtocolTest#pairWithPin_reachesLive_withValidatedProofAndFullDescriptorPut.txt`
for details". That file is written under
`app/build/outputs/androidTest-results/` and the
`instrumented-test-results` artifact only carries
`app/build/reports/androidTests/`, so the crash left no evidence.

- The upload step now also includes
`app/build/outputs/androidTest-results/` (same artifact, same retention)

Tests: YAML parses; no job logic changes. The first emulator run on this
PR exercises the step.
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

Successfully merging this pull request may close these issues.

1 participant