Happens to me also. When it does I got to Setting > Apps. Find "Camera" and open "Storage" and delete cache and data. You will not see the error for a while. Annoying bug I hope will be gone with the upcoming Oreo update. You can also use a third party camera like Cameringo+. Works great with...