How to fix camera failed error on Samsung Galaxy J5 (2016)?

I got this phone two months ago, and the first time I charged it and tried to use camera afterwards, it said Error: Camera failed. I tried reseting my phone to factory settings, it didn't help, just as, restarting it didn't help. Then I turned it off, and took out the battery, then put it back in, after which the camera worked fine. And every time after that camera stopped working only after I plugged the charger out. If I take out the battery, the camera will work fine, even while it's plugged in and charging, but as soon as I take the charger out, the error occurs again. What could be the problem and how do I fix it?

That's odd. I highly suggest that you have your phone checked cause your phone looks like it needs some repair.

Not the answer you were looking for?

Are you on the best cell phone plan?