Closed Bug 2011247 Opened 2 months ago Closed 2 months ago

The dismiss option for sponsored shortcuts does not work as expected when attempting to dismiss the first shortcut after the New Tab add-on is installed

Categories

(Firefox :: New Tab Page, defect)

Firefox 147
Desktop
All
defect

Tracking

()

VERIFIED FIXED
149 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox147 --- unaffected
firefox148 --- verified
firefox149 --- verified

People

(Reporter: cmuntean, Assigned: thecount)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached video dismiss sponsored.mp4

[Affected versions]:

  • Firefox Beta Release 147.0.1 (Build ID: 20260116091309)

[Affected Platforms]:

  • Windows 10 x64
  • MacOS 14.7.1
  • Ubuntu 24.04

[Prerequisites]:

  • Have a Firefox Release 147.0.1 en-US build installed/extracted.
  • Have the following prefs set:
  • browser.search.region = US
  • nimbus.debug = true
  • If not in US, connect using a VPN to US.
  • Have the following user.js file prepared for pointing the profile to Remote Settings stage server.
  • Have the "MOZ_REMOTE_SETTINGS_DEVTOOLS=1" variable set to change Remote Settings server.

[Steps to reproduce]:

  1. Create a new Firefox profile.
  2. Add the user.js file into to profile directory.
  3. Start the Firefox browser and verify that the New Tab trainhop rollout is active in about:studies.
  4. Restart the browser to finalize the add-on installation.
  5. Open a new tab and try to dismiss the first Sponsored shortcut.

[Expected result]:

  • The Sponsored shortcut is dismissed.

[Actual result]:

  • The sponsored shortcut is not dismissed. If you try to dismiss the next one, it also doesn't work until all sponsored shortcuts are dismissed.

[Notes]:

  • The issue is reproducible only if you try to dismiss the first sponsored shortcut.
  • I haven't managed to reproduce the issue without the New Tab addon.
  • Sometimes the issue seems to be intermittent, and I managed to reproduce it by navigating to the first sponsored shortcuts, then in the address bar manually navigate to "about:newtab" and try to dismiss the first sponsored shortcut.
  • Attached a screen recording with the issue. In the screen recording, some errors can be observed in the browser console.
    -We caught this bug with the prototype created for automated tests. The automated tests always catch this behavior because all the actions are made in the same tab after the addon is installed: click on the sponsored shortcut and navigate back to the about:newtab, verify the context menu, and click on each option from the context menu.
  • From what I have observed, the following I think are related:
    • TypeError: can't access property "partner", tile is undefined 2 TopSitesFeed.sys.mjs:198:5
    • addons.update-checker WARN Received empty update manifest for newtab@mozilla.org.

I have reproduced the issue locally - it reproduces when I install the current XPI generated in main into Developer Edition 148 as well.

There's another error here that might be illuminating. This gets thrown as soon as a dismiss is attempted.

TypeError: can't access property "linkMap", cache is null
    _adjustSiteMapAndNotify resource://gre/modules/NewTabUtils.sys.mjs:1606
    onLinkBlocked resource://gre/modules/NewTabUtils.sys.mjs:1618
    _callObservers resource://gre/modules/NewTabUtils.sys.mjs:462
    BlockedLinks_block resource://gre/modules/NewTabUtils.sys.mjs:405
    blockURL resource://gre/modules/NewTabUtils.sys.mjs:1263
    onAction resource://newtab/lib/PlacesFeed.sys.mjs:486
    onAction resource://newtab/lib/PlacesFeed.sys.mjs:484
    _middleware resource://newtab/lib/Store.sys.mjs:50
    method resource://newtab/lib/Store.sys.mjs:27
    onActionFromContent resource://newtab/lib/ActivityStreamMessageChannel.sys.mjs:94
    onMessage resource://newtab/lib/ActivityStreamMessageChannel.sys.mjs:331
    notifyActivityStreamChannel resource:///actors/AboutNewTabParent.sys.mjs:148
    receiveMessage resource:///actors/AboutNewTabParent.sys.mjs:116
NewTabUtils.sys.mjs:464:19
    _callObservers resource://gre/modules/NewTabUtils.sys.mjs:464
    BlockedLinks_block resource://gre/modules/NewTabUtils.sys.mjs:405
    blockURL resource://gre/modules/NewTabUtils.sys.mjs:1263
    onAction resource://newtab/lib/PlacesFeed.sys.mjs:486
    onAction resource://newtab/lib/PlacesFeed.sys.mjs:484
    _middleware resource://newtab/lib/Store.sys.mjs:50
    method resource://newtab/lib/Store.sys.mjs:27
    onActionFromContent resource://newtab/lib/ActivityStreamMessageChannel.sys.mjs:94
    onMessage resource://newtab/lib/ActivityStreamMessageChannel.sys.mjs:331
    notifyActivityStreamChannel resource:///actors/AboutNewTabParent.sys.mjs:148
    receiveMessage resource:///actors/AboutNewTabParent.sys.mjs:116
TypeError: can't access property "partner", tile is undefined TopSitesFeed.sys.mjs:179:5
1768920048135	Toolkit.Telemetry	WARN	TelemetryStorage::_scanArchive - have seen this id before: fc35162e-035c-4b08-bbad-d4e9ac57ed9a, overwrite: false

I just managed to reproduce this bug in Developer Edition 148, Nightly 149, without the new XPI installed. I suspect this bug has been with us for a little while. :/

I'm searching for a regression range.

11:35.81 INFO: Last good revision: e93e54c095d7be95ca96719584b2c99f26e8a687
11:35.81 INFO: First bad revision: f8c1d097aa8817cc5af61ad4c3f82e771ce9d37c
11:35.81 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=e93e54c095d7be95ca96719584b2c99f26e8a687&tochange=f8c1d097aa8817cc5af61ad4c3f82e771ce9d37c

Keywords: regression
Regressed by: 2006769

Hey Scott, do you have a few moments here to figure out what's going on, and how the patch in bug 2006769 might be causing this?

Flags: needinfo?(sdowne)

Set release status flags based on info from the regressing bug 2006769

Assignee: nobody → sdowne
Status: NEW → ASSIGNED
Pushed by sdowne@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f01d8c0eacee https://hg.mozilla.org/integration/autoland/rev/ffb0fcdf52f4 Newtab fixing holes in spoc data earlier and for all cases. r=home-newtab-reviewers,maxx
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch

Cleaning up the version tracking since this code won't need an uplift and can train hop as required.

I think we probably want to uplift this, because trainhops are currently not going to Linux.

I'll get the uplift request started now.

Flags: needinfo?(sdowne)
Attachment #9539089 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Sponsored topsites don't dismiss on initial click.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Steps to test in bugzilla
  • Risk associated with taking this patch: low
  • Explanation of risk level: It's a fairly simple code change.
  • String changes made/needed: None
  • Is Android affected?: no
Flags: qe-verify+

(In reply to Scott [:thecount] Downe from comment #10)

I think we probably want to uplift this, because trainhops are currently not going to Linux.

I'll get the uplift request started now.

Fair, Bug 2011300 will be uplifted with a fix to unblock train hops.
Good point, no problem taking it so at least we'll have this fix in the meantime.

I have verified this issue on the latest Nightly 149.0a1 (Build ID: 20260121095127) with the addon installed and without the addon. Tested on Windows 10, macOS 14.4.1 and Ubuntu 24.0.

  • The Sponsored shortcuts are correctly dismissed.

I have also tested on Firefox Release 147.0.1 with the new version of the add-on, and the issue is no longer reproducible. The sponsored shortcuts are correctly dismissed.

Considering this, I will mark the issue as Verified-Fixed. However, I will not remove the "qe-verify+" flag until the uplift is also verified.

Status: RESOLVED → VERIFIED
Attachment #9539089 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Blocks: 2011770
QA Whiteboard: [qa-triage-done-c149/b148]

I have verified this issue on the latest Firefox Beta 148.0b10 (Build ID: 20260202090533) on Windows 10, macOS 26.2 and Ubuntu 24.04.

  • The Sponsored shortcuts are correctly dismissed.
  • Tested also with the latest newtab.xpi (149.1.20260121.51415) addon.
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: