supergeorg / Grocy-SwiftUI

A client for Grocy for macOS and iOS, written with SwiftUI
GNU General Public License v3.0
177 stars 17 forks source link

quantity_units error #178

Closed 19Andy89 closed 1 year ago

19Andy89 commented 1 year ago

Grocy Server 4.0.2 app version 2.10.0

the Grocy web interface is working without issues. Before updating grocy server and app everything was working too. After updating the app always shows up an API-error with quantity_units

the log output: "Data request failed for quantity_units. Message: decodingError(error: Grocy_Mobile.APIError.decodingError(error: Swift.DecodingError.valueNotFound(Swift.String, Swift.DecodingError.Context(codingPath: [_JSONKey(stringValue: "Index 6", intValue: 6), CodingKeys(stringValue: "name_plural", intValue: nil)], debugDescription: "Expected String value but found null instead.", underlyingError: nil))))"

for testing i deleted the quantity unit with index 6 and then the error changes to index 5 until it says index 0 which does not exist. i do not know, what to test or change, so the app will work again.

Do you need more information? Thanks a lot in advance!

19Andy89 commented 1 year ago

when deleting the name_plural from the error index the index change also to a smaller number.

supergeorg commented 1 year ago

Ok, something seems to have changed with Grocy 4.0 in this regard. A hotfix release is on its way.

CrysK commented 1 year ago

Ok, something seems to have changed with Grocy 4.0 in this regard.

I can confirm that it has to do with server version 4.0.X. I have tested the versions 4.0.0/.1/.2 and always the same. When switching to the 3 version, the error is gone immediately.

Thank you, I look forward to the hot fix!

19Andy89 commented 1 year ago

after installing the Hotfix the error is gone.

Thank you very much!

CrysK commented 1 year ago

I can confirm that the problem is eliminated. Server v.4.0.2 with iOS v.2.10.1

Thank you very much, that was so fast!