Closed Bug 1575797 Opened 5 years ago Closed 5 years ago

After downloading a file, 'Top Sites' and 'Highlights' empty: 'Oops, something went wrong loading this content. Refresh page to try again.'

Categories

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

defect

Tracking

()

VERIFIED FIXED
Firefox 70
Iteration:
70.4 - Aug 19 - Sep 1
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 --- verified

People

(Reporter: aryx, Assigned: Mardak)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: github-merged, regression)

Attachments

(4 files)

Seeing in one profile with Firefox 70.0a1 20190821215524 but not in another profile with the same build.

New Tab Page's 'Top Sites' and 'Highlights' is empty: 'Oops, something went wrong loading this content. Refresh page to try again.' Reloading the NTP or opening it in a new tab doesn't change anything.

From the browser console:

11:12:22.070 TypeError: "Argument 1 is not valid for any of the 1-argument overloads of URL.createObjectURL."
createLocalImageObject resource://activity-stream/data/content/activity-stream.bundle.js:5745
getNextStateFromProps resource://activity-stream/data/content/activity-stream.bundle.js:6768
componentWillMount resource://activity-stream/data/content/activity-stream.bundle.js:6776
Pd resource://activity-stream/vendor/react-dom.js:69
qg resource://activity-stream/vendor/react-dom.js:92
hi resource://activity-stream/vendor/react-dom.js:104
Qg resource://activity-stream/vendor/react-dom.js:144
Rg resource://activity-stream/vendor/react-dom.js:145
Sc resource://activity-stream/vendor/react-dom.js:158
Z resource://activity-stream/vendor/react-dom.js:156
Zg resource://activity-stream/vendor/react-dom.js:159
Redux 5
messageMiddleware resource://activity-stream/data/content/activity-stream.bundle.js:2334
queueEarlyMessageMiddleware resource://activity-stream/data/content/activity-stream.bundle.js:2384
rehydrationMiddleware resource://activity-stream/data/content/activity-stream.bundle.js:2353
initStore resource://activity-stream/data/content/activity-stream.bundle.js:2417
react-dom.js:117:150

A breakpoint at lobal.URL.createObjectURL(remoteImage.data) says remoteImage.data is always {}.

This is trying to load the <profile>/thumbnails/*.png thumbnail for a topsite or highlight. Looks like something changed in how image blobs are sent across channels maybe ?

The remoteImage.data should be a File expanded in devtools to show something like…

data: File
  ​lastModified: 156648907890
  ​name: "49d21140464e2136ef.png"
  ​size: 93000
  ​type: "image/png"
  ​webkitRelativePath: ""
  ​<prototype>: FilePrototype

I'm pretty sure I was on 20190821095414 and saw the same problem, but just now I updated to 20190821215524 and it seems to be working…

Is latest nightly working for you?

Flags: needinfo?(aryx.bugmail)

Ah nope I still see it in latest nightly.. but apparently not the first few tabs ??

Flags: needinfo?(aryx.bugmail)

From Browser Toolbox, I see the File blob object on the main/chrome process. But the content process receives {} empty object.

Blocks: 1445085
Summary: New Tab Page's 'Top Sites' and 'Highlights' empty: 'Oops, something went wrong loading this content. Refresh page to try again.' → Content message loses thumbnail file blob resulting in 'Top Sites' and 'Highlights' empty: 'Oops, something went wrong loading this content. Refresh page to try again.'

Bug 1436615 introduced using fetch + blob to pass disk thumbnail data to content process.

asuth, do you know who we should ask if anything changed recently re: Blobs and cross process access?

Flags: needinfo?(bugmail)
See Also: → 1436615

Blobs pass through structured clone okay, but they JSON.stringify as {}. From my understanding of the way the message-manager code works, it tries to structured clone and if that fails, it tries to JSON stringify. Someone likely put something in whatever message is being sent that is not legal for (cross-process) structured clone purposes and so the message-manager or JSActor or whatever is falling back to JSON.stringify.

Flags: needinfo?(bugmail)

Oooh great tip. I can reproduce the bug if I put a dummy function in the object that gets sent down to content when a File blob exists elsewhere in that object.

I haven't been able to reproduce this bug anymore even when using 20190821215524, so my hunch is that some discovery stream server data is triggering some code path that results in a Promise being added to the object. Scott has filed bug 1576203 as a workaround for when the data does get stringified into {} so I guess we'll keep this bug open to figure out what's causing the data to fail structured clone.

See Also: → 1576203
Summary: Content message loses thumbnail file blob resulting in 'Top Sites' and 'Highlights' empty: 'Oops, something went wrong loading this content. Refresh page to try again.' → Something prevents structured clone of redux store resulting in 'Top Sites' and 'Highlights' empty: 'Oops, something went wrong loading this content. Refresh page to try again.'

mconley was running into this and we had a quick debugging session and pretty sure this was regressed by bug 1567940.

Using the check function from https://github.com/mozilla/activity-stream/pull/5282/files on his live instance, we noticed highlights had an entry with referrer that wasn't a string but a nsIURI instead.

And from the previous comments, nsIURI and its functions, etc can't be sent across processes thus falling back to stringify causing thumbnail data to convert to {}.

Regressed by: 1567940

Was able to reproduce by downloading a file with referrer. Then with PR5282 applied, it does print out

Removed invalid data.Sections.1.rows.0.referrer. equals function equals()
Assignee: nobody → edilee
Summary: Something prevents structured clone of redux store resulting in 'Top Sites' and 'Highlights' empty: 'Oops, something went wrong loading this content. Refresh page to try again.' → After downloading a file, 'Top Sites' and 'Highlights' empty: 'Oops, something went wrong loading this content. Refresh page to try again.'

STR:

  1. add top site url https://ftp.mozilla.org/
  2. let the thumbnail load
  3. open that top site (or just load https://ftp.mozilla.org/)
  4. right-click favicon.ico and save link as and save it
  5. open a new tab (this is probably preloaded and should be unaffected)
  6. refresh about:newtab

top sites should still show a thumbnail after step 6

Iteration: --- → 70.4 - Aug 19 - Sep 1
Priority: -- → P1
Blocks: 1576284
See Also: → 1576347
Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: github-merged
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70

I have verified that this issue is no longer reproducible with the latest Firefox Nightly (70.0a1 Build ID - 20190825213650) installed, on Windows 10 x64, Arch Linux and Mac 10.14.5. Now, top sites still show a thumbnail after following the steps from comment 15.

Status: RESOLVED → VERIFIED
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: