Error message in apps when there's no network connection needs to be more descriptive

RESOLVED FIXED

Status

Firefox OS
Gaia::System
P2
normal
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: GH to BZ, Assigned: alive)

Tracking

({feature})

unspecified
feature
Dependency tree / graph

Firefox Tracking Flags

(blocking-basecamp:+)

Details

(Whiteboard: [label:needsUXinput][label:system])

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

6 years ago
[GitHub issue by lisabrewster on 2012-09-26T20:55:57Z, https://github.com/mozilla-b2g/gaia/issues/5255]
What happens today when there's no network connection:  http://adora.io/screens/no-network-connection-20120924-223435.jpg

If you look closely, "Hmm, this app is having problems" appears to be a scrim over a "Server not found" error.

A better message would be something like: "This app requires network access.  Please check your connection and try again."  And the buttons could be "Settings" and "Try again." (feel free to wordsmith)
(Reporter)

Comment 1

6 years ago
[GitHub comment by fabricedesre on 2012-09-26T20:58:01Z]
Well, you have no network connection (the blue screen on the back) AND an app crash. I hope they are unrelated events!
(Reporter)

Comment 2

6 years ago
[GitHub comment by jds2501 on 2012-09-26T20:59:45Z]
Can you give a URL to what's being tested here?
(Reporter)

Comment 3

6 years ago
[GitHub comment by jds2501 on 2012-09-26T21:00:05Z]
cc @jcarpenter
(Reporter)

Comment 4

6 years ago
[GitHub comment by lisabrewster on 2012-09-26T21:01:02Z]
@fabricedesre Oh, srsly?  This is what I see every time I try to use an app while I've got airplane mode on.  I just duplicated it with the Marketplace app.
(Reporter)

Comment 5

6 years ago
[GitHub comment by fabricedesre on 2012-09-26T21:03:50Z]
@lisabrewster ouch. that's pretty bad so, and probably a platform issue.
(Reporter)

Comment 6

6 years ago
[GitHub comment by cgjones on 2012-09-26T21:04:41Z]
We show this extremely misleading error screen for apps that are loaded from the network, when we're offline.
(Reporter)

Comment 7

6 years ago
[GitHub comment by cgjones on 2012-09-26T21:04:47Z]
I.e. there's no crash.
(Reporter)

Comment 8

6 years ago
[GitHub comment by nhirata on 2012-09-26T21:56:28Z]
related to #5199?
(Reporter)

Comment 9

6 years ago
[GitHub comment by autonome on 2012-09-28T07:57:26Z]
This is an issue the product team identified as needing to be clarified at the system level given that the initial target market has 1) unreliable connections and 2) this might be their first smartphone, so we can't rely on connectivity iconography like absence-of-network-connection-type. @jcarpenter we should talk tomorrow about what exactly our options are for a low-bar solution for V1.

Now that we have the network activity icon, perhaps we could have that with a red line through it (eg: the mute icon up there) whenever there's no data connection?

Another option is to have a notification when a network access fails, that explicitly says that "a network connection was attempted and failed, so that's why your app isn't working". The notification goes away when data connection is next available. And this is a single sticky notification - do not add a new notification if there's one already, obviously.
(Reporter)

Comment 10

6 years ago
[GitHub comment by jcarpenter on 2012-09-28T08:24:30Z]
@autonome Let's talk tomorrow about this. Ideally we pull in a gaia dev also.
(Reporter)

Comment 11

6 years ago
[GitHub comment by jcarpenter on 2012-09-28T23:16:56Z]
Next steps: I'll work on this over weekend and connect w/ Dietrich to discuss on Monday 10/1.
Assignee: nobody → alive
My proposal:
* Detect `navigator.onLine` when system app detects page error from gecko.
~ IF OFFLINE:
  Display error message: 'network is unavailable'
~ IF ONLINE:
  Display the gecko error page.

And UX wants to distinguish more:
1) Network is offline
2) Airplane mode ON
3) LOW network bandwidth

But I think we have no way to detect 3) and it's unrelated to gecko page error in anyway way?

ping @timdream @vivien

BTW, I find `moznetworkdownload` is not relevant to `mozbrowsererror`. Means: When page error occurs, no network activity event is caught.
> And UX wants to distinguish more:
> 1) Network is offline
> 2) Airplane mode ON
> 3) LOW network bandwidth

Just to clarify: UX wants to know what's currently possible so we can design a solution that requires minimal new code. Because we're nice like that :) Detecting low bandwidth is really not important. In fact, we can forget it entirely. 

I do want to remind folks of our earlier thread on this topic: https://github.com/mozilla-b2g/gaia/issues/2932#issuecomment-7573742

There were some good comments from Vivien and Tim.
(In reply to Josh Carpenter [:jcarpenter] from comment #13)
> > And UX wants to distinguish more:
> > 1) Network is offline
> > 2) Airplane mode ON
> > 3) LOW network bandwidth
> 
> Just to clarify: UX wants to know what's currently possible so we can design
> a solution that requires minimal new code. Because we're nice like that :)
> Detecting low bandwidth is really not important. In fact, we can forget it
> entirely. 
> 
> I do want to remind folks of our earlier thread on this topic:
> https://github.com/mozilla-b2g/gaia/issues/2932#issuecomment-7573742
> 
> There were some good comments from Vivien and Tim.

Let's forget the "low bandwidth" problem then. We can't detect that.

I would say let's do 

if (!navigator.onLine) {
  showOfflineDialog();
} else if (isAirplaneMode) {
  showAirplaneModeDialog();
} else {
  showGenericErrorMessageDialog(); // the current one.
}

when the dialog is show, we should hide the message from Gecko.

(This is the amended version of Alive's proposal. Thank you Alive.)
Just to complicate things: 

* What if a banner ad needs connectivity, but everything else in the app works fine offline?
(In reply to Josh Carpenter [:jcarpenter] from comment #15)
> Just to complicate things: 
> 
> * What if a banner ad needs connectivity, but everything else in the app
> works fine offline?

Interesting.
If an iframe in the app encounters 404 error, would we catch the error?
Let me try....
If it's NO, don't worry about this case.
If it's YES.... congratulation! \O/
(In reply to Josh Carpenter [:jcarpenter] from comment #15)
> Just to complicate things: 
> 
> * What if a banner ad needs connectivity, but everything else in the app
> works fine offline?

We will only handle the case where the first app page failed to load. App itself will have to manage it's own resources.

First app page can be loaded from app cache, so no network doesn't means all hosted app will failed to load.

(In reply to Alive Kuo [:alive] from comment #16)
> 
> Interesting.
> If an iframe in the app encounters 404 error, would we catch the error?
> Let me try....
> If it's NO, don't worry about this case.
> If it's YES.... congratulation! \O/

Don't worry, we will have app to deal that themselves.
> We will only handle the case where the first app page failed to load. App itself will have to manage it's own resources.

That is very clever.

:)
(In reply to Josh Carpenter [:jcarpenter] from comment #18)
> > We will only handle the case where the first app page failed to load. App itself will have to manage it's own resources.
> 
> That is very clever.
> 
> :)

If we have conclusion now...Josh, need you to wording the description, Thanks!(About Offline message and Airplane mode description!)
> If we have conclusion now...Josh, need you to wording the description, Thanks!(About Offline message and Airplane mode description!)

Sounds good, Alive. I will work on this and follow up (probably Monday, given other obligations).

Can we also explore ways to indicate the connection status to the user _before_ they open the app? For example, Chrome apps show gray icons when they are not connected. How hard would it be to do surface connectivity status to the user in areas like the Home icons, or status bar indicators?
(In reply to Josh Carpenter [:jcarpenter] from comment #20)
> > If we have conclusion now...Josh, need you to wording the description, Thanks!(About Offline message and Airplane mode description!)
> 
> Sounds good, Alive. I will work on this and follow up (probably Monday,
> given other obligations).
> 
> Can we also explore ways to indicate the connection status to the user
> _before_ they open the app? For example, Chrome apps show gray icons when
> they are not connected. How hard would it be to do surface connectivity
> status to the user in areas like the Home icons, or status bar indicators?

I would say 'possible', but
1) We couldn't know which app needs network, so EVERY icon would be greyed when no network. <- Bad exp?
2) This seems to be another bug/proposal/issue if we are going to do that.
(In reply to Alive Kuo [:alive] from comment #21)
> (In reply to Josh Carpenter [:jcarpenter] from comment #20)
> > > If we have conclusion now...Josh, need you to wording the description, Thanks!(About Offline message and Airplane mode description!)
> > Can we also explore ways to indicate the connection status to the user
> > _before_ they open the app? For example, Chrome apps show gray icons when
> > they are not connected. How hard would it be to do surface connectivity
> > status to the user in areas like the Home icons, or status bar indicators?
> 
> I would say 'possible', but
> 1) We couldn't know which app needs network, so EVERY icon would be greyed
> when no network. <- Bad exp?
> 2) This seems to be another bug/proposal/issue if we are going to do that.

It's software, everything is possible. But intuitively I would say we need Gecko support to do that. Please file another bug to explore this possibility, Josh.
Flags: needinfo?(jcarpenter)
Ah, Alive, if you're implementing the new spec Josh just sent out presumably you're going to be applying the new visual design to these error messages?

Is it OK for me to mark bug 798722 as a dupe of this one and for you to handle this?
(In reply to Ben Francis [:benfrancis] from comment #23)
> Ah, Alive, if you're implementing the new spec Josh just sent out presumably
> you're going to be applying the new visual design to these error messages?
> 
> Is it OK for me to mark bug 798722 as a dupe of this one and for you to
> handle this?

Ben, feel free to reassign any system app part work to me if you have not started the implementation. (I think these 2 bugs are somewhat different, though. IMO not dupe). And keep giving comments would be very helpful! Thank you!
Duplicate of this bug: 799651
Flags: needinfo?(jcarpenter) needinfo?(jcarpenter) → needinfo-

Updated

6 years ago
Priority: -- → P3
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 798722
Reopening.

AFAIK, this is not a duplicate of 798722. Both deal with app errors of type "other", but this bug deals more precisely with network connection problems. From the most recent spec:

> Gaia’s Window Manager receives an “other” (non-fatal) mozbrowseerror event. 
> The window manager decides what UI to present in response. If the 
> mozbrowsererror was generated by navigator.onLine, then Gaia’s Window 
> Manager presents a default “No connection” error.

The specs live here: https://www.dropbox.com/sh/e9myv1f3xzvc885/GIdFb1HeIB

The quote above is from page 7.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Upping to P2. This feature was a very specific late request from Product. It's a v1 bandaid solution for the low-bandwidth low-connectivity target market, where users are going to encounter "no network" errors frequently. It is important that we give them precise and actionable feedback in these situations, instead of the current overly-generic "this app is having problems".
Priority: P3 → P2
cc'ing Chris Lee so this is on his radar (see comments 27,28).
Keywords: feature

Updated

6 years ago
Component: Gaia → Gaia::Apps Management
Depends on: 806965
Created attachment 679477 [details]
point to github PR 6266
Attachment #679477 - Flags: review?(timdream+bugs)
Comment on attachment 679477 [details]
point to github PR 6266

Please fix the coding style error of commit 234ab51 based on review comment in Github and request for review again.
Attachment #679477 - Flags: review?(timdream+bugs) → review-

Updated

6 years ago
Component: Gaia::Apps Management → Gaia
Created attachment 680103 [details]
patch v2

1. Add enabled property to AirplainMode module, which indicates current mozSettings of !ril.radio.disabled
2. Modified per github comments
3. Fix a bug never found before about app error dialog and popup manager displaying in the same time; the app error dialog would be on top of popup container.
Attachment #679477 - Attachment is obsolete: true
Attachment #680103 - Flags: review?(timdream+bugs)
Comment on attachment 680103 [details]
patch v2

r=me. thanks
Attachment #680103 - Flags: review?(timdream+bugs) → review+
https://github.com/mozilla-b2g/gaia/pull/6266

Merged.
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED

Updated

6 years ago
Keywords: verifyme
QA Contact: jsmith
Something breaks between these commits therefore I rolled back.

Regression Range>>>

commit 6732e24731f88d30a66fce8ecb0c757e3e74365a
Merge: 2de951b 95290ab
Author: Timothy Guan-tin Chien <timdream@gmail.com>
Date:   Fri Nov 9 10:38:14 2012 -0800

    Merge pull request #6266 from alivedise/bugzilla/796750/v2
    
    Bug 796750, app error dialog redesign and let window.open supports it.

commit 2de951b2376705dd903604909fda2599212221c2
Merge: cb8c0cc b6e1beb
Author: vingtetun <21@vingtetun.org>
Date:   Fri Nov 9 10:00:42 2012 -0800

    Merge pull request #6299 from timdream/wm/visible
    
    Bug 808227 - Properly setVisible() to transitioning apps

commit cb8c0cc9a31490bf83838749bbbc2a709ef7e57b
Merge: bf68072 416f033
Author: vingtetun <21@vingtetun.org>
Date:   Fri Nov 9 09:40:43 2012 -0800

    Merge pull request #6043 from lissyx/geoloc-tracker
    
    Geoloc tracker
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Updated

6 years ago
Keywords: verifyme
Created attachment 680221 [details]
fight the rebase regression

I don't why https://github.com/mozilla-b2g/gaia/commit/95290ab59f29d5780d26aa0260685ade6260d785 works since it miss the translate function :< A stupid fail.
Attachment #680103 - Attachment is obsolete: true
Attachment #680221 - Flags: review?(timdream+bugs)
Comment on attachment 680221 [details]
fight the rebase regression

r=me, https://github.com/mozilla-b2g/gaia/pull/6330
Attachment #680221 - Flags: review?(timdream+bugs) → review+
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED

Updated

6 years ago
Component: Gaia → Gaia::System

Updated

6 years ago
Keywords: verifyme

Updated

6 years ago
Keywords: verifyme
Whiteboard: [label:needsUXinput][label:system] → [label:needsUXinput][label:system][qa-]

Updated

6 years ago
Whiteboard: [label:needsUXinput][label:system][qa-] → [label:needsUXinput][label:system]

Updated

5 years ago
Depends on: 869384
Duplicate of this bug: 907148
You need to log in before you can comment on or make changes to this bug.