Front camera not working on OnePlus 5T Since yesterday my phone's front camera hasn't been working. 


Not working on most apps, including native camera. While touching "switch camera" button in camera application, nothing happens. 
Instagram images from the front camera displays a distorted, stretched image of the rear camera. 
In Dialer keycode(secret code) #808 for Oneplus devices, "front camera preview" displays rear camera's image. But "camera test" makes the app close(force close) without any error info. 
If I'm not mistaken, during a video call on WhatsApp, the camera froze along with the app, which became unusable until I restarted phone. After that the camera hasn't worked ever since. 


What I've tried so far: 


factory reset 
safe mode 
several camera apps 
going back to stable (I was using beta) 


Nothing worked. Any suggestions?
Tried to fix a possible software problem in any way I could imagine. Nothing worked.

Sent it to OnePlus for repairing and now it is working like new. They had to replace a few components, so it was a hardware problem.