-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[camera] Camera Timeout on some devices #76305
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
Comments
Hi, @TahaTesser sorry, I don't think so, please re-open :-( #74645 is supposedly fixed by commit flutter/plugins@361567b so I applied the changes from that commit to local clone of camera 0.7.0+2 (because I cannot use non-null version). But problem is still there. I can take the first photo, but all subsequent attempts fail. I can destroy camera controller and initialize it again, and I'm at the beginning: I can take the first photo but that's it. I added some logging to the Camera.java and I see that "processCapture" method gets called many times and the last (hundred) calls are "case preCapture" with "aeState == 1", until it dies with I can change whatever I want - flash mode, autofocus mode ... first photo is fine, all others fail. //cc @mvanbeusekom |
To ride the "cargo cult" wave a little bit longer, when I change:
to
(aeState == 1) ... it seems to be working just fine. Needless to say - I have no idea what that means :-) |
Thanks for the feedback @Tomucha, we will look into this. I quickly looked up what Now I am not yet sure how we should handle this and if simply advancing to the |
The same is happening on my pixel 4. It also takes 4-5 seconds to capture the image, does that happen on your pixel 2 as well? |
@acoutts That seems like something different to me. In my case the first picture is captured quite quickly and all subsequent fail with CameraException(captureTimeout, Picture capture request timed out) |
I have the same problem on OPPO R11(android 8.1.1). It is always captureTimeout when I take picture. |
That's happening with me on Xiaomi Redmi Note 9. I can't even take the first picture after upgrading from version 0.6.0 to 0.7.0. But on iPhone SE 2020 works fine. |
(BTW in my case it's also after upgrade to 0.7.0, worked fine in previous versions) |
@szuwest, @dinahapuque, the bug related to the The issue @Tomucha is having is a little bit different, I am still investigating if the suggested solution if the correct one but the issue is on the radar and I am working on it. |
I found that, but it is not on release branch. 0.8.0-nullsafety.1 requires on Dart 2.12 above, which my env not support now |
You can use null safety packages in your app before migrating - it's designed to be backwards compatible. |
I upgrade to 0.8.0-nullsafety.2, It still has the same problem... |
I've resolved this issue in my PR here- give it a try and let me know if it works for you too. Confirmed on my pixel 4. |
I can confirm - the issue is still present in 0.8.1, but it seems to be fixed in flutter/plugins#3651 I have no excuse why this took me so long 👎 Thanks!!!!! |
Are there any updates on this issue? I am using the latest version of the camera plugin on pub.dev which is version Log:
cc: @TahaTesser , @Tomucha , @mvanbeusekom |
CameraException(Previous capture has not returned yet., takePicture was called before the previous capture returned.) |
The devices that I tested had issues like the one above:
Please fix this problem immediately. |
I'm having same issue with the version 0.8.1 on Xiaomi MiA1 device. After calling takePicture() , device flash turn ON continuously and log return timeout |
Consistent captureTimeout error also occurs on a Vivo 2015 smartphone running Android 10. Cannot take any pictures |
any news update? |
still occur |
On Nokia 3.1 Plus the same problem. The last working version is 0.6.3+2. After that version always "capture timeout" error. The example app do the same. |
Issue Still occurs on Is there any workaround or fix for this yet? below are the logs: |
Anyone know any update on this issue? I think its quite critical since the camera is not usable at all for the affected devices |
I just use camera plugin in version from this pull request: |
Hi @Tomucha The PR is mentioned is closed for similar PR flutter/plugins#3651 (comment), the issue might have been fixed in this new Can you please upgrade the package to the latest |
Sure, but not now, I have some deadlines here, so give me about 3 weeks. But I'm optimistic. It works for me when using flutter/plugins#3651 |
Without additional information, we are unfortunately not sure how to resolve this issue. Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
I have trouble with camera plugin (0.7.0+2) - the second time I try to:
... the call ends up with "timeout". The first time I take a photo everything works fine, but all subsequent calls fail. It all happens with example application too:
https://github.com/flutter/plugins/tree/master/packages/camera/camera/example
It works on some low-level phone I have here (myPhone Hammer Iron 2).
The text was updated successfully, but these errors were encountered: