phone randomly thinks its being charged

For the past few days my phone very quickly flashes that its charging on and off like every second or so. This is a huge problem because the screen turns on when it thinks it has just been plugged in. (it ill turn off after a few seconds but then come on in another few seconds). Any way to resolve this or atleast away for the screen to stay off when it thinks its being plugged in?

Ok I had this problem all day... Here is how I fixed it. First blew out connection area then used a razor blade to bend up the connectors (be super easy very little pressure) then plugged in the charger to the phone and removed it several times. Also I toggled nfc(ended up leaving it off), and toggled stay awake while charging in the development area. So far all day no problems. Even charged it for about an hour and once I unplugged the lightning bolt went away.

P. S. Tried factory reset and multiple roms, seems to be the charging port that affects any rom your using.