did you try wiping system cache partition. do you have any third party camera apps installed? if so, try uninstalling them
My Galaxy Note 8 Front Camera Hangs and unfortunately stops when i convert it from rear to front/selfie mode.. some times it works for few seconds.. i had done many techniques.. reset camera setting.. rest my phone as well.. try to check in safe mode.. but it didn't work..
its not hardware fault because when i open it in service test mode *#0*# it works properly..