-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
CAMERA NOT DICONNECTING AFTER QUAGGA.STOP() CALLED #525
Comments
Thank you for filing an issue! Please be patient. :-) |
I made a bit of an attempt to try to figure out what's going on here, but the formatting of this code is just completely illegible... so I pasted it into a browser, and this code just doesn't parse/run. Could you please reformat it and fix the errors and try again? (i edited your post to use the correct 3 backticks to start a code run, not single backticks) |
Getting same error ,did you find solution? |
@usamahassankhan if you're using the same code as @BISWAJITABISWAL it's because their code doesn't even parse, so it's never running the stop. |
Closing due to no further input |
Getting the same issue here. The camera does not disconnect when calling Quagga.stop() or even calling Quagga.CameraAccess.release(). |
I would say the best way to diagnose it is to put a breakpoint on your call to stop, but also put a breakpoint on your call to start -- what I found was that I had to do some slight reorganization to how some things were handled in my app, because first it wasn't hitting the stop call, and then after that was fixed, the app was hitting the start call again, and then the component would be unmounted without calling stop again. I think it was some sort of weird thing happening because of the way that I animated the opening and closing part, because my camera div slides open and closed .. so it was spamming the start call. If you are certain that stop is being hit, and you're not doing another start right after, then we have a problem to look into here, or perhaps in the browser itself. |
After some hours of debugging, I realized this bug was happening only on local environment |
If you figure out the cause, drop in and post it, so we have more suggestions for when it inevitably happens to someone else :) I'm reasonably certain that it's not a problem with the library itself, but I might be able to mitigate it in the library, as I did when I added async to the stop/start, so we could know when the operation had completed by awaiting it. |
I am not sure about the root cause, but I think it was because I was using a reverse proxy to be possible to access the local environment with https (I needed it to access some authentication cookies). |
I also have this issue, however every environment. I'm not sure what the difference is on my end, but I have to explicitly call Quagga.cameraAccess.getActiveTrack().stop(); // <----- Should not be necessary, but it fixes the issue.
Quagga.stop(); |
@Will-at-FreedomDev anything showing up in console? stop() calls CameraAccess.release() which does
which seems like it would be more extensive, and cover pretty much any possible thing running on it... but... maybe your solution is all that's necessary, and we're just doing way more than needed in there. |
Hey @ericblade , sorry nothing in the console. Just silently keeps ahold of the camera. Since you shared some code, I took a look at the library. It seems pretty straightforward to me and it seems like calling If I end up working on that project again, I'll see if I can uncover anything else by digging a little deeper. My hunch is maybe this if statement in the |
hmm. interesting thought, but if that were true at start() time it wouldn't do the right thing... i suppose it could later be not true, though. |
It appears that this issue is still present for iPhone 15 v17.3 Safari users. I'm going to look into this some more and can report back if I find out anything worthwhile. |
@ericblade Looks like this one is an ID10T error :) I called |
My issue is when the component is destroyed the camera is not turing off, even if i do stop(). I tried all possible ways but still none of them work
The text was updated successfully, but these errors were encountered: