If you an encounter a "Camera failed" warning or experience device freezing or slowdowns while using the Camera app, it is likely a software-related issue rather than a hardware problem with the camera itself. To resolve this, follow the troubleshooting steps outlined below:
Reset the Camera settings
Restart the device
Check for Camera app update
Reboot the phone in Safe mode
Perform the Camera test
Click on the image below to view detailed instructions for each step.