Anrolosia/Shopping-List-with-Grocy

Attempt to decode JSON with unexpected mimetype: text/plain

Closed this issue · 6 comments

H3ALY commented

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.

Hey @H3ALY ,

have you tested what is explained in the documentation?
image

Thanks

H3ALY commented

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.

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

H3ALY commented

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

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

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