Closed Bug 1869443 Opened 2 years ago Closed 1 year ago

Provide a default value for targetURI fluent variable

Categories

(Firefox :: Firefox View, defect, P2)

defect

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: sfoster, Assigned: jsudiaman)

References

Details

(Keywords: regressionwindow-wanted, Whiteboard: [fidefe-firefox-view])

Attachments

(2 files)

I ran into this with a build from today's moz-central.

STR:

  1. With the "Open previous windows and tabs" preference checked, close Firefox while there are few tabs still open.
  2. Re-start Firefox and restore the session if prompted
  3. Don't switch to any of the restored tabs
  4. Open Firefox View and click on the "..." context menu next to one of the restored and not-yet-selected tabs in the Recent Browsing open tabs listing
  5. Click "Close tab" from the menu

ER:
The tab should close and the Recent Browsing tab listing should update to remove that tab

AR:
The browser crashes with the following exception:

[dom/l10n] Failed to convert l10n-args JSON: {"targetURI":["https://microsoft.com/"]}
Fluent error, the argument "$targetURI" was not provided a value.
This error happened while formatting the following messages:
  "fxviewtabrow-tabs-list-tab"
  "fxviewtabrow-just-now-timestamp"
  "firefoxview-closed-tabs-dismiss-tab"
Hit MOZ_CRASH(Resolver error: Unknown variable: $targetURI) at intl/l10n/rust/localization-ffi/src/lib.rs:620

I'm not sure if this is a regression or if its always been this way. Maybe a regression? As we have been testing this same close tab functionality from Firefox View in/around bug 1858478. I'm suggesting S2 severity for this - yes, you could not use Firefox View in this way and avoid the crash, but as there's no indication this might be a problem until it goes kaboom, I think its pretty bad.

Step 1 in the STR might be wrong. I was not able to reproduce just now by opening tabs for facebook, wikipedia and twitter, closing the browsing and completing the rest of the STR. I was using a canned session file when I filed this, which might be atypical. I'll attach it here.

Downgrading priority & severity as this seems to require a saved session with some specific details - perhaps missing/empty fields.

Severity: S2 → S3
Priority: P1 → P2
Summary: Closing a never-loaded tab from Firefox View crashes the browser → Closing a never-loaded tab from a restored session in Firefox View crashes the browser if some properties are missing/empty

Your STR are a bit confusing because step 1 says "With the "Open previous windows and tabs" preference checked. But then step 2 indicates that you are restoring a session manually. Regardless, I wasn't able to reproduce this on latest mc with that pref checked or unchecked on a mac.

Edit: I misread this, and Sam says it happens with the attached profile where the value for targetURI is missing.

Summary: Closing a never-loaded tab from a restored session in Firefox View crashes the browser if some properties are missing/empty → Provide a default value for targetURI fluent variable
QA Whiteboard: [qa-triaged]
QA Whiteboard: [qa-triaged] → [qa-regression-triage]

I've been trying to reproduce this crash, but I could not. Firstly, I restored the session from the file in comment 1, then loaded Firefox View and closed the unloaded tabs as mentioned in comment 0. The tabs were closed and they moved from the Open Tabs card to the Recently Closed Tabs card and no crash was observed. Tested with Nightly v123.0a1 (2023-12-21) on Windows 10, MacOS 11 and Ubuntu 22. Might I be missing some steps?

The reporter has blocked requests. Is there a way you can help us reproduce it? Thank you!

Flags: needinfo?(jsudiaman)

I could reproduce the console message, but not a crash. I see the title and severity have been updated to reflect this. I think we could clean this up by handling malformed l10n arguments, but this is not as high priority at it seemed initially.

Flags: needinfo?(jsudiaman)
Assignee: nobody → jsudiaman
Status: NEW → ASSIGNED
Pushed by jsudiaman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3b9d9e0ce33f Provide a default value for targetURI fluent variable r=sfoster,nsharpley,fxview-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: