Skip to content

fix: Update minimum browser warning version, and gracefully fail if chrome.offscreen does not exist#25142

Merged
Gudahtt merged 10 commits intodevelopfrom
minimum-browser-offscreen
Jun 7, 2024
Merged

fix: Update minimum browser warning version, and gracefully fail if chrome.offscreen does not exist#25142
Gudahtt merged 10 commits intodevelopfrom
minimum-browser-offscreen

Conversation

@danjm
Copy link
Copy Markdown
Contributor

@danjm danjm commented Jun 7, 2024

Description

With the update to manifest v3, users on versions older than chrome 109 would have errors thrown from app-init about chrome.offscreen being undefined. Snaps and hardware wallets would be broken for these users.

We need to update our minimum supported browser version to 109, but before we do that we need to warn users that there current browser version is out of date.

This PR:

  1. Handles the of chrome.offscreen being undefined in app-init.js, by simple not attempting to create the offscreen document of chrome.offscreen is undefined
  2. Updates the OUTDATED_BROWSER_VERSIONS const so that users on chromium versions older than 109 will see a warning about their browser version
  3. Adds an additional note to the outdated browser warning to tell users that snaps and hardware wallets won't work on the current version (but only for users on a MV3 version, where there is no offscreen document api)

Open in GitHub Codespaces

Related issues

Fixes: #25116

Manual testing steps

  1. Install a chromium version earlier than 109 (https://www.chromium.org/getting-involved/download-chromium/#downloading-old-builds-of-chrome-chromium)
  2. Build, install and onboard on this branch
  3. You should see a warning about the browser being out of date, and that snaps and most hardware wallets won't work with this version

Screenshots/Recordings

After

Screenshot from 2024-06-07 10-26-34
Screenshot from 2024-06-07 10-25-59

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.

@danjm danjm requested a review from a team as a code owner June 7, 2024 13:10
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 7, 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.

@danjm danjm changed the title Minimum browser offscreen Update minimum browser warning version, and gracefully fail if chrome.offscreen does not exist Jun 7, 2024
isMv3ButOffscreenDocIsMissing ? (
<div>
<p>{t('outdatedBrowserNotification')}</p>
<p>{t('browserDoesntSupportHWandSnaps')}</p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: The spacing between these doesn't seem right, maybe a <br> would look better in between?

Also the second message seems higher priority, but I can see it being easy to scan past. Maybe we could consider bolding it, or putting it first, or both

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in bfe2ef4

I used bold weight and a warning message color

Screenshot from 2024-06-07 11-15-34
Screenshot from 2024-06-07 11-14-52

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice, yeah that looks better I think

@danjm danjm changed the title Update minimum browser warning version, and gracefully fail if chrome.offscreen does not exist fix: Update minimum browser warning version, and gracefully fail if chrome.offscreen does not exist Jun 7, 2024
@danjm danjm added the team-extension-platform Extension Platform team label Jun 7, 2024
Gudahtt
Gudahtt previously approved these changes Jun 7, 2024
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@Gudahtt Gudahtt dismissed their stale review June 7, 2024 14:06

Lint failures

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 65.66%. Comparing base (bba6016) to head (642124a).
Report is 6 commits behind head on develop.

Files Patch % Lines
ui/pages/home/home.component.js 66.67% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25142   +/-   ##
========================================
  Coverage    65.66%   65.66%           
========================================
  Files         1359     1359           
  Lines        54014    54020    +6     
  Branches     14015    14019    +4     
========================================
+ Hits         35464    35469    +5     
- Misses       18550    18551    +1     

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

Copy link
Copy Markdown
Contributor

@NiranjanaBinoy NiranjanaBinoy left a comment

Choose a reason for hiding this comment

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

lgtm

@Gudahtt Gudahtt merged commit b5e2b88 into develop Jun 7, 2024
@Gudahtt Gudahtt deleted the minimum-browser-offscreen branch June 7, 2024 15:11
@github-actions github-actions bot locked and limited conversation to collaborators Jun 7, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 7, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [642124a]
Page Load Metrics (50 ± 2 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint691018284
domContentLoaded9121010
load45605052
domInteractive9121010
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 439 Bytes (0.01%)
  • common: 283 Bytes (0.00%)

@metamaskbot metamaskbot added release-11.16.8 Issue or pull request that will be included in release 11.16.8 and removed release-12.1.0 Issue or pull request that will be included in release 12.1.0 labels Jun 7, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Missing release label release-11.16.8 on PR. Adding release label release-11.16.8 on PR and removing other release labels(release-12.1.0), as PR was cherry-picked in branch 11.16.8.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.16.8 Issue or pull request that will be included in release 11.16.8 team-extension-platform Extension Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

TypeError: Cannot read properties of undefined (reading 'hasDocument')

4 participants