Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

For #12804 - Catch the exception when querying activities #12807

Merged
merged 1 commit into from
Oct 12, 2022

Conversation

Mugurell
Copy link
Contributor

@Mugurell Mugurell commented Sep 19, 2022

Speculative fix. A simple try-catch over an error that we cannot do anything else about.

Pull Request checklist

  • Quality: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended)
  • Tests: Could not test / reproduce locally.
  • Changelog: This PR includes a changelog entry or does not need one
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features

After merge

  • Milestone: Make sure issues closed by this pull request are added to the milestone of the version currently in development.
  • Breaking Changes: If this is a breaking change, please push a draft PR on Reference Browser to address the breaking issues.

GitHub Automation

Fixes #12804

@mergify
Copy link
Contributor

mergify bot commented Sep 19, 2022

This pull request has conflicts when rebasing. Could you fix it @Mugurell? 🙏

return try {
context.packageManager
.queryIntentActivities(intent, PackageManager.GET_RESOLVED_FILTER)
} catch (e: RuntimeException) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about this. The documentation doesn't show that it can throw an error. Do we have any crash reporting that tells us what error it could be throwing?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see the original issue. Maybe we just catch the TransactionTooLargeException exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on the report from mozilla-mobile/fenix#27042 it seems to me like there is a RuntimeException wrapping the TransactionTooLargeException?

@mergify
Copy link
Contributor

mergify bot commented Sep 23, 2022

This pull request has conflicts when rebasing. Could you fix it @Mugurell? 🙏

@Mugurell Mugurell added the 🛬 needs landing PRs that are ready to land label Oct 12, 2022
@mergify mergify bot merged commit 39b45b3 into mozilla-mobile:main Oct 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🛬 needs landing PRs that are ready to land
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] TransactionTooLargeException from "Open links in apps"
3 participants