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

Fix uncaught FirmwareNotRecognized in useAvailableLanguagesForDevice #5701

Merged

Conversation

ofreyssinet-ledger
Copy link
Contributor

@ofreyssinet-ledger ofreyssinet-ledger commented Dec 8, 2023

📝 Description

An error appeared on Sentry for the latest LLD pre-release builds (2.73.0-next.0 and 2.73.0-next.1).
Screenshot 2023-12-08 at 16 49 37

Basically it’s an uncaught exception in a promise in the hook useAvailableLanguagesForDevice that is used notably in the “language settings” section.
It will be triggered every time a user with a wrong value for “My Ledger provider” (a provider for which the device firmware is unknown, for instance provider 1 with a x.y.z-rcA firmware etc.) navigates to the settings.
It was not visible on Sentry previously because the error was a simple “LedgerAPI4xx” and in my remapping of the error to something more specific (“FirmwareNotRecognized”), I didn’t add it to the list of ignored errors for Sentry.

❓ Context

✅ Checklist

Pull Requests must pass the CI and be code reviewed. Set as Draft if the PR is not ready.

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • LLM and LLD device localisation feature (from My Ledger but also from LL settings, by changing the app language to a supported language)

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

Copy link

vercel bot commented Dec 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2023 0:41am
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2023 0:41am
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2023 0:41am
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2023 0:41am
web-tools ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2023 0:41am

@live-github-bot live-github-bot bot added desktop Has changes in LLD mobile Has changes in LLM common Has changes in live-common labels Dec 8, 2023
@ofreyssinet-ledger ofreyssinet-ledger marked this pull request as ready for review December 8, 2023 15:54
@ofreyssinet-ledger ofreyssinet-ledger changed the title Bugfix/live 10534 uncaught firmwarenotrecognized Fix uncaught FirmwareNotRecognized in useAvailableLanguagesForDevice Dec 8, 2023
@ofreyssinet-ledger ofreyssinet-ledger force-pushed the bugfix/LIVE-10534-uncaught-firmwarenotrecognized branch from f5d6109 to 21a2811 Compare December 11, 2023 09:18
@ofreyssinet-ledger ofreyssinet-ledger force-pushed the bugfix/LIVE-10534-uncaught-firmwarenotrecognized branch from 21a2811 to 612eefa Compare December 11, 2023 12:40
@ofreyssinet-ledger ofreyssinet-ledger merged commit 2287d6a into release Dec 11, 2023
@ofreyssinet-ledger ofreyssinet-ledger deleted the bugfix/LIVE-10534-uncaught-firmwarenotrecognized branch December 11, 2023 14:28
aboissiere-ledger pushed a commit that referenced this pull request Dec 14, 2023
…5701)

* fix(common/manager/hooks): catch error in useAvailableLanguagesForDevice

* chore: changeset

* fix(mobile/sentry): add FirmwareNotRecognized to ignored errors

* chore: changeset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Has changes in live-common desktop Has changes in LLD mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants