Tried these methods
1.Clearing the App Cache
2.*Update the software
3.Booting in Safe Mode
4.Wipe Cache Partition
5.Perform a Factory Reset
6.Trying to use third party camera apps
Front facing camera works
Rear camera worked after factory reset however it stopped working the next day