Expo Camera BUG in E_CAMERA_UNAVAILABLE
See original GitHub issueAfter granted camera permissions using this function:
async componentWillMount() {
const { status } = await Permissions.askAsync(Permissions.CAMERA);
this.setState({ hasCameraPermission: status === 'granted' });
console.log(status);
}
/Result: granted/
_takeAndUploadPhotoAsync = async () => {
if (this.camera) {
try {
const res = await this.camera.takePictureAsync();
console.log(res.uri);
// this.setState({ photo: res.uri });
} catch (error) {
console.log('====================================');
console.log('error in _takeAndUploadPhotoAsync', JSON.stringify(error));
console.log('====================================');
}
}
};
I’m getting this error :
error in _takeAndUploadPhotoAsync {"framesToPop":1,"code":"E_CAMERA_UNAVAILABLE","line":9631,"column":31,"sourceURL":"/data/user/0/host.exp.exponent/files/26.0.0/cached-bundle-experience-%40olympus%2Fchats651574282-26.0.0"}
@Empact terribleben @expbot @esamelson @nikki93 @skevy
Empact terribleben
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
[expo-camera] Bug. Reinitialising camera on video start ...
When start recording on iOS device, camera is reinitialising during 1-2 secs and records black video. Expected result: after calling recordAsync() camera is...
Read more >Camera - Expo Documentation
The camera's parameters like zoom, auto focus, white balance and flash mode are adjustable. With the use of Camera , one can also...
Read more >expo-camera error “camera not working” on android web app ...
I am using expo-camera on my app that can be run to a web on android/ios. Setting camera type works but when I...
Read more >expo-camera - npm
A React component that renders a preview for the device's either front or back camera. Camera's parameters like zoom, auto focus, ...
Read more >Manage Camera stretching problem in android device. - Expo
you can refer to the usage of camera (for qr code scanner) in expo client for an example of how to size it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is your preview up and ready when you attempt to take picture? If you’re trying to do it immediately after
Camera
is mounted it could throw an error because it hasn’t initialized yet.Closing due to lack of activity. Feel free to reopen if this persists and provide some more info 😃