Newtab unified ads API isn't correctly handling a dismissed topsite ad
Categories
(Firefox :: New Tab Page, defect)
Tracking
()
People
(Reporter: thecount, Assigned: thecount)
References
Details
(Whiteboard: [hnt])
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
Topsites unified ads API client integration assumes an item is going to be returned in every spot, and this isn't always going to be true.
In the cases where it doesn't return an ad for any of the 3 spots, we get a js error, which is caught, but the code that finishes updating the topsite ads doesn't complete and ads don't display.
Dismiss is an easy way to test this, but it could happen for multiple reasons and the client should protect against this.
Updated•9 months ago
|
Assignee | ||
Comment 1•9 months ago
|
||
Updated•9 months ago
|
Assignee | ||
Comment 2•9 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D228664
Updated•9 months ago
|
Comment 3•9 months ago
|
||
beta Uplift Approval Request
- User impact if declined: Impact to a rollout happening in 132
- 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 original phabricator link.
- Risk associated with taking this patch: Low
- Explanation of risk level: It's 1 if statement in a rollout that we have the ability to turn off, it's otherwise preffed off until we turn it on
- String changes made/needed: None
- Is Android affected?: no
Comment 5•9 months ago
|
||
bugherder |
Updated•9 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Comment 7•4 months ago
|
||
Tried to reproduced on Firefox Nightly from 2025.11.12 (Fx 134.0a1) with the following steps:
- Set "browser.newtabpage.activity-stream.unifiedAds.tiles.enabled" to true
- Turn sponsored topsites off and on.
- Dismiss a sponsored topsite.
- Turn sponsored topsites off and on again.
Results was: a new topsite is added each time, so 3 are always visible. Repeated this for 10 time, after that topsites are gone, they don't appear at all, at least for a while.
Tested on Firefox 137.0.2 and on 138.0b8, encountered the same behavior. I'm not sure if this is the expected behavior.
@Scott can you please confirm that, what I tested is correct and the behavior is the expected one?
Assignee | ||
Comment 8•4 months ago
|
||
Yeah that's expected.
My steps to test in the original phabricator were a bit confusing, I should have said this:
"Expected: Should see at least 2 sponsored topsites you did not dismiss, and the one you did dismiss should still be gone."
The addition was "Should see at least 2 sponsored topsites ", and the important part that we were testing is "the one you did dismiss should still be gone".
So as long as the one you dismissed is still gone, and you saw some sponsored topsites still, you should be good.
Assignee | ||
Comment 9•4 months ago
|
||
Oh also "Repeated this for 10 time, after that topsites are gone, they don't appear at all, at least for a while."
That also makes sense. Eventually you would go through all the inventory and there would be nothing left, whatever the inventory is for your region in that moment.
Comment 10•4 months ago
|
||
Based on Scott's comment 8, mark the issue status as verified.
Updated•4 months ago
|
Description
•