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

[Receipts] IO Exception crash #13411

Merged
merged 3 commits into from
Jan 29, 2025
Merged

Conversation

kidinov
Copy link
Contributor

@kidinov kidinov commented Jan 28, 2025

Closes: #13410

Description

We are crashing on IOException when loading a receipt. The PR logs the case and return null which means keep loading

Steps to reproduce

  • Put break point on openConnection
  • Load a receipt
  • When break point hits it, disabled internet
  • Resume -> Notice crash

The tests that have been performed

Above

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@kidinov kidinov requested a review from AnirudhBhat January 28, 2025 13:49
@kidinov kidinov linked an issue Jan 28, 2025 that may be closed by this pull request
@kidinov kidinov added the type: crash The worst kind of bug. label Jan 28, 2025
@kidinov kidinov changed the base branch from trunk to release/21.5 January 28, 2025 13:49
@kidinov kidinov added this to the 21.5 ❄️ milestone Jan 28, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Jan 28, 2025

1 Warning
⚠️ This PR is assigned to the milestone 21.5 ❄️. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 28, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit792252a
Direct Downloadwoocommerce-wear-prototype-build-pr13411-792252a.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 28, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit792252a
Direct Downloadwoocommerce-prototype-build-pr13411-792252a.apk

return interceptAndModifyReceiptResponse(request)
}
): WebResourceResponse? =
if (request.url.toString() == urlToLoad) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea is to modify the response only on the root page. Otherwise, we change mimeType for all the page resources which externally placed (icons, css, js)

@AnirudhBhat AnirudhBhat self-assigned this Jan 29, 2025
Copy link
Contributor

@AnirudhBhat AnirudhBhat left a comment

Choose a reason for hiding this comment

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

Thanks for working on this. LGTM :shipit:

@AnirudhBhat AnirudhBhat merged commit b19d0c1 into release/21.5 Jan 29, 2025
16 of 18 checks passed
@AnirudhBhat AnirudhBhat deleted the 13410-filenotfoundexception branch January 29, 2025 14:24
@ThomazFB
Copy link
Contributor

This is just an update that the changes introduced here are published as a beta through the version 21.5-rc2 and was merged back in the trunk through #13425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: crash The worst kind of bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FileNotFoundException:
5 participants