Hi @asadishere ,
You may have a faulty DC-In jack (supplier example only to show what it looks like and the cost of the part) There are other suppliers that may suit you better. Just search for Acer Aspire 3 A315-21 DC-In jack to get results.
Sometimes the centre pin of the DC-In jack breaks loose internally from its’ connection and can cause an intermittent connection problem. It cannot be repaired, it has to be replaced
Here’s a video that shows how to fix an overheating problem in your model laptop. I realize that this is not the problem with your laptop but the video is useful as it shows how to open the laptop so that the DC-In jack can be disconnected from the motherboard and the wires tested for continuity, from the jack to the cable plug connector using an Ohmmeter, to prove whether it is faulty or not.
Be sure to disconnect the main battery from the motherboard as soon as you can access the battery connector.
It is always advisable to disconnect the battery whenever you’re working inside a laptop. There is always power available at various points on the motherboard even if the laptop is switched off. You don’t want to accidentally slip when using any metal tools inside the laptop, as this may cause electrical problems. The Power button is not a power isolating button. You don’t have to remove the battery, simply disconnect it.
Remember to reconnect the battery as late as possible when closing the laptop for the last time