-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
"Uncaught RangeError: offset is out of bounds" Error #189
Comments
Have not encountered that before. Can you provide your card configuration, and describe what you're doing when those errors arrive? If you have a stacktrace or anything else on on the Javascript console (F12 in Chrome) that would be really helpful. |
Also when you visit the Frigate server web UI, do the 'Live' and 'Debug' video streams work okay, or do you see a similar error? |
I also get that one randomly on a specific device (Surface Pro / Windows 10 / Edge Latest). In the HA log, I get thousands of
In the console of the browser:
The cards stay white and don't recover. The only way to fix it is to reload the page. I have an extension to reload the page every 30 minutes my kiosk view (because it does not refresh automatically if I make changes to the dashboard on another device). Sometimes (maybe every 10 reloads), the cards can't load and these errors loop. I am not able to reproduce it easily. :( |
Related errors upstream: |
I don't have the stack trace for @maxi1134 : Do you know if you get this error on a browser which has been open for a long time or on a computer with low memory? |
@Mincka I do leave the browser open for hours on end on the video view! I also get white screens and no loading after a few reloads of the page. 32GB of ram here |
I have seen this when using very high resolutions. |
@blakeblackshear I am using 2 and 4k cameras! ( 5 and 8MP for the biggest ones ). That might be the issue? |
Not my case. Over 4 cards, 3 streams are low resolution (640x360), another is 1920x1080. |
I cannot reproduce this with any of my cameras -- but I suspect this is just because they are lower resolution / lower bitrate than the cameras you are experimenting with. Right now both the Frigate card and the Frigate web UI use a 4MB JSMPEG If anyone can readily reproduce this and is comfortable doing their own build, try setting a much higher value here and lets see if it has any effect? The upstream issue also suggest that the |
Tested with It would be great if @maxi1134 could also test it. Update your Delete the frigate-hass-card.gz file. Ctrl+F5 and/or Shift+Ctrl+R to reload. Edit: Anyhow, would it be possible to catch these exceptions from the card and trigger a reset to prevent an unexpected flooding? |
I added a way to specify custom JSMPEG parameters in the card YAML (as specifying a giant video buffer size for most users is probably unnecessarily inefficient). In the next build, you can do something like: live:
jsmpeg:
options:
videoBufferSize: 41943040 ... which is equivalent to the custom build @Mincka did. @Mincka also mentioned a potential garbage collection problem in the upstream JSMPEG library -- I think they're on to something. If I set a very low |
I replaced my file and the errors continue! Update: It worked for a little while on Firefox but after a few hours of streaming the error is back in the console. |
It also still happen in my case. I try a new build with |
It's quite sad but the error happened again the first time I reloaded the page with the latest build (with If the exception bubbles up to the console / HA, I guess you could catch it and reset the card @dermotduffy? Of course it would be best to find the root cause, but I think it could be helpful to prevent an unexpected log flooding from the card. when the dependencies fail for some reason. |
It seems like it would be simple, but because the errors are not really related to the card all, and not in any of the call paths I control (they are buried deep inside the JSMPEG libraries in async code that gets triggered from Websocket traffic), there isn't even a straightforward way for me to notice or catch these errors. I'll see if I can hack something in, but it won't be pretty... I'm not sure reset the card is right, as there's no guarantee it'll work after the reset either and it could easily generate a reset-loop. |
OK I understand. :( I am now running the latest version with only |
No errors today. With web assembly disabled, the stream seams to take a little bit longer but that's OK for an initial load on a kiosk. It could be a fix for me. I will check back in a few days. Thanks! |
Still no error on the Surface Pro used as kiosk while using only this:
I consider this workaround good enough for me. Thank you. Maybe something to add to the Troubleshooting section? |
Is the DisableWebAssemble option available in the latest HACS version? If not, how can I install it!? Thanks! |
@maxi1134 It's not, you'll either need to do your own custom build or wait for the next beta version (probably within the next week). |
I got a new, yet similar error today! 2021-11-25 15:20:16 ERROR (MainThread) [frontend.js.latest.202111090] http://192.168.0.15:8123/hacsfiles/frigate-hass-card/frigate-hass-card.js?hacstag=394082552200:557:66175 Uncaught RangeError: WebAssembly.Memory.grow(): Unable to grow instance memory |
I added jsmpeg: and it seems to work! |
Just because the configuration was not rejected, doesn't mean that option was honored! Unless you did a fresh build yourself, it should not have any effect. FYI: I'm planning a new build this weekend, just trying to squish a few more bugs first ... |
I did a fresh build! ( Only took me 4 hours to figure out how 😅 ) |
I had another look at this, and even wrapping the calls to prevent the exception spam is an exercise in futility -- when it gets into this situation, it seems like the exceptions can stem from a variety of different sync & async methods -- wrapping one only just causes the exceptions to pop out somewhere else. So I am going to close this bug, as I'm struggling to identify a sensible action to take that doesn't just depend on the upstream bugs being resolved. For those in this situation, if the Of course, if anyone else has bright ideas of things that can be done in the card, I'd love to hear it. |
Checklist:
Release with the issue:
2.0.0
Last working release (if known):
the one before (Unsure which number )
Browser and Operating System:
Chrome, Ipad Fullkiosk and the HA app on a android table
Description of problem:
Additional information:
The text was updated successfully, but these errors were encountered: