Detect invalid manifest images during analysis; improve MIME error recovery in Google Play packaging#6133
Open
JudahGabriel with Copilot wants to merge 2 commits into
Open
Detect invalid manifest images during analysis; improve MIME error recovery in Google Play packaging#6133JudahGabriel with Copilot wants to merge 2 commits into
JudahGabriel with Copilot wants to merge 2 commits into
Conversation
Contributor
|
Thanks @Copilot for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
…g error handling - In TryDecodeImageAsync: pass CancellationToken to HTTP request and stream operations so decode validation respects job timeouts - In TryDecodeImageAsync: check the GET response's content-type before attempting image decode. When a hosting platform (e.g. Render.com with SPA routing) serves HTML for a missing .png file, the GET response's Content-Type may differ from the HEAD response. Detecting text/html (etc.) early avoids a spurious pass and fails fast with a clear Undecodable result. - In ValidateFetchedImageAsync: pass CancellationToken through to TryDecodeImageAsync - In TryImageExistsAsync: pass CancellationToken through to ValidateFetchedImageAsync - In packageCreator.ts: add 'Could not find MIME for Buffer' to the list of Bubblewrap errors that trigger a retry using the PWABuilder image proxy, which validates images server-side and returns a clearer error when an image is missing or corrupt
Copilot
AI
changed the title
[WIP] Fix error creating Google Play package
Detect invalid manifest images during analysis; improve MIME error recovery in Google Play packaging
Jul 14, 2026
JudahGabriel
marked this pull request as ready for review
July 14, 2026 22:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a PWA's manifest references missing images (e.g., a Render.com SPA serving
index.htmlfor missing.pngpaths), analysis was passingIconsAreFetchableas valid, allowing Google Play packaging to proceed and fail with Bubblewrap's cryptic"Could not find MIME for Buffer"error.Analysis fix —
ImageValidationService.csNew content-type check in
TryDecodeImageAsync: After fetching the image body via GET, the responseContent-Typeis now validated before attemptingImage.IdentifyAsync. This catches the SPA soft-404 pattern where a HEAD request returnsContent-Type: image/png(MIME-sniffed from the URL extension) but the GET body returnsContent-Type: text/html:application/octet-streamis excluded since some servers use it for valid binary downloads.CancellationToken threading:
TryDecodeImageAsync,ValidateFetchedImageAsync, andTryImageExistsAsyncnow pass the cancellation token through all HTTP requests and stream reads. Previously the decode-validation GET had no cancellation, so it wouldn't respect the 180-second analysis job timeout.Packaging recovery fix —
packageCreator.tsAdded
"Could not find MIME for Buffer"to the set of errors that trigger a retry via the PWABuilder image proxy. The proxy (getSafeImageForAnalysis) validates image bytes server-side and returns a clear400for missing/corrupt images, replacing the opaque Bubblewrap error with actionable feedback.