-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Card stops working intermittently: Unknown error #568
Comments
Thanks @felipecrs . Ever see it in a view other than live? You are using multiple live providers, does it show up on providers or only 1? (If you happened to notice!) |
It happens in clips view as well. By the way I noticed a bunch of errors in the Hass Core logs: I'm not sure what's the best way to dump these logs (and btw, if Frigate integration supported Diagnostics this would be a little easier). |
Here is one of them:
|
Looks like a communication issue between HA and the Frigate backend, which propagated to a failed media source error, which propagated into the card. Not sure why this wouldn't have happened with v3 though. Did you change your Frigate backend version recently? |
No, I didn't change anything else, except applying HA Core patch upgrade, I think. I didn't reboot my server since a while, I will reboot it now and monitor too. |
Actually, I think the v4 card is probably fetching the events to show as thumbnails, but you don't have thumbnails enabled -- so that fetch does ~nothing useful. And when that fetch fails, it causes this error for you. I can try to optimize that away ... [and off the top of my head the v3 probably didn't behave this way] (But still seems like there's something unrelated going on between your HA and your Frigate instance) |
Ok, error remains happening after rebooting the server, just to confirm. |
Anything hints in your Frigate backend logs? |
BTW: Because of the behavior I described above, if you built your v4 before I fixed #557 , this problem may have been massively exasperated (as fetching was incorrectly continuous, instead of one-off). |
Ok, but my card is up-to-date with the release-4.0.0 tree, including my own PR which was the last to be merged. |
I will try to revert to 3.0.0 and see what happens, I will let you know of the result. |
No, nothing useful there. Only the regular WebSockets initiated and terminated messages. |
Let me monitor for a while. |
I think it has no relationship with cameras being Frigate or not (because I do mix them, but the third card in the above screenshot only mixes Frigate cameras). |
Ok, the issue came from frequently to rare. I don't know what has changed, and I can't guarantee anymore that this was introduced by v4. I still see tons of Unknown error in my HA Core logs, related to the Frigate WebSockets API, but, they are not causing my card to crash (it seems). So, I'm closing this. Thank you very much for the support so far, if I find something useful I will let you know. |
Out of the blue this started to plague me again: chrome_t1KPSoxcVs.mp4I have the feeling that this has something to do with ongoing detections/clips. |
Oh, I found a good way to test. I was using HA 2022.5.3, and I restored the HA Core backup of 2022.5.2. This also restored my Lovelace dashboard, which in turn was before the Frigate card 4.0.0. This way, I could revert to 3.0.0 keeping all my cards untouched. I am testing now with v3. |
Just to mention, restoring the backup caused a big side effect for me: The correct thing to do was to restore the backup taken by the Google Drive add-on. That one restored everything, including my |
@dermotduffy, I think I was able to narrow the issue a bit further: https://1drv.ms/v/s!AntpCaY1YjnMiukyVoZUxB_tmqUm7A?e=UCFE1S (The video is too big to post on GitHub) |
Theory: The card is spamming the server with requests, causing the Frigate backend to get overloaded, time out on some of those requests -- causing this error. |
@felipecrs Would you mind re-testing with the merged #587 ? I hope/suspect this will help you! |
@dermotduffy thank you so much! But unfortunately, it did not solve the issue: chrome_zKby95dqnH.mp4(Jump to 0:35) Now I will try to update to the latest Frigate integration that was just released. |
I have another theory:
|
Thanks @felipecrs . Ah well, we'll get there! In your configuration, the card should no longer fetch thumbnails in the Your theory could be right. Is your Frigate machine under heavy load perhaps? Does browsing the HA media browser ever fail for you? I'll do a little research later on trying to reduce the number of requests the timeline:
media: clips (By default it fetches events that are clips & snapshots, so limiting it to one of those instantly cuts the number of fetches necessary by 50%). |
@dermotduffy thanks a lot for the insights, but please don't do anything yet. I'm testing the new Frigate integration, and I already see a different behavior: Before, in the timeline view, nothing ever showed up for me (I was about to send you a Discord message asking if that was expected). Immediately after upgrading the integration, I now get proper timeline views: And yet, no errors. |
Yes, that is expected. The new integration has blakeblackshear/frigate-hass-integration#225 which is required for the timeline to work (I just hadn't done an integration build, since the card code is still very untested!). OK -- I'll hold off until you tell me. |
@dermotduffy I'm about to claim everything is good now. No errors in HA core logs too. If nothing shows up by the end of day, I will close the issue. |
And just to answer some questions:
I haven't observed the issue happening in live view indeed, but my test (before upgrading the Frigate integration) was very shallow.
Yes, the machine is under a good load. I host everything on it through HassOS, and Frigate usually takes 40-60% of my 4-core J4125 CPU. The total load is usually at 70%: I haven't yet determined the reason behind the 90-100% spikes, though.
Never noticed it. |
@dermotduffy, I am facing the same issue even on Frigate Integration v2.3 (Frigate Card - v3.0.0 and Frigate Addon - Frigate NVR v3.1). I am on HA Blue (HA Core 2022.6.2, Supervisor 2022.05.3, OS 8.1). |
Hi @satyambaba, I'm not sure that's the same thing. Felipe's error was showing up as "unknown", whereas yours is labeled as a media source issue. Does the HA Media Browser work correctly for you for Frigate? Do you have any exceptions in your Home Assistant logs, or anything on your Javascript console? |
Hi @dermotduffy, thanks a lot for your response. I can browse frigate clips and recordings using the inbuilt media browser. I don't have any exception in HA logs or in the JS console. Please see the attached screenshots. |
@satyambaba What version number do you see when you navigate to your Frigate UI, then click debug on the left sidebar? You should see a version number near the top of the screen. |
@dermotduffy - I see 0.10.1-83481AF. I'm not sure if this is the version number you are looking for? |
Bit surprised you're seeing mp4 files in the media browser like that, thought you might be on a much older Frigate instance. Something feels wrong here :-) Can you navigate in HA to |
While I was navigating to take the suggested screenshot, I noticed that the frigate integration was disabled. The moment I enabled that, the error vanished. Sorry for the trouble, it was an oversight at my end. However, now I'm wondering that how the frigate was working fine (including capturing events, recording, etc.) while the integration was disabled. |
Aha!
The integration only does the glue between the Frigate server (which captures events/records) and Home Assistant, so that is as expected. |
Thanks for the clarification, and your help. I really appreciate it! Thanks a lot for this awesome integration. |
I'm using the current latest v4.0.0. Nothing shows in the browser logs. Happens frequently, but I still can't determine why.
chrome_YpJe2qR4WB.mp4
This didn't happen in v3.
This is the configuration of one of my cards, but the problem happens to all of them:
The text was updated successfully, but these errors were encountered: