Closed sdrapha closed 2 years ago
tomorrowio documentation tomorrowio source (message by IssueLinks)
Hey there @raman325, @lymanepp, mind taking a look at this issue as it has been labeled with an integration (tomorrowio
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
I think this was a bug upstream. I saw the same errors but after a restart my logs are clean. If it comes back, then it means its an intermittent upstream problem and I can try to reach out to them about it
I just saw the same in my log yesterday. And today the integration not even loading. No other message in the log, just trying to reload it.
I've tried to restart HA as well. It is not helping either. Tomorrow.io shows that the requests has been made and gives code 2xx, which is success.
My tomorrowio integration went completely down today. Not sure if its related to this issue or coincidence. Could be something else on the cloud api.
But I do have some thoughts I want to share.
I searched the whole source code for the phrase: Attempt to decode JSON with unexpected mimetype
there is nothing matching this search.
I guess this message is coming from an external module, like for example the JSON module, if I have to guess it again. JSON.JSONDecodeError.
So, comnecting the dots. last version of HA started serializing its objects into JSON, right?, that was one of the improvements on the last changelog.
So I think this could be a consideration when trying to understand what is happening.
ps: forgot to mention. I got 10 more ocurrencies of this error message just before the integration went down for good. (and the log message when the integration went down is really unhelpful, there is no information on the log).
@sdrapha, I forgot to add. I am still running 2022.6.7 and the integration went dead without any error messages.
I will try to turn on debug today to see what is happening.
I turned on quickly logger to debug level and nothing special there, just the original WARNING
message and a bunch of (success: False)
:
2022-07-20 09:27:42 DEBUG (MainThread) [homeassistant.components.tomorrowio] Finished fetching Tomorrow.io - Home data in 46.668 seconds (success: False)
2022-07-20 09:27:42 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Tomorrow.io - Home' for tomorrowio integration not ready yet: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://api.tomorrow.io/v4/timelines'); Retrying in background
2022-07-20 09:28:37 DEBUG (MainThread) [homeassistant.components.tomorrowio] Finished fetching Tomorrow.io - Home data in 4.694 seconds (success: False)
2022-07-20 09:28:59 DEBUG (MainThread) [homeassistant.components.tomorrowio] Finished fetching Tomorrow.io - Home data in 1.369 seconds (success: False)
2022-07-20 09:29:24 DEBUG (MainThread) [homeassistant.components.tomorrowio] Finished fetching Tomorrow.io - Home data in 0.770 seconds (success: False)
@GSzabados it turns out that the integration went down for a different reason, it was adressed already. but the issue was closed before the fix was merged, that issue should had been kept opened. Lets keep this issue here focused on the JSON errors only since the other one was addressed already
@sdrapha, thanks, I haven't seen those other issues when I commented on this. I though this might be the same reason why it has stopped updating.
@GSzabados, me neither, the first other issue was closed and I didn't see it. the other one was just open this morning.
There is the possibility there is some relation between the two issues. Like, sometimes the cloud api sending a incomplete response of some kind , hence the http 206 code. Just guessing...
Just FYI, on 2022.7.7 I am seeing the Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://api.tomorrow.io/v4/timelines') error in my log occasionally. Usually it happens in the middle of the night or early morning, so I've been assuming - perhaps incorrectly - that it was originating at the tomorrow.io server end. I will monitor and if it reoccurs I'll turn on debug logging.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
Attempt to decode JSON with unexpected mimetype: text/html;
What version of Home Assistant Core has the issue?
2022.07.0
What was the last working version of Home Assistant Core?
2022.06.7
What type of installation are you running?
Home Assistant Container
Integration causing the issue
tomorrow.io
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tomorrowio
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response