maybe this is your problem. the ground wire is just folded over the plastic, and the socket is pressed in. you can see the corrosion on the socket and the copper wire. corrosion doesnt make for good connections
here is my solution, pull the socket out of the plastic housing and solder the ground wire to the socket. no problems now