nucleus-ffm / foss_warn

An unofficial open source application to get emergency alerts from https://warnung.bund.de/meldungen.
GNU General Public License v3.0
98 stars 6 forks source link

incorrect ARS for some places #112

Open ported-pw opened 7 months ago

ported-pw commented 7 months ago

Describe the bug When refreshing the warnings (and on automatic refresh), the following error pops up: IMG_20240113_232513 Also, in the app "No server connection is shown".

To Reproduce Steps to reproduce the behavior:

  1. Install the app in the latest GitHub release version (although the current F-Droid version has the same issue)
  2. Add one location
  3. Drag down to refresh, or wait for automatic refresh

Expected behavior No error messages appear and/or warnings are loaded.

**Device :** - Device: Pixel 7a - OS: GrapheneOS latest (Android 14) - App-version: 0.7.0 - Battery optimization: false

App Settings All defaults except for adding one location.

nucleus-ffm commented 7 months ago

Does this happen for every location selected or just for one? It looks like some information is missing from the API result.

ported-pw commented 7 months ago

You're right, it does work for other locations. I've just tested it with a variety of locations and it seems to be related to Berlin districts. For example, selecting "Mitte (B)" will cause the error.

nucleus-ffm commented 7 months ago

It seems that this is an incorrect data entry which comes from the list of the geocodes. The geocode for "Mitte (B)" is 110010001001 which is mapped to the geocode on district level 110010000000 which does not exist. It actually should have the same geocode as Berlin 110000000000.

The API only returns data on district level ("Kreisebene") so it would actually do not make any difference if you select "Berlin" or "Mitte".

But thanks for the hint, one more reason to speed up the migration to the new dataset prepared in https://github.com/nucleus-ffm/foss_warn/tree/allowUseOfCurrentLocation