According to a post on Reddit by teryakiwok, “I opened up the camera app only to be met with a black image preview, sometimes I can get an image however it’s either tinted green or purple and was once accompanied by a screen stating ‘Emergency iPhone needs to cool down’ when the handset wasnt even slightly warm.”
Unfortunately it seems that this isn’t a software problem and appears to be a hardware one. If you are encountering similar issues, it seems that the only fix available is to take your phone back to Apple and ask for a new one. “I’ve tried hard reset and factory restore to no avail, however I’ve been in contact with other users with the same problem and apple had to replace their phones due to a ‘hardware fault’. So if you’re met with the same issue take it back for a replacement.”
It is unclear as to what the problem might be, but Redditor eyesee has suggested that maybe it could be due to a loose or damaged flex connector. In any case Apple has yet to publicly comment on it so as it stands we’re not sure how widespread this problem is at the moment.