It's possible that tho lens did work fine for the seller, when you put it on your body the contacts mated up on different spots than they did on the seller's body - which spots were dirty. It doesn't take much to stop the voltages used in camera electronics.

I use the eraser trick too, and have since the 70s. Nice that it was such a simple fix!