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

Error: No metadata found for 'conversionRate' #26356

Closed
sentry-io bot opened this issue Aug 9, 2024 · 2 comments · Fixed by #26383
Closed

Error: No metadata found for 'conversionRate' #26356

sentry-io bot opened this issue Aug 9, 2024 · 2 comments · Fixed by #26383
Assignees
Labels
regression-prod-12.0.1 Regression bug that was found in production in release 12.0.1 release-12.3.0 Issue or pull request that will be included in release 12.3.0 Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. team-extension-platform type-bug

Comments

@sentry-io
Copy link

sentry-io bot commented Aug 9, 2024

Sentry Issue: METAMASK-XBJY

Error: No metadata found for 'conversionRate'
  at Array.reduce (<anonymous>)
  at ComposableObservableStore.updateStructure (app/scripts/lib/ComposableObservableStore.js:81:13)
  at new MetamaskController (app/scripts/metamask-controller.js:2010:16)
  at setupController (app/scripts/background.js:533:16)
  at initialize (app/scripts/background.js:298:5)
...
(3 additional frame(s) were not displayed)
@Gudahtt Gudahtt added type-bug regression-prod-12.0.1 Regression bug that was found in production in release 12.0.1 labels Aug 9, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Aug 9, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Aug 9, 2024
@Gudahtt Gudahtt added the Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. label Aug 9, 2024
@desi
Copy link
Contributor

desi commented Aug 12, 2024

@Gudahtt Do you know what team would be best to assign this to?

@Gudahtt
Copy link
Member

Gudahtt commented Aug 12, 2024

Extension platform, I have added the label

@danjm danjm closed this as completed in ac638f1 Aug 13, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Aug 13, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by severity Aug 13, 2024
@metamaskbot metamaskbot added the release-12.4.0 Issue or pull request that will be included in release 12.4.0 label Aug 13, 2024
danjm added a commit that referenced this issue Aug 13, 2024
…#26383)

We are seeing the following sorts of errors in production, as reported
by sentry, in v12.0.2:
`No metadata found for 'conversionDate'`
`No metadata found for 'usdConversionRate'`
`No metadata found for 'nativeCurrency'`
`No metadata found for 'conversionRate'`

Example issue:
https://metamask.sentry.io/issues/5682684113/events/b8006eebb65749f883e907242e52215b/?project=273505&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D+No+metadata+release%3A12.0.1&referrer=previous-event&statsPeriod=14d&stream_index=1

The `CurrencyRateController` stopped using six such properties with
MetaMask/core#1805, which was brought into the
extension with #21549, however, there was not a state migration to
delete those properties at the time

This PR adds migrations to delete those obsolete properties

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26383?quickstart=1)

Fixes: #26356

To observe the error using steps that mimic users in production
1. Install v11.6.0 and onboard
2. Create a local dev build from the `master` branch
3. Update the v11.6.0 install to the local dev build
4. See the errors in the service worker console

If you repeat those steps, but in step two build from this branch
instead of the `master` branch, the errors will not occur

For a faster manual test of this PR, create a local development build of
this branch and then run this script in the service worker console:
```
window.chrome.storage.local.get(({ data, meta }) => chrome.storage.local.set({ data: { ...data, CurrencyController: { ...data.CurrencyController, conversionDate: 'Jan 1', conversionRate: '2', nativeCurrency: 'test' } }, meta: {...meta, version: 120 } }, () => { chrome.runtime.reload() }))
```
There should be no errors like `No metadata found for 'conversionRate'`
(but if you do the same on develop or master, those errors should be
present)

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<!-- [screenshots/recordings] -->

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Mark Stacey <[email protected]>
Gudahtt added a commit that referenced this issue Aug 13, 2024
…#26383)

We are seeing the following sorts of errors in production, as reported
by sentry, in v12.0.2:
`No metadata found for 'conversionDate'`
`No metadata found for 'usdConversionRate'`
`No metadata found for 'nativeCurrency'`
`No metadata found for 'conversionRate'`

Example issue:
https://metamask.sentry.io/issues/5682684113/events/b8006eebb65749f883e907242e52215b/?project=273505&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D+No+metadata+release%3A12.0.1&referrer=previous-event&statsPeriod=14d&stream_index=1

The `CurrencyRateController` stopped using six such properties with
MetaMask/core#1805, which was brought into the
extension with #21549, however, there was not a state migration to
delete those properties at the time

This PR adds migrations to delete those obsolete properties

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26383?quickstart=1)

Fixes: #26356

To observe the error using steps that mimic users in production
1. Install v11.6.0 and onboard
2. Create a local dev build from the `master` branch
3. Update the v11.6.0 install to the local dev build
4. See the errors in the service worker console

If you repeat those steps, but in step two build from this branch
instead of the `master` branch, the errors will not occur

For a faster manual test of this PR, create a local development build of
this branch and then run this script in the service worker console:
```
window.chrome.storage.local.get(({ data, meta }) => chrome.storage.local.set({ data: { ...data, CurrencyController: { ...data.CurrencyController, conversionDate: 'Jan 1', conversionRate: '2', nativeCurrency: 'test' } }, meta: {...meta, version: 120 } }, () => { chrome.runtime.reload() }))
```
There should be no errors like `No metadata found for 'conversionRate'`
(but if you do the same on develop or master, those errors should be
present)

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<!-- [screenshots/recordings] -->

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Mark Stacey <[email protected]>
@gauthierpetetin gauthierpetetin added release-12.3.0 Issue or pull request that will be included in release 12.3.0 and removed release-12.4.0 Issue or pull request that will be included in release 12.4.0 labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-prod-12.0.1 Regression bug that was found in production in release 12.0.1 release-12.3.0 Issue or pull request that will be included in release 12.3.0 Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. team-extension-platform type-bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants