I just replaced a craftsman and it did the same thing when the eye beams were not lined up right.

Check and make sure you have the wires hooked up correctly on the back of the unit,

If it closes a little and then reverses and clickes or flashes the big bulb or the little LED light on the back of the motor then its the eye beam circuit.