Skip to content

Conversation

@lwin-kyaw
Copy link
Contributor

@lwin-kyaw lwin-kyaw commented Nov 10, 2025

Description

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Fixes: #37645

Manual testing steps

  1. In firefox, start new onboarding with social login.
  2. Before completing the social login, close the window.
  3. User should not see Login Error modal

Screenshots/Recordings

Before

After

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.

Note

Adds cross-browser detection of user-cancelled OAuth login (including Firefox) and updates flows to treat it as a non-error.

  • Shared Errors:
    • Add OAuthErrorMessages.USER_CANCELLED_LOGIN_ERROR_FIREFOX.
    • Introduce isUserCancelledLoginError(error) helper for cross-browser detection.
  • OAuth Service (app/scripts/services/oauth/oauth-service.ts):
    • Replace #isUserCancelledLoginError() with #getUserCancelledLoginError() returning the actual Error when cancel is detected via checkForLastError() and isUserCancelledLoginError.
    • When no responseUrl, reject with user-cancelled error if present; otherwise default to OAuthErrorMessages.NO_REDIRECT_URL_FOUND_ERROR.
  • Onboarding UI (ui/pages/onboarding-flow/welcome/welcome.js):
    • Use isUserCancelledLoginError in login error handlers to suppress UI errors when the user cancels.
    • Map remaining OAuth errors to existing UI error states as before.

Written by Cursor Bugbot for commit f3ff026. This will update automatically on new commits. Configure here.

@lwin-kyaw lwin-kyaw requested a review from a team as a code owner November 10, 2025 12:01
@github-actions
Copy link
Contributor

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.

@metamaskbot metamaskbot added the team-onboarding Onboarding team label Nov 10, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

🔐 @MetaMask/web3auth (1 files, +6 -6)
  • 📁 ui/
    • 📁 pages/
      • 📁 onboarding-flow/
        • 📁 welcome/
          • 📄 welcome.js +6 -6

@lwin-kyaw lwin-kyaw self-assigned this Nov 10, 2025
@lwin-kyaw lwin-kyaw added release-13.9.0 Issue or pull request that will be included in release 13.9.0 seedless-onboarding Any issues related to the seedless onboarding feature labels Nov 10, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [f3ff026]
UI Startup Metrics (1211 ± 101 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12111058148010112931399
load104591812759211221206
domContentLoaded103991312689111161198
domInteractive211474121853
firstPaint62989129641410301188
backgroundConnect2262152668230239
firstReactRender26184462940
getState22859112643
initialActions001001
loadScripts818693104890900982
setupStore1173441117
numNetworkReqs1367620673
BrowserifyPower User HomeuiStartup20211795253624723672536
load1093937141417013351414
domContentLoaded1083933140216813261402
domInteractive331688235588
firstPaint5208113823909931382
backgroundConnect25522727913265279
firstReactRender28243222932
getState17916520411186204
initialActions001011
loadScripts839707116216510821162
setupStore11101411314
numNetworkReqs1387536894242368
WebpackStandard HomeuiStartup85071612381058531136
load61956398087613885
domContentLoaded61155096284604867
domInteractive1812215211538
firstPaint23161969221210744
backgroundConnect251167132954
firstReactRender3118151153548
getState1153241217
initialActions001001
loadScripts60854895181602857
setupStore1262951327
numNetworkReqs1367519870
WebpackPower User HomeuiStartup12781113181018613171810
load647568856104710856
domContentLoaded62755881992663819
domInteractive241367174567
firstPaint31282818225578818
backgroundConnect651026975153269
firstReactRender27252922929
getState1419717823154178
initialActions001011
loadScripts62355680989652809
setupStore1262982429
numNetworkReqs1116822347165223
FirefoxBrowserifyStandard HomeuiStartup14951307202612115491738
load1262113415418613171430
domContentLoaded1262113415418613171429
domInteractive1123541559115220
firstPaint------
backgroundConnect4426169185375
firstReactRender27225862844
getState10420421717
initialActions001001
loadScripts1236111515188412891402
setupStore1386971328
numNetworkReqs1266415754
BrowserifyPower User HomeuiStartup22391932298327224022983
load12721106163418715621634
domContentLoaded12721106163418715621634
domInteractive18273495163430495
firstPaint------
backgroundConnect9829476111112476
firstReactRender413091164091
getState985714821112148
initialActions101011
loadScripts12411087155417415201554
setupStore20589253389
numNetworkReqs1367232074209320
WebpackStandard HomeuiStartup16231457230814816251973
load13831232177110914171660
domContentLoaded13831232177010914171660
domInteractive963237142104162
firstPaint------
backgroundConnect52252563453120
firstReactRender302283113145
getState94599818
initialActions001001
loadScripts1350121117429613891583
setupStore177233251549
numNetworkReqs1366817765
WebpackPower User HomeuiStartup25472148340537428103405
load14771265182217617041822
domContentLoaded14761264182117617041821
domInteractive16637521142338521
firstPaint------
backgroundConnect943022660128226
firstReactRender40305364853
getState1489138078171380
initialActions106116
loadScripts14411217174116416611741
setupStore4051434769143
numNetworkReqs1306330086238300
📊 Page Load Benchmark Results

Current Commit: f3ff026 | Date: 11/10/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±53ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 728ms (±50ms) 🟢 | historical mean value: 730ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±10ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 53ms 1.02s 1.34s 1.10s 1.34s
domContentLoaded 728ms 50ms 704ms 1.00s 762ms 1.00s
firstPaint 77ms 10ms 64ms 160ms 88ms 160ms
firstContentfulPaint 77ms 10ms 64ms 160ms 88ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -84 Bytes (0%)
  • ui: -191 Bytes (0%)
  • common: 320 Bytes (0%)

@lwin-kyaw lwin-kyaw changed the title fix: fixed User Login Cancelled Error for firefox fix: fixed User Login Cancelled Error for firefox cp-13.9.0 Nov 10, 2025
@chaitanyapotti chaitanyapotti added this pull request to the merge queue Nov 10, 2025
Merged via the queue into main with commit ec63edb Nov 10, 2025
191 of 199 checks passed
@chaitanyapotti chaitanyapotti deleted the fix/login-error-modal branch November 10, 2025 14:00
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2025
@metamaskbot metamaskbot added release-13.10.0 Issue or pull request that will be included in release 13.10.0 and removed release-13.10.0 Issue or pull request that will be included in release 13.10.0 labels Nov 10, 2025
@metamaskbot
Copy link
Collaborator

More than one release label on PR. Keeping the lowest one (release-13.9.0) on PR and removing other release labels (release-13.10.0).

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

Labels

release-13.9.0 Issue or pull request that will be included in release 13.9.0 seedless-onboarding Any issues related to the seedless onboarding feature size-S team-onboarding Onboarding team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Incorrect error modal (Social login onboarding)

5 participants