koenidv/sph-planner

App crashes when it says "Deine Lehrkräfte finden...".

kurwjan opened this issue · 5 comments

Describe the bug
The App crashes when it says "Deine Lehrkräfte finden...".

To Reproduce
Steps to reproduce the behavior:

  1. Open the app
  2. Wait until it says "Deine Lehrkräfte finden..."
  3. See error (It crashes)

Additional context
Maybe it doesn't work with the "Otto-Hahn-Schule, Frankfurt am Main" and I have the app for 1 day. All features are supported except "Lerngruppen". I have a Redmi Note 8 with a Custom Rom (Xioami.EU MIUI Custom Rom).

Hey @Baumlaeufer0815, thanks for your report and sorry for the late reply.

This bug is actually not limited to school 6091 (Otto-Hahn-Schule) but happens with every school that has no teachers for any character.

This is because, to find and map teachers, we use the message feature's recipient search function and expect a non-empty response. To fix this, the app needs to check if the response is empty (plus, by experience with SPH, isn't just some random 2 characters) in Users.kt#loadUsersForQuery, line 112.

Unfortunately, as you might have seen, this project hasn't seen any contribution from my side for some time now and as I'm now doing Abitur, I am not further developing SPHplanner at this time, and probably won't.

However!

If you're interested in continuing this project, please do! This issue could be a good starting point as it's quite an easy fix. Hit me up.

This issue got one more report and 122 occurrences on Crashlytics. Whoopsie, gonna fix this now.

Sorry for the late answer too, because I didn't expect an answer. I hope your Abitur will be good! I will investigate this issue, but I have no expierience with Kotlin or Java. I can only C# (but I think C# is similiar to Kotlin or Java) with Unity. So I must first learn some things.
Edit: Apparently I am kinda dumb, because this issue is alreardy "fixed", but it stucks now at "Deine Lehrkräfte finden....", weird.

It's not you who's dumb, it's me ;)
I "fixed" this kind of in a hurry yesterday and couldn't test it. I fixed the new issue this morning, still can't test, but it should work now.
@Baumlaeufer0815 could you try installing todays update from the Play Store (or build main branch) and check if it works?

Ok, I will do it.
Edit: It works perfectly, thank you!