Closed Bug 1548929 Opened 6 months ago Closed 5 months ago

Spoc end point fetch failures affect spocs state

Categories

(Firefox :: New Tab Page, defect, P1)

defect

Tracking

()

VERIFIED FIXED
Firefox 68
Iteration:
68.4 - Apr 29 - May 12
Tracking Status
firefox68 --- verified

People

(Reporter: pdahiya, Assigned: pdahiya)

References

Details

(Keywords: github-merged)

By default spocs.data state in discovery stream is set to {}. In loadSpocs, if a spoc end point fail to fetch, spocs is returned empty object and returns spocs.data as undefined

https://github.com/mozilla/activity-stream/blob/master/lib/DiscoveryStreamFeed.jsm#L391

See https://github.com/mozilla/activity-stream/pull/4928#discussion_r280122719

Steps to replicate issue:

  1. Set this pref browser.newtabpage.activity-stream.discoverystream.endpoints to https,http
  2. In the browser, set this pref browser.newtabpage.activity-stream.discoverystream.config to {"api_key_pref":"extensions.pocket.oAuthConsumerKey","collapsible":true,"enabled":true,"show_spocs":true,"hardcoded_layout":false,"personalized":false,"layout_endpoint":"https://gist.githubusercontent.com/punamdahiya/527dcd96584f1ae7d932b19771b18ef0/raw/5ab7fc646895b6f11cfb1ccaba4d9fd04853fceb/spoc-url-fail.json"}

Actual
Spoc end point fetch fails with spocs.data undefined error message in console
and pocket stories not loaded

Expected

Pocket stories should load without spocs

Assignee: nobody → pdahiya
Blocks: 1548952
Status: NEW → RESOLVED
Iteration: --- → 68.4 - Apr 29 - May 12
Closed: 5 months ago
Keywords: github-merged
Priority: -- → P1
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68

I have verified that this issue is no longer reproducible with the latest Firefox Nightly (68.0a1 Build ID - 20190506214617) installed, on Windows 10 x64, Arch Linux and Mac 10.13.3. Now, the "Pocket" stories are loaded without spocs.

Status: RESOLVED → VERIFIED
Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.