Skip to content

Deobfuscate error messages#10012

Merged
kumavis merged 1 commit intodevelopfrom
deobfuscate-error-message
Dec 7, 2020
Merged

Deobfuscate error messages#10012
kumavis merged 1 commit intodevelopfrom
deobfuscate-error-message

Conversation

@Gudahtt
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt commented Dec 7, 2020

The SES lockdown added in #9729 had the effect of obfuscating our error messages. Any messages printed to the console would have the error message replaced with the string "Error #" followed by a number. The stack was also updated to point at lockdown.cjs, though the original stack was preserved beneath the top stack frame.

Marking the console API as untamed seems to have fixed both issues. The original error message is now printed to the console, along with the original stack.

The SES lockdown added in #9729 had the effect of obfuscating our error
messages. Any messages printed to the console would have the error
message replaced with the string "Error #" followed by a number. The
stack was also updated to point at `lockdown.cjs`, though the original
stack was preserved beneath the top stack frame.

Marking the `console` API as untamed seems to have fixed both issues.
The original error message is now printed to the console, along with
the original stack.
@Gudahtt Gudahtt changed the title Deobfuscate error message Deobfuscate error messages Dec 7, 2020
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [e222d9a]
Page Load Metrics (454 ± 57 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint319856209
domContentLoaded28368745211857
load28568945411857
domInteractive28368645211857

@Gudahtt Gudahtt marked this pull request as ready for review December 7, 2020 19:50
@Gudahtt Gudahtt requested a review from a team as a code owner December 7, 2020 19:50
@Gudahtt Gudahtt requested a review from rekmarks December 7, 2020 19:50
@Gudahtt
Copy link
Copy Markdown
Member Author

Gudahtt commented Dec 7, 2020

This can be reproduced by printing an error to the console anywhere in the extension. Personally I encountered it by following the reproduction steps in #10011

@rekmarks rekmarks requested a review from kumavis December 7, 2020 20:08
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.

I think this makes sense but I'd like sign-off from @kumavis before approving.

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.

@kumavis says is good

@kumavis kumavis merged commit 2bcb219 into develop Dec 7, 2020
@kumavis kumavis deleted the deobfuscate-error-message branch December 7, 2020 23:24
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2020
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