hpi-schul-cloud / schulcloud-flutter

Our Flutter based App for Android and iOS.
GNU Affero General Public License v3.0
20 stars 3 forks source link

Unexpected end of input #341

Open Musicpac opened 4 years ago

Musicpac commented 4 years ago

After installing the app I was not able to find any functionality in it. I was able to login to the brandenburg schulcloud but non of the contents could be displayed. The pink screens are everywhere. The main error displayed is "FormatException: Unexpected end of input(at character 1). If you try to go to your profile the error displays a JsonParserfail.

WhatsApp Image 2020-08-19 at 20 47 52 (1) WhatsApp Image 2020-08-19 at 20 47 52

MarcelGarus commented 4 years ago

Yes, this happened a lot. I think we fixed it in https://github.com/hpi-schul-cloud/schulcloud-flutter/pull/334 – and an even more comprehensive PR for error handling is in the works at https://github.com/hpi-schul-cloud/schulcloud-flutter/pull/337. Either way, I might be wrong, so be sure to check if the error still persists with the version from https://github.com/hpi-schul-cloud/schulcloud-flutter/tree/handle-errors-better.

Musicpac commented 4 years ago

The error got kinda solved. now the problem changed to a ressources not found and the session being invalid. Does my account need to be validated? flutter

JonasWanke commented 4 years ago

Currently, you are signed out automatically after two hours of inactivity. This is a limitation of the server, but will hopefully be changed soon. If you see such an error, you'll have to sign out via the banner at the top or via the account dialog, and then sign back in.

As a brief background on the FormatExceptions you reported initially: Many of the server's API routes are temporarily blocked. Hence we cannot currently access assignments or users, for example. This is a temporary server limitation as well, but the backend team is actively working on unlocking these routes. The PRs mentioned by @marcelgarus just change the appearance of these errors.