You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
While the iOS app is parsing the sitemap data, there is a missing "label" key in the JSON that is fetched that causes an iOS exception and the sitemap does not get fully decoded and therefore does not load for the user.
On web, add a new item, add "State Description Metadata", add a few key/value Options, say true=Open new line false=Closed
Load up the Openhab Mobile app and receive the properly loaded sitemap.
Go back to the web and edit the "OPtions" in your Items state description metadata. (I removed the options in my case)
Go back to the iOS mobile app and the sitemap will not load anything due to this bug of not being able to parse the incoming JSON due to a missing "label" key.
Expected behavior
The mobile app should load the sitemap after editing the Item's state description metadata.
Screenshots
If applicable, add screenshots to help explain your problem.
App (please complete the following information):
Version: 2.4.60 (1580410538)
Smartphone (please complete the following information):
Device: Iphone SE Second Gen. Happens on all phones though
openHAB (please complete the following information):
Version 4.2.1
Workaround
Locate the Item you recently edited, and delete it's State Description Metadata field.
Re-add the State Description metadata.
Additional context
I would help fix, but I don't know whose fault this is, iOS not handling an optional "label" key or the Web side not providing the necessary valid JSON. My guess would be that this is a Web issue dealing with the removal of "Options" in an Item's State Decrioption metadata and erroneously still providing Option values in the JSON when it shouldn't be.
The text was updated successfully, but these errors were encountered:
New bug checklist
Describe the bug
While the iOS app is parsing the sitemap data, there is a missing "label" key in the JSON that is fetched that causes an iOS exception and the sitemap does not get fully decoded and therefore does not load for the user.
Bug Location
Bug Tracked to this exact spot on Line 376:
openhab-ios/openHAB/OpenHABSitemapViewController.swift
Line 376 in eb34c7f
iOS Log:
keyNotFound(CodingKeys(stringValue: "label", intValue: nil), Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "widgets", intValue: nil), _JSONKey(stringValue: "Index 1", intValue: 1), CodingKeys(stringValue: "widgets", intValue: nil), _JSONKey(stringValue: "Index 1", intValue: 1), CodingKeys(stringValue: "item", intValue: nil), CodingKeys(stringValue: "stateDescription", intValue: nil), CodingKeys(stringValue: "options", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0)], debugDescription: "No value associated with key CodingKeys(stringValue: "label", intValue: nil) ("label").", underlyingError: nil))
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The mobile app should load the sitemap after editing the Item's state description metadata.
Screenshots
If applicable, add screenshots to help explain your problem.
App (please complete the following information):
Smartphone (please complete the following information):
openHAB (please complete the following information):
Workaround
Additional context
I would help fix, but I don't know whose fault this is, iOS not handling an optional "label" key or the Web side not providing the necessary valid JSON. My guess would be that this is a Web issue dealing with the removal of "Options" in an Item's State Decrioption metadata and erroneously still providing Option values in the JSON when it shouldn't be.
The text was updated successfully, but these errors were encountered: