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

No login #158

Closed mike9449 closed 1 year ago

mike9449 commented 1 year ago

I’ve already checked my long term api key from homeassistant user management and the api key from grocy apikeymanager but I can no longer login through the app. Maybe it’s an issue related to the home assistant latest core update? when I try to login I receive the following error: Error at checkLoginInfo: hassError(error: Grocy_Mobile.APIError.hassError(error: Grocy_Mobile.APIError.errorString(description: "Invalid response to Home Assistant Request. Are you authenticated?")))

apeltzer commented 1 year ago

I have the same error since upgrading Home Assistant.

supergeorg commented 1 year ago

Well, I didn't find any change in the changelog.

I don't have a Home Assistant server running at the time (I am planning to), so any assistance is appreciated.

supergeorg commented 1 year ago

I have spun up a VM and am trying to fix it. The same problem seems to have cropped up for the Android app, with a fix of some sort.

This seems to be a bug in Home Assistant (which you reported here), so it is better to wait for a fix than to work around it by fiddling with websites.

Natclanwy commented 1 year ago

Are there any updates on this issue? It appears there has been some movement on the Android Grocy client that was experiencing similar issues.

GianlucaScarciolla commented 1 year ago

I also wanted to ask if there is a solution to the problem in the meantime?

supergeorg commented 1 year ago

I have found a proof-of-concept solution (using the web socket to generate token seems to work). But the code is by far not finalized, but by I was able to get a Token and used it successfully.

gielk commented 1 year ago

I would love to know when it will be working again. Can't use the iOS app at this moment.

supergeorg commented 1 year ago

I have found the remaining problem and have now a working version of the app. But it is based on the new async model, therefore I will look whether integrating it in the old model or using the new one is preferable.

supergeorg commented 1 year ago

Ok, I fixed the problems with the async/await pattern and improved some things. The new version with working (at least for me) Home Assistant support (2.9.0) is now in review.

Natclanwy commented 1 year ago

Ok, I fixed the problems with the async/await pattern and improved some things. The new version with working (at least for me) Home Assistant support (2.9.0) is now in review.

I’m not getting a login failure any more but now I’m getting an API error. I have attached my app log. Grocy-SwiftUI_LOG.log

gielk commented 1 year ago

It is working for me Thanks!

Natclanwy commented 1 year ago

Seems to be working now, not sure what the problem was this morning.

apeltzer commented 1 year ago

Working for me too