Closed Bug 1191978 Opened 10 years ago Closed 10 years ago

No thumbnail in browser

Categories

(Firefox OS Graveyard :: Gaia::System::Browser Chrome, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gerard-majax, Assigned: gerard-majax)

References

Details

(Keywords: foxfood, Whiteboard: [bzlite][systemsfe])

Attachments

(5 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Mobile; rv:42.0) Gecko/42.0 Firefox/42.0 Dogfooding with the same profile since day one (before 1.0), I have absolutely no thumbnail in the browser's first page. That is not happening on other devices so probably something in my data.
Attached image 2015-08-06-22-04-27.png
Component: Gaia::Feedback → Gaia::Browser
I have thumbnails in the new tab page from Whistler (i.e. June 2015 when I first started using the device and created the profile) but all the other thumbnails since then are blank/white.
Dale, when you have time, just tell me what you need :)
Flags: needinfo?(dale)
So the issue here is fairly tricky We create and store 'places' in the system app https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/places.js#L87 and display them in https://github.com/mozilla-b2g/gaia/blob/master/apps/search/js/providers/places.js#L245 We try to keep track of the topSites in the system app @ https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/places.js#L299, if the visit is in the top sites we record a screenshot in the places database so that its ready to be displayed in the browser. If the top sites stored in the system app are not the actual top sites then we wont get the correct screenshots generated. Now I am fairly certain looking at the code that we will drift out of sync if the user ever clears browsing data so thats one bug, but I expect it will be possible to drift out of sync for other reasons
Flags: needinfo?(dale)
Component: Gaia::Browser → Gaia::System::Browser Chrome
Whiteboard: [bzlite] → [bzlite][systemsfe]
So I have debugged a bit and it looks like we have a |null| screenshot in search/js/providers/places.js.
this.screenshotRequested(place.url) does properly update the screenshot. I have spotted, however, this.topSites seems to contain strange data.
Looks like asyncStorage topSites contains something different than what is shown in top sites UI
Attached image b2g_topsites.png
Matching topSites. Is it expected?
Flags: needinfo?(dale)
So, search app makes use of "frecency" store to populate the top website in the browser app. That seems in discrepency with asyncStorage("top-sites") within the system app, but the behavior might be the one we want. I am just wondering about the way we handle updating top websites from withtin the system app since we rely on last top frecency value from asyncStorage("top-sites"): I see values above 400 (like documented in comment 7/attachment 8692481 [details]). Other websites within the "top sites" stored in search app is for example around 50-60. Consequence of that is that we are not performing update of "top-sites" asyncStorage (which would update the screenshot and fix my bug).
Attached file topSites updat
Assignee: nobody → lissyx+mozillians
Depends on: 1225339
First part is completed: at load time, we will remove dupes. I'll continue by changing |checkTopSites| to make it NOT add dupes
Comment on attachment 8692594 [details] [review] [gaia] lissyx:bug1191978 > mozilla-b2g:master Looks like it's all working as expected :)
Attachment #8692594 - Flags: review?(dale)
Attachment #8692564 - Attachment is obsolete: true
Comment on attachment 8692594 [details] [review] [gaia] lissyx:bug1191978 > mozilla-b2g:master Clearing review for mostly minor code formatting issues. I think it could be a tad cleaner but its doing the right thing and the tests are great, thanks a lot.
Flags: needinfo?(dale)
Attachment #8692594 - Flags: review?(dale)
Comment on attachment 8692594 [details] [review] [gaia] lissyx:bug1191978 > mozilla-b2g:master Your approach is easier to read, my mind was blown to write such complex code :). It's passing tests locally, I'm verifying on real data on device but it should be good.
Attachment #8692594 - Flags: review?(dale)
Looks good on device
Comment on attachment 8692594 [details] [review] [gaia] lissyx:bug1191978 > mozilla-b2g:master Looks awesome, thanks a lot
Attachment #8692594 - Flags: review?(dale) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: