Anrolosia / Shopping-List-with-Grocy

A Shopping list integration with Grocy for Home Assistant
MIT License
41 stars 1 forks source link

Attempt to decode JSON with unexpected mimetype: text/plain #26

Closed H3ALY closed 1 year ago

H3ALY commented 1 year ago

I'm getting a "Failed setup, will retry" message after attempting to configure the addon.

The full message from the system log is:

Config entry 'ShoppingListWithGrocy' for shopping_list_with_grocy integration not ready yet: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain', url=URL('xxx/api/system/db-changed-time'); Retrying in background');

I've removed the full path to my installation. My installation of Grocy was added via Home Assistances Ingress add-ons rather than a standalone installation.

Anrolosia commented 1 year ago

Hey @H3ALY ,

have you tested what is explained in the documentation? image

Thanks

H3ALY commented 1 year ago

Hello @Anrolosia

Thanks for the quick response, I've ran it back to just the local IP:port and unchecked verify SSL and also modified the protocol in the address to be HTTP and I get the same message, if I use HTTPS I receive an SSL version error.

I've also set the grocy addon to not use SSL and still getting the same MIME issue.

Anrolosia commented 1 year ago

If you try to access your grocy instance using the https://<ip address:port> in your browser, is it working?

H3ALY commented 1 year ago

I've tested multiple scenarios regarding accessing Grocy inside and outside of home assistant using Http and Https with IP:port there doesn't appear to be any issues.

H3ALY commented 1 year ago

Something I didn't try was postman... so I've just tried and I seem to be getting a 401, which is returning with the contenttype text/plain so this is more than likely why I'm having this issue.

Just can't work out why I can't seem to get it to work with my key which is in the header with the key GROCY-API-KEY?

H3ALY commented 1 year ago

This can be closed, this is user error due to port configuration!