You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
failed to initialize camera on windows desktop #120267
i have installed Camera Windows Plugin and used the code example provided in the example section. But when i ran the project and clicked create camera button it shows failed to initialize camera error(PlatformException(camera_error, Failed to initialize video preview, null, null)). I am using an external usb camera which is working fine with other applications.
Hi @yasar-salim
It works as expected from my end as below demo video.
bandicam.2023-02-08.16-36-03-198.mp4
Does the issue happen when running with camera windows sample code? If so, please provide the complete output of flutter run -v so that we can verify it.
Also, please provide the output of flutter doctor -v as well. Thanks!
@huycozy app works perfectly and this is the only error i am getting. I used droid cam as another camera source and i can switch to that and can take picture
@yasar-salim Unfortunately, my PC has only one external USB camera (as you see from my above demo), it doesn't have a built-in camera so I can not verify this.
But I see there's an open issue addressing the case you described #103897. It seems to be a similar issue, its log is not exactly the same, though. You can take a look at that issue and check all findings there.
In case it's different than this issue. Can you share your affected camera specs? (model). Please also provide the complete output of flutter run -v and the pubspec.lock file content (which contains camera_windows version there).
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
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 flutter doctor -v and a minimal reproduction of the issue.
Activity
huycozy commentedon Feb 8, 2023
Hi @yasar-salim
It works as expected from my end as below demo video.
bandicam.2023-02-08.16-36-03-198.mp4
Does the issue happen when running with camera windows sample code? If so, please provide the complete output of
flutter run -vso that we can verify it.Also, please provide the output of
flutter doctor -vas well. Thanks!yasar-salim commentedon Feb 8, 2023
@huycozy yes camera windows sample code. checked now on a laptop working fine with built in camera.
flutter: PlatformException(camera_error, Failed to initialize video preview, null, null)
the above error is getting when clicking create camera button on both desktop and laptop(usb camera)
huycozy commentedon Feb 8, 2023
@yasar-salim Is there any remaining log from stackstrace that you can provide to us? Or does it only have
PlatformException?Also, can you still interact with the app? Does it have any wrong behavior, like freezing?
yasar-salim commentedon Feb 8, 2023
@huycozy app works perfectly and this is the only error i am getting. I used droid cam as another camera source and i can switch to that and can take picture
huycozy commentedon Feb 9, 2023
@yasar-salim Unfortunately, my PC has only one external USB camera (as you see from my above demo), it doesn't have a built-in camera so I can not verify this.
But I see there's an open issue addressing the case you described #103897. It seems to be a similar issue, its log is not exactly the same, though. You can take a look at that issue and check all findings there.
In case it's different than this issue. Can you share your affected camera specs? (model). Please also provide the complete output of
flutter run -vand thepubspec.lockfile content (which containscamera_windowsversion there).github-actions commentedon Mar 2, 2023
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
github-actions commentedon Mar 16, 2023
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
flutter doctor -vand a minimal reproduction of the issue.