SMILEConsortium / smile_teacher_android

The SMILE Teacher Android App
http://www.smileconsortium.org
Apache License 2.0
1 stars 2 forks source link

If Teacher app loses INTERNET connectivity, or if the server disappears during a connection, teacher app will crash #110

Open truedat101 opened 10 years ago

truedat101 commented 10 years ago

We should never be crashing. I was in a customer demo yesterday, and found that the app crashed on the first run because somehow the router went down or the device tried to switch wifi networks.

@chrqls can you take a closer look at this problem. To simulate, kill your server during the process of some connection. It usually won't ever happen in the first step of launching the app and connecting, because the connect to IP address step catches the exception. Somewhere else we don't catch the exception.

My hunch is that we end up with an uninitialized view somewhere and get a nullpointer. I couldn't debug it because I was in the middle of a customer demo.

Please prioritize this high.

chrqls commented 10 years ago

If I understand, the app should not crash when the wifi is down whatever the screen ? What should happen ? The simple Toast saying : "Please retry, wifi unavailable" ?

truedat101 commented 10 years ago

Not crash and possible put up a dialog blocking with ok button. Sent from my BlackBerry 10 smartphone. From: Charles QuelosSent: Wednesday, January 8, 2014 4:49 PMTo: SMILEConsortium/smile_teacher_androidReply To: SMILEConsortium/smile_teacher_androidCc: truedat101Subject: Re: [smile_teacher_android] If Teacher app loses INTERNET connectivity, or if the server disappears during a connection, teacher app will crash (#110)If I understand, the app should not crash when the wifi is down whatever the screen ? What should happen ? The simple Toast saying : "Please retry, wifi unavailable" ?

—Reply to this email directly or view it on GitHub.

chrqls commented 10 years ago

@truedat101 I just realize that what you said before:

"To simulate, kill your server during the process of some connection."

is not a good way to simulate a network problem. OR if it is, there is something I don't understand. Let me explain you...

When you kill the server, you kill the session. So, when I restart the server, /smile/all will return a "empty" state. Something like this:

[]

or

[{"TYPE":"START_MAKE"}]

In other words, the current session won't exist anymore when Internet will come back. When we know that, how should the teacher app react? Clear everything, empty the list of students in session, and empty the questions in session?

truedat101 commented 10 years ago

The internet connectivity is a problem during the session is related to either the server having connectivity issues or the android device.

So to simulate a network problem you have some options

(1) cut the wires (2) turn off wifi for a bit (3) kill the server (4) disconnect wifi from one side or the other

It's up to you. The problem causes a nullpointer or something if it happens at the wrong place during the session.

On Fri, Jan 10, 2014 at 2:18 PM, Charles Quelos notifications@github.comwrote:

@truedat101 https://github.com/truedat101 I just realize that what you said before:

"To simulate, kill your server during the process of some connection."

is not a good way to simulate a network problem. OR if it is, there is something I don't understand. Let me explain you...

When you kill the server, you kill the session. So, when I restart the server, /smile/all will return a "empty" state. Something like this:

[]

or

[{"TYPE":"START_MAKE"}]

In other words, the current session won't exist anymore when Internet will come back. When we know that, how should the teacher app react? Clear everything, empty the list of students in session, and empty the questions in session?

— Reply to this email directly or view it on GitHubhttps://github.com/SMILEConsortium/smile_teacher_android/issues/110#issuecomment-32072124 .