Skip to content

fix METAMASK-GH2B#9900

Merged
brad-decker merged 1 commit intodevelopfrom
METAMASK-GH2B
Nov 17, 2020
Merged

fix METAMASK-GH2B#9900
brad-decker merged 1 commit intodevelopfrom
METAMASK-GH2B

Conversation

@brad-decker
Copy link
Copy Markdown
Contributor

@brad-decker brad-decker commented Nov 17, 2020

Fixes: METAMASK-GH2B

Explanation: Frequent issues related to missing route tracks due to a route not matching. In the implementation of page tracking, I skipped the root '/confirmation' route. The root confirmation route has no UI representation and redirects the user to the more specific confirmation routes based on type. This has been prone to err so far.

My investigation looked at a handful of error instances, and I noticed that these weren't single confirmation flows. Each of them involves clicking something (like the next button on multiple confirmation screens or an unapproved tx in full screen). I was able to reproduce the error in fullscreen mode by clicking on an unapproved signature request. I could also reproduce by stacking multiple confirmation screens in the correct order (but I did not confirm what that order is) inconsistently.

This complexity of implementation and the resulting error is accidental; there was no requirement to not track this route. I tried to prevent noise in the signal, but these pages might hold a value that we do not yet know of. Most certainly, it isn't worth adding additional noise to our error reports.

I noticed that in fullscreen mode, the confirmation-route also gets triggered with the id of the original window that triggered the approval (confirm-transaction/00000 for example), so I added that path as well as the base to the PATH_NAME_MAP, which is used to compute the PATHS_TO_CHECK constant.

Additionally, I realized I made a mistake in implementing the extra data attributes to attach to this error. This has been resolved so that future instances of this error will hopefully signal actual issues with our routing and will be easier to debug.

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [7f49c26]
Page Load Metrics (454 ± 75 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint358747157
domContentLoaded29590845215675
load29790945415675
domInteractive29590745215675

@brad-decker brad-decker marked this pull request as ready for review November 17, 2020 22:21
@brad-decker brad-decker requested a review from a team as a code owner November 17, 2020 22:21
@brad-decker brad-decker requested a review from rekmarks November 17, 2020 22:21
Copy link
Copy Markdown
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

Makes sense to me!

@brad-decker brad-decker merged commit 520ad05 into develop Nov 17, 2020
@brad-decker brad-decker deleted the METAMASK-GH2B branch November 17, 2020 22:49
@github-actions github-actions bot locked and limited conversation to collaborators Nov 17, 2020
@Gudahtt
Copy link
Copy Markdown
Member

Gudahtt commented Nov 18, 2020

Additionally, I realized I made a mistake in implementing the extra data attributes to attach to this error. This has been resolved so that future instances of this error will hopefully signal actual issues with our routing and will be easier to debug.

IIRC you did this intentionally because the Sentry docs made it seem as though they'd be implicitly included in extra? But the Sentry event shows otherwise - they are definitely missing. Good catch! At least now we know.

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.

4 participants