Skip to content

Fix repeated DFE paging keys#122

Merged
anod merged 6 commits into
masterfrom
fix-crash-9aff3a42
May 27, 2026
Merged

Fix repeated DFE paging keys#122
anod merged 6 commits into
masterfrom
fix-crash-9aff3a42

Conversation

@anod

@anod anod commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Stop DFE endpoint paging when Play Store returns a blank, missing, or repeated continuation URL, preventing AndroidX Paging from receiving the same nextKey twice.
  • Update the open-source licenses flow from the legacy Google OSS licenses activity to play-services-oss-licenses:17.5.1 and the v2 OssLicensesMenuActivity.
  • Add a targeted app log before launching open-source licenses so future Crashlytics logs can confirm that settings flow directly.
  • Document a public-safe workflow for checking Firebase Crashlytics issue/event details from console URLs in .github/copilot-instructions.md.

Crashlytics fixes checked

  • Paging crash: fatal IllegalStateException from AndroidX Paging because the Play Store endpoint returned the same continuation URL; fixed by treating repeated continuations as end-of-pagination.
  • OSS licenses crash: fatal Resources$NotFoundException: Resource ID #0x0 inside Google OSS licenses legacy fragment; logs did not contain an explicit settings click, so the fix updates to the current v2 licenses activity and adds an app-owned log at launch.

How to check Crashlytics crashes

  • Extract the issue id and event id from the Firebase Console URL for local investigation.
  • Use Firebase Console or authenticated local tooling to inspect issue and event details.
  • Do not publish Firebase project ids, app ids, OAuth tokens, raw logs, or private Crashlytics URLs in commits, PR descriptions, or public docs.

Validation

  • .\gradlew.bat :app:testDebugUnitTest --tests "com.anod.appwatcher.search.ListEndpointPagingSourceTest"
  • .\gradlew.bat :app:testDebugUnitTest
  • .\gradlew.bat ktlintCheck
  • .\gradlew.bat :app:assembleDebug :app:testDebugUnitTest ktlintCheck --no-daemon
  • .\gradlew.bat --quiet :app:dependencyInsight --dependency play-services-oss-licenses --configuration releaseRuntimeClasspath resolves com.google.android.gms:play-services-oss-licenses:17.5.1

Treat repeated Play Store continuation URLs as the end of pagination so Paging does not receive the same nextKey twice.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 27, 2026 18:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens DFE-based pagination in ListEndpointPagingSource by preventing Paging from receiving a repeated continuation URL as nextKey, treating that condition (and missing/blank continuations) as end-of-pagination.

Changes:

  • Added a small helper (resolveNextPageUrl) to normalize/validate the next-page continuation URL (null/blank/repeated → null).
  • Updated ListEndpointPagingSource.load() to use the resolved nextKey and improved debug logging to show requested → resolved continuation.
  • Added unit coverage for new/repeated/missing/blank continuation URL behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/src/main/java/com/anod/appwatcher/search/ListEndpointPagingSource.kt Ensures pagination stops when the server repeats or omits the continuation URL, avoiding duplicate nextKey emissions.
app/src/test/java/com/anod/appwatcher/search/ListEndpointPagingSourceTest.kt Adds regression tests covering repeated, missing, and blank continuation URLs.

Use the current v2 open source licenses activity and SDK to avoid crashes in the legacy Google licenses fragment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 27, 2026 18:35
Add Firebase CLI and Crashlytics REST API steps for checking issue and event details from crash URLs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
anod and others added 3 commits May 27, 2026 21:35
Restore top-level Markdown headings and bullets for the new Crashlytics investigation instructions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use a Markdown-safe issue id placeholder in Crashlytics lookup instructions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep Crashlytics lookup guidance generic and avoid publishing Firebase identifiers, tokens, raw logs, or private URLs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread gradle/libs.versions.toml
@anod
anod merged commit e631e09 into master May 27, 2026
3 checks passed
@anod
anod deleted the fix-crash-9aff3a42 branch May 27, 2026 18:43
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.

2 participants