TUM-Dev / Campus-Android

Development of the TUM Campus App for Android devices - for and from students at Technical University of Munich.
https://app.tum.de
GNU General Public License v3.0
208 stars 86 forks source link

Choosing Faculty not possible because list is empty #383

Closed sockeqwe closed 8 years ago

sockeqwe commented 8 years ago

Steps to reproduce:

  1. Install the app from play store
  2. StartUp-Wizard appears tum1
  3. Click on "Please Choose your faculty" but the list of faculties is empty: tum2

Device: Nexus 6 running Android 23

kordianbruck commented 8 years ago

Was a Internet connection present during setup? The list is fetched from an API on first load, so a connection is required...

sockeqwe commented 8 years ago

yes, active internet connection. I just have uninstalled and installed it yet again to verify that a internet connection is active. Still same issue.

nilstk commented 8 years ago

Similar topic, different issue: Upon creation of a question and selection of the faculties (scroll down the list to select all), the app crashes always

sockeqwe commented 8 years ago

It's a backend issue!

See feed response for https://tumcabe.in.tum.de/Api/faculty/ :

[{"faculty":"6","name":"Architektur"},{"faculty":"3","name":"Chemie"},{"faculty":"7","name":"Elektrotechnik und Informationstechnik"},{"faculty":"4","name":"Informatik"},{"faculty":"8","name":"Ingenieurfakult\u00e4t Bau Geo Umwelt"},{"faculty":"11","name":"Maschinenwesen"},{"faculty":"1","name":"Mathematik"},{"faculty":"12","name":"Medizin"},{"faculty":"2","name":"Physik"},{"faculty":"13","name":"Sport- und Gesundheitswissenschaften"},{"faculty":"5","name":"TUM School of Education"},{"faculty":"14","name":"Wirtschaftswissenschaften"},{"faculty":"15","name":"Wissenschaftszentrum Weihenstephan f\u00fcr Ern\u00e4hrung, Landnutzung und Umwelt"}]<br />
<b>Warning</b>:  Unknown: open(/var/lib/php/sessions/sess_c0sg38v1tholb7hhqhj8r9uvr7udp7qar7mqnrin0g9f5bfctqe6ijd3cfouof9scq367qhe6acjrtqdb6cm125oer8s7t1su0kluq3, O_RDWR) failed: No space left on device (28) in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/sessions) in <b>Unknown</b> on line <b>0</b><br />

No space left on device (28)

Stacktrace:

06-28 20:42:58.064 27511-27553/? W/System.err: retrofit.RetrofitError: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 651 path $
06-28 20:42:58.064 27511-27553/? W/System.err:     at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:383)
06-28 20:42:58.064 27511-27553/? W/System.err:     at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
06-28 20:42:58.064 27511-27553/? W/System.err:     at java.lang.reflect.Proxy.invoke(Proxy.java:393)
06-28 20:42:58.064 27511-27553/? W/System.err:     at de.tum.in.tumcampusapp.models.$Proxy0.getFaculties(Unknown Source)
06-28 20:42:58.064 27511-27553/? W/System.err:     at de.tum.in.tumcampusapp.models.TUMCabeClient.getFaculties(TUMCabeClient.java:220)
06-28 20:42:58.064 27511-27553/? W/System.err:     at de.tum.in.tumcampusapp.models.managers.SurveyManager.downloadFacultiesFromExternal(SurveyManager.java:202)
06-28 20:42:58.064 27511-27553/? W/System.err:     at de.tum.in.tumcampusapp.activities.wizard.WizNavStartActivity$1.doInBackground(WizNavStartActivity.java:75)
06-28 20:42:58.064 27511-27553/? W/System.err:     at de.tum.in.tumcampusapp.activities.wizard.WizNavStartActivity$1.doInBackground(WizNavStartActivity.java:69)
06-28 20:42:58.064 27511-27553/? W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:295)
06-28 20:42:58.064 27511-27553/? W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-28 20:42:58.064 27511-27553/? W/System.err:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
06-28 20:42:58.064 27511-27553/? W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
06-28 20:42:58.065 27511-27553/? W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
06-28 20:42:58.065 27511-27553/? W/System.err:     at java.lang.Thread.run(Thread.java:818)
06-28 20:42:58.065 27511-27553/? W/System.err: Caused by: retrofit.converter.ConversionException: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 651 path $
06-28 20:42:58.065 27511-27553/? W/System.err:     at retrofit.converter.GsonConverter.fromBody(GsonConverter.java:67)
06-28 20:42:58.065 27511-27553/? W/System.err:     at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:367)
06-28 20:42:58.065 27511-27553/? W/System.err:  ... 13 more
06-28 20:42:58.065 27511-27553/? W/System.err: Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 651 path $
06-28 20:42:58.065 27511-27553/? W/System.err:     at com.google.gson.Gson.assertFullConsumption(Gson.java:863)
06-28 20:42:58.065 27511-27553/? W/System.err:     at com.google.gson.Gson.fromJson(Gson.java:853)
06-28 20:42:58.065 27511-27553/? W/System.err:     at retrofit.converter.GsonConverter.fromBody(GsonConverter.java:63)
06-28 20:42:58.065 27511-27553/? W/System.err:  ... 14 more
06-28 20:42:58.065 27511-27553/? W/System.err: Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 651 path $
06-28 20:42:58.065 27511-27553/? W/System.err:     at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559)
06-28 20:42:58.065 27511-27553/? W/System.err:     at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1401)
06-28 20:42:58.065 27511-27553/? W/System.err:     at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542)
06-28 20:42:58.065 27511-27553/? W/System.err:     at com.google.gson.stream.JsonReader.peek(JsonReader.java:425)
06-28 20:42:58.065 27511-27553/? W/System.err:     at com.google.gson.Gson.assertFullConsumption(Gson.java:859)
06-28 20:42:58.065 27511-27553/? W/System.err:  ... 16 more

Btw. you should always do exception handling! https://github.com/TCA-Team/TumCampusApp/blob/master/app/src/main/java/de/tum/in/tumcampusapp/activities/wizard/WizNavStartActivity.java#L77

kordianbruck commented 8 years ago

Yea, sessions spammed the inodes on the server and it couldn't create any new sessions. This is now fixed.