Hope you're doing great today.
Sometimes, we can identify if there might be any type of 3rd party apps affecting the camera app.
-You can try to start the device up on safe mode. For that you just need to press and hold the power button and once you see the power off icon (red icon) you'll hold it until it says ''safe mode'' (it might sound kind of weird but try to check if the camera its clean.)
If the problem stills the same, remember that you can bring the device over to a ubif store location for a full free checkout of the camera hardware.
Hope it works! ^^/ (i'll follow up on this case for more re-search)
yes, I have tried all these things i wiped the cache and it does it time to time. i eaven wiped all cache on the phone. and i have reset all settings on the phone and seems to still do it time totime.