Grocy-SwiftUI icon indicating copy to clipboard operation
Grocy-SwiftUI copied to clipboard

No Connection to Server

Open jagadeesh-s2104 opened this issue 3 years ago • 7 comments

Hello!

I get No Connection to Server when I click Shopping list in the App. I use the latest version of App & Grocy. But the master data/products - works fine. I'm able to add new product from the mobile app and its getting updated in the server.

Any idea?

IMG_2182

IMG_2183

IMG_2184

jagadeesh-s2104 avatar Aug 09 '21 09:08 jagadeesh-s2104

This has to be connected to an incorrect response from the server. The "no connection" message shows if there is a problem with the server or the return is not parsable. I think it is the latter, please look for corresponding error messages in Settings -> Log and post them here.

supergeorg avatar Aug 09 '21 19:08 supergeorg

Please find the log here : Grocy-SwiftUI_LOG.log

jagadeesh-s2104 avatar Aug 10 '21 13:08 jagadeesh-s2104

It seems like some shopping list item has an amount in form of a string. If I remember correctly, this is not a valid state, hence the parsing fails. I guess this is based on a migration of an older version of Grocy, so please check the return via the API menu (the amount should be "") and correct it in the web UI (e.g. by setting the amount to 1). If the value is other than "", please post it here and I will implement a fix for this.

supergeorg avatar Aug 11 '21 22:08 supergeorg

Hi, I have a similar issue, but the logs states "coding error" on every feature_or tweak that deactivated in Grocy's setup (through Home Assistant, but on its own domain) where intValue is 'nil'.

Chacsam avatar Sep 12 '21 08:09 Chacsam

Hi guys,

I got the same issue of "No Connection to Server" on stock overview, both iPhone and iPad got the same issue.

My App version is 1.2.2 grocy version 3.1.0

Could anyone give me some hit?

20:59:43.418 ERROR GrocyViewModel.getSystemConfig():599 - Get systemconfig failed. hassError(error: Grocy_Mobile.APIError.decodingError(error: Swift.DecodingError.typeMismatch(Swift.Bool, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "FEATURE_FLAG_CHORES", intValue: nil)], debugDescription: "Expected to decode Bool but found a number instead.", underlyingError: nil))))
20:59:43.421 ERROR GrocyViewModel.requestData():392 - Data request failed for SystemConfig. Message: hassError(error: Grocy_Mobile.APIError.decodingError(error: Swift.DecodingError.typeMismatch(Swift.Bool, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "FEATURE_FLAG_CHORES", intValue: nil)], debugDescription: "Expected to decode Bool but found a number instead.", underlyingError: nil))))

Grocy-SwiftUI_LOG.log

MaoZ1993 avatar Oct 11 '21 10:10 MaoZ1993

The easiest way would be to upgrade your Grocy instance to 3.1.2 This data type mismatch is a known problem of version 3.1.0.

Otherwise you could change the settings back to default for this flag, but updating is recommended.

supergeorg avatar Oct 14 '21 17:10 supergeorg

Thanks @supergeorg , I found the data type problem you mentioned state in v3.1.1 changelog. My Grocy is hosted on HA and the latest HA add-on built-in version is still 3.1.0. I'll try if I can manually upgrade.

MaoZ1993 avatar Oct 15 '21 01:10 MaoZ1993