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 orphaned data warning #16413

Merged
merged 2 commits into from
Nov 8, 2022
Merged

Fix orphaned data warning #16413

merged 2 commits into from
Nov 8, 2022

Conversation

segun
Copy link
Contributor

@segun segun commented Nov 8, 2022

Explanation

We have some messages we send back/forth between UI and background without using the multiplexer, this generates lots of warnings in the console. ObjectMultiplex - orphaned data for stream "${message}".

This PR fixes this by asking the multiplexer to ignore these messages.

Screenshots/Screencaps

image

Manual Testing Steps

  1. Checkout develop branch
  2. Start MetaMask in MV3 mode yarn start:mv3
  3. Launch MetaMask
  4. Launch dev-tools, set console level to warn
  5. See the warnings in the console.
  6. Checkout this PR
  7. Do stem 2 to 4 again
  8. See that the warnings no longer show.

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

If further QA is required (e.g. new feature, complex testing steps, large refactor), add the Extension QA Board label.

In this case, a QA Engineer approval will be be required.

@segun segun requested a review from a team as a code owner November 8, 2022 10:19
@segun segun requested a review from digiwand November 8, 2022 10:19
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

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.

segun added 2 commits November 8, 2022 14:23
Signed-off-by: Akintayo A. Olusegun <[email protected]>
@segun segun force-pushed the fix-orphaned-data-warning branch from b545aba to 5ed0dab Compare November 8, 2022 10:23
@metamaskbot
Copy link
Collaborator

Builds ready [5ed0dab]
Page Load Metrics (2158 ± 89 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint912193226455219
domContentLoaded17192395212417986
load17532463215818489
domInteractive17192395212417986

@brad-decker brad-decker merged commit aba3b94 into develop Nov 8, 2022
@brad-decker brad-decker deleted the fix-orphaned-data-warning branch November 8, 2022 22:38
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2022
@@ -9,6 +9,14 @@ import pump from 'pump';
*/
export function setupMultiplex(connectionStream) {
const mux = new ObjectMultiplex();
/**
* We are using this streams to send keep alive message between backend/ui without setting up a multiplexer
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe

Suggested change
* We are using this streams to send keep alive message between backend/ui without setting up a multiplexer
* We are using these streams to send state and keep-alive messages between the backend and ui without setting up multiplex connections.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants