Battery Drains While Charging!!

A

AC Question

I have the T-Mobile version of Galaxy S4, purchased July 2013, stock ROM, latest update.

Recently, while connected to the charger, the charging icon showing on the screen, the battery percentage number goes down, until it finally runs out of power. Not only does it not charge while charging, but the power depletes.

I have tried it with different chargers and cords, same problem, so the issue clearly is in the S4 itself.

Fortunately I have an external battery charger and extra batteries, and that is the only way I can keep my phone running now. (The problem occurs with different batteries too, so the issue is clearly in the phone.)

What can be causing this problem? Any way I can fix it? (Of course it is out of warranty, so send to warranty repair is not an option.)

Thanks in advance for your help.