I wonder if there is a hidden app on the phone that is using the camera. Is this a jailbroken phone where you can sideload any app you want? You might want to consider a factory reset of this device.
There are two possible reasons as to why you will be prompted with the Warning: Camera failed error on your Samsung Galaxy A6 2018 device. First is that the