It sounds like a dry joint, but where? It can also mean that the port needs cleaning properly (no hair, no dust, etc... a can of clean compressed air [not air compressor!] works wonders). Start by swapping out the coded cable, then the charger with a known good one of the exact same model to see if that's the issue. If it's still playing up, re-work the socket (using separate liquid flux). If it's still an issue, you will have to trace back the circuit from the charge port and re-work anything looking suspect until it's fixed.