Empty pocket cards shown without retry
Categories
(Firefox :: New Tab Page, defect, P1)
Tracking
()
People
(Reporter: Mardak, Assigned: thecount)
References
Details
(Keywords: github-merged)
Attachments
(4 files)
Seems like bug 1542863 was to fix when things aren't loading, so I'm not sure if stories failed to refresh but I definitely had stories previously showing on new tabs. I came back to my computer and opened up a new tab with empty cards and no sub sections (so top sites then empty pocket 3 cards then highlights). The second new tab was fine, so the previously preloaded new tab had no pocket content for some reason.
Not sure if there was some network failure / computer offline at some point and the feed tried to refresh ?
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
I wasn't able to reproduce with no network. My guess is the issue is a slow network. Our current timeout is 45 seconds which is a lot.
I wasn't able to determine if mardak had it open for 45 seconds or not, but in theory it could have just be loading really slow on a hotel wifi, or another weird case (close browser with a slow network before page finishes fetching, the reopening again under no network, or some other combination), it could just be taking a long time to show the error.
The timeout is mostly a performance thing (we don't want a bunch of fetches sticking around not resolving) and the 45 seconds is the time recommended for how long you should wait on a fetch before freeing up the request. I would guess from a UX point of view 45 seconds is far too long. We can tweak at some point if we want, but for now I don't have a strong reason to suspect a bug quite yet (but certainly possible)
Comment 3•5 years ago
|
||
Let's reopen if it happens again and we can get more info.
Reporter | ||
Comment 4•5 years ago
|
||
I happened to see this with the new layout so it showed 7 rows of empty cards. I was able to extract the DiscoveryStream redux state and it showed that articles were loaded but spocs sub-object had an endpoint value but everything else was initial state, e.g., loaded = false:
I believe DISCOVERY_STREAM_SPOCS_ENDPOINT is getting dispatched causing existing spocs data to get reset to INITIAL_STATE.
I let a profile run while logging all actions, and I noticed that there would be some DISCOVERY_STREAM_SPOCS_ENDPOINT after a SYSTEM_TICK. My hunch is that on the 5-minute interval, something has expired resulting in refreshAll({ updateOpenTabs: false })
calling loadLayout
to dispatch SPOCS_ENDPOINT (updating the main process redux store to spocs INITIAL_STATE). In the meantime component feeds and spocs are being loaded and haven't updated state and a new tab is opened getting the intermediate state.
Checking the timestamps of the actions:
15:29:56.910 DISCOVERY_STREAM_SPOCS_ENDPOINT
15:29:57.348 DISCOVERY_STREAM_SPOCS_UPDATE
I'm on a pretty fast connection right now, so there was only a window of less than half a second where opening a new tab would have resulted in the empty cards. But any slow network delay between SPOCS_ENDPOINT and SPOCS_UPDATE should result in blank cards.
Arguably SPOCS_ENDPOINT probably shouldn't dispatch if it didn't actually change. Or the reducer notices that it's the same value, don't clear out the other values in the object. ??
Reporter | ||
Comment 5•5 years ago
|
||
[Tracking Requested - why for this release]: Turning on discovery stream by default in 69 and this bug will "randomly" show up for users 2 times per hour for a small window of time (worse for users with slow internet)
Reporter | ||
Comment 6•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 7•5 years ago
|
||
Assignee | ||
Comment 8•5 years ago
|
||
Assignee | ||
Comment 9•5 years ago
|
||
Comment on attachment 9084859 [details] [review]
Link to GitHub pull-request: https://github.com/mozilla/activity-stream/pull/5246
Beta/Release Uplift Approval Request
- User impact if declined: Bad user experience of empty content that won't load
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: In general this is tricky to test because it's time based.
more importantly, testing for regressions is probably the more important thing here.
To test:
- Open browser toolbox so you can see network requests.
- Set throttling to GPRS
- Wait for the spoc request to come through, should be a post to "https://spocs.getpocket.com/spocs", it should take roughly a half hour, but you can lilely change your system time to have it expire, and it should update in 5 mins instead.
- As soon as you see the request in netwrok, open a few new tabs.
expected, they should have pocket stories.
Not expected: bunch of empty cards.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): It's only 1 addition in line changes, and a bit of linting to accommodate the new line.
Once it's verified on nightly this should be low risk.
- String changes made/needed:
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 10•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Comment on attachment 9084863 [details]
uplift 1560260 - Empty pocket cards shown without retry
Fix for empty cards which won't load content sometimes. Approved for 69.0b14.
Comment 13•5 years ago
|
||
bugherder uplift |
Updated•5 years ago
|
Comment 14•5 years ago
|
||
I have attempted reproducing the steps in the uplift request, but I am not sure how/when the sprocket POST event appears. Are the steps complete? When should the POST event appear in Network?
Comment 15•5 years ago
|
||
I have succeeded reproducing this issue on Nightly v69.0a1 (2019-06-19) (64-bit) with these steps:
- Open the browser with the preference to NOT update automatically.
- Press F12 (Devtools), go to DevTools Settings and check "Enable browser chrome and add-on debugging toolboxes" and "Enable remote debugging" checkboxes.
- Go to about:config and set pref "browser.search.region" to "US" (to enable the recommended by pocket cards);
- Restart browser.
- Press CTRL+ALT+SHIFT+i to open the Browser Toolbox.
- Set Throttling to GPRS on the Browser Toolbox.
- Set time an hour ahead.
- Wait for the spoc post request to come through.
- After that (step 8), open several new tabs and observe that in the "Recomended by pocket" section are a bunch of empty cards.
I have verified this fix in Nightly v70.0a1 from 2019-08-14 and Beta v69.0b14. Empty cards haven't been displayed anymore.
Assignee | ||
Comment 16•5 years ago
|
||
:danibodea sounds like you got it sorted out, is that correct?
Yeah sorry about that this one was a tricky one.
Comment 17•5 years ago
|
||
Yup, received some unexpected help from and managed to reproduce and verify it. Thanks to Cipri Muresan.
Description
•