Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Crash because of Roomfinder Maps data for Z10 #122

Closed
octycs opened this issue May 22, 2022 · 7 comments · Fixed by #124
Closed

[Bug] Crash because of Roomfinder Maps data for Z10 #122

octycs opened this issue May 22, 2022 · 7 comments · Fixed by #124
Assignees
Labels
bug Something isn't working data This issue is related to the data collection and aggregation frontend Related to the frontend

Comments

@octycs
Copy link
Contributor

octycs commented May 22, 2022

Describe the bug
Z10 (and potentially other entries) have an error in the Roomfinder Maps data.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://nav.tum.sexy/building/0510
  2. Get an empty page because of the error:
    TypeError: view_data.maps.roomfinder.available[state.map.roomfinder.selected_index] is undefined

Expected behavior
Should not crash

Additional context
This is a crash in the frontend (which shouldn't happen), but probably related to an error in the data.

@octycs octycs added bug Something isn't working frontend Related to the frontend data This issue is related to the data collection and aggregation labels May 22, 2022
@CommanderStorm CommanderStorm self-assigned this May 22, 2022
@CommanderStorm
Copy link
Member

Preliminary triage results:

This is a data issue. map.roomfinder.default is not in map.roomfinder.availiable

I will continue after a sort break

@CommanderStorm
Copy link
Member

CommanderStorm commented May 23, 2022

The issue was in external/buildins_roomfinder.json which is used in 10 Roomfinder buildings:

{
  "maps": [
    ["200000", 54, "M\u00fcnchen", 640, 603],
    ["400000", 156, "M\u00fcnchen und Umgebung", 420, 515],
    ["100000000", 9, "Weltkarte Norden", 1619, 396]
  ],
 "default_map": ["4000", 12, "Stammgel\u00e4nde Basiskarte", 501, 484]
}

FYI: 0510 is the only building, for which this happens.

@CommanderStorm
Copy link
Member

A case very similar to this keeps happening at https://nav.tum.sexy/building/2930 though

CommanderStorm added a commit that referenced this issue May 23, 2022
Signed-off-by: Frank Elsinga <frank@elsinga.de>
@CommanderStorm
Copy link
Member

I had some old version of the website in my cache.

@CommanderStorm
Copy link
Member

CommanderStorm commented May 26, 2022

I had some old version of the website in my cache.

No, Frank this is wrong.
This subsite is apparently a bit flaky..
This does not work.. again..

Thanks @joschahenningsen for the report ❤️

Error Message:

TypeError: can't access property "file", view_data.maps.roomfinder.available[state.map.roomfinder.selected_index] is undefined

@CommanderStorm
Copy link
Member

Apperantly we dont clean the maps default, if no maps are available:

"maps": {
        "roomfinder": {
            "available": [],
            "default": "rf12"
        },
        "default": "interactive"
    },

@octycs what would be the expected case if no maps are available for an eintity:

"maps": {
        "roomfinder": {
            "available": [],
            "default": null
        },
        "default": "interactive"
    },

or

"maps": {
        "default": "interactive"
    },

@octycs
Copy link
Contributor Author

octycs commented May 26, 2022

I think the latter is better. This is what the webclient currently expects as well (https://github.com/TUM-Dev/navigatum/blob/main/webclient/src/views/view/view-view.js#L155)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data This issue is related to the data collection and aggregation frontend Related to the frontend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants