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: Add migration to fix NotificationServicesController bug #12219

Merged
merged 13 commits into from
Nov 7, 2024

Conversation

kylanhurt
Copy link
Contributor

@kylanhurt kylanhurt commented Nov 6, 2024

Description

The purpose of this PR is to fix an error apparently caused by a missing NotificationServicesController property on the state.engine.backgroundState

Related issues

Fixes: #12207

Manual testing steps

Although we didn't pinpoint what was causing the NotificationServicesController to be missing, this code fills in the data if it is missing.

Screenshots/Recordings

n/a

Before

n/a

After

n/a

Pre-merge author checklist

Pre-merge reviewer checklist

  • 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.

Copy link
Contributor

github-actions bot commented Nov 6, 2024

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@kylanhurt kylanhurt added the regression-prod-7.33.0 Regression bug that was found in production in release 7.33.0 label Nov 6, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.22%. Comparing base (9f29292) to head (030cbab).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12219      +/-   ##
==========================================
+ Coverage   55.78%   56.22%   +0.43%     
==========================================
  Files        1786     1787       +1     
  Lines       40362    40369       +7     
  Branches     5054     5061       +7     
==========================================
+ Hits        22516    22696     +180     
+ Misses      16297    16124     -173     
  Partials     1549     1549              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

app/store/migrations/060.ts Outdated Show resolved Hide resolved
@tommasini
Copy link
Contributor

Let's also add the verification to the getTags file
add this checks here if you have the time please

 if (!state?.engine?.backgroundState?.AccountsController) return;
  if (!state?.engine?.backgroundState?.NftController) return;
  if (!state?.engine?.backgroundState?.NotificationServicesController) return;
  if (!state?.engine?.backgroundState?.TokensController) return;
  if (!state?.engine?.backgroundState?.TransactionController) return;

@kylanhurt kylanhurt added Run Smoke E2E Triggers smoke e2e on Bitrise type-bug Something isn't working labels Nov 7, 2024
@kylanhurt kylanhurt marked this pull request as ready for review November 7, 2024 18:13
@kylanhurt kylanhurt requested a review from a team as a code owner November 7, 2024 18:13
@MetaMask MetaMask deleted a comment from github-actions bot Nov 7, 2024
Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

@kylanhurt kylanhurt added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 7, 2024
Copy link
Contributor

github-actions bot commented Nov 7, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: ecbcfa9
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/bcb9f66f-5d66-4656-b826-24f2ac8b7332

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@kylanhurt kylanhurt added this pull request to the merge queue Nov 7, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 7, 2024
Copy link

sonarcloud bot commented Nov 7, 2024

@sethkfman sethkfman added this pull request to the merge queue Nov 7, 2024
Merged via the queue into main with commit 8d65907 Nov 7, 2024
36 of 37 checks passed
@sethkfman sethkfman deleted the kylan/fix/notification-services-controller branch November 7, 2024 21:36
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2024
@gauthierpetetin gauthierpetetin added the release-7.36.0 Issue or pull request that will be included in release 7.36.0 label Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression-prod-7.33.0 Regression bug that was found in production in release 7.33.0 release-7.36.0 Issue or pull request that will be included in release 7.36.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform type-bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Sentry] TypeError: undefined is not an object (evaluating 't.metamaskNotificationsList')
7 participants