Had a similar prob with my camera (not same as yours)turned out to be the battery contacts in the battery compartment-lid were not quite touching the end of the battery, managed to bend it down a bit so a good contact was made, no probs since......
Best phone camera 2017
Stunning new film posters by Hattie Stewart, Joe Cruz & more
iPad Pro 10.5in (2017) review
28 astuces pour profiter au mieux de votre iPhone