Closed Bug 1304914 Opened 8 years ago Closed 8 years ago

"Offline version" snackbar is displayed on a legit "server not found" page when device is offline

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox49 wontfix, fennec50+, firefox50 fixed, firefox51 verified, firefox52 verified)

RESOLVED FIXED
Firefox 52
Tracking Status
firefox49 --- wontfix
fennec 50+ ---
firefox50 --- fixed
firefox51 --- verified
firefox52 --- verified

People

(Reporter: Grisha, Assigned: Grisha)

References

Details

(Whiteboard: [MobileAS])

Attachments

(3 files)

Steps to reproduce: while device is offline (airplane mode, or wifi+cell data is off), open URL for which you will certainly not have a cached version (e.g. a non-existing domain, or a website that you never visited). You will see a "Server not found" page, along with a "Showing offline version" snackbar at the bottom.

See screenshot.
Flags: needinfo?(gkruglov)
For triage: this feature landed in 49, so this should probably track 50.
Assignee: nobody → gkruglov
Status: NEW → ASSIGNED
Whiteboard: [MobileAS]
Attachment #8795017 - Flags: review?(s.kaspari) → review?(ahunt)
It's not entirely clear to me whether we should display these notifications on hosted 404 pages (as opposed to "server not found" pages). Currently we only have "loading/success/failure" tab states to work with, which is enough if we only want to show the "offline version" notifications on non-error pages - what the patch above does. It's a bit coarse, but better than the current behaviour.
Flags: needinfo?(gkruglov)
Comment on attachment 8795017 [details]
Bug 1304914 - Don't show "offline version" notifications on error pages

https://reviewboard.mozilla.org/r/81198/#review80326

Looks sane! It would probably be nice to "fix" browser.js to send "fromCache" only when we're actually loading from the cache, but that wouldn't be an upliftable patch - maybe worth filing as followup?
Attachment #8795017 - Flags: review?(ahunt) → review+
NI myself to request an uplift of this to 50 and 51.
Flags: needinfo?(gkruglov)
See Also: → 1306062
Pushed by gkruglov@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9d576d2aab80
Don't show "offline version" notifications on error pages r=ahunt
https://hg.mozilla.org/mozilla-central/rev/9d576d2aab80
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
The feature landed in 50, so hoping to uplift fixes into beta as well as aurora.

[Feature/regressing bug #]: Bug 1232867

[User impact if declined]: A snackbar indicating an "offline version" shows up on error pages, such as "Server Not Found", if the device is offline.

[Describe test coverage new/current, TreeHerder]: Manual testing

[Risks and why]: Should be low risk; fix is simple - changed which tab event triggers display of the snackbar, and this allows determining if tab loaded successfully or not. Downside of this fix is that we won't display the notification for cached 404 pages, but I feel that's a fair trade off; there's a follow-up Bug 1306062 to hopefully deal with that aspect. 

[String/UUID change made/needed]: none
Flags: needinfo?(gkruglov)
Attachment #8796586 - Flags: approval-mozilla-beta?
Attachment #8796586 - Flags: approval-mozilla-aurora?
Comment on attachment 8796586 [details] [diff] [review]
offline-browsing-bug.patch

Fixes a recent bug from Fx49, Aurora51+, Beta50+
Attachment #8796586 - Flags: approval-mozilla-beta?
Attachment #8796586 - Flags: approval-mozilla-beta+
Attachment #8796586 - Flags: approval-mozilla-aurora?
Attachment #8796586 - Flags: approval-mozilla-aurora+
tracking-fennec: ? → 50+
Hello,

Verified on latest Beta build, 51.0b1 - Build 3, and the issue is no longer reproducible. 

This issue was verified using a LG G4 (Android 5.1) .
Verified as fixed on 52.0b2 using a Samsung Galaxy tab Active with Android 5.1.1
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: