If you haven't done so already, try restarting the phone and see if that helps.
If you are getting the same thing with a different camera app, I am forced to believe that you have a general hardware failure and the apps simply are not seeing the rear camera.
I just installed this free app https://forums.androidcentral.com/e...fo&rdid=com.inkwired.droidinfo&token=qwPoQg7G on my Nexus 6P, scrolled to the Camera tab, and it correctly shows both a Primary camera and a Secondary camera. Why don't you give it a try on your phone?
I'm experiencing the same issue. Here on androidcentral, some users have found a strange but useful solution that seems to be diffused and often really working: just put a little piece of paper (like 1x2 cm) on the left of rear camera lens. It unbelievably worked for me too, but for something like 20 seconds. I've tried to replace the camera module, same result: working for something like a minute and then started crashing as before. Maybe you could give a try to paper's method, for some people it worked fine.
If you are getting the same thing with a different camera app, I am forced to believe that you have a general hardware failure and the apps simply are not seeing the rear camera.
I just installed this free app https://forums.androidcentral.com/e...fo&rdid=com.inkwired.droidinfo&token=vDOO3m-r on my Nexus 6P, scrolled to the Camera tab, and it correctly shows both a Primary camera and a Secondary camera. Why don't you give it a try on your phone?