Our GE top-load washer would sometimes quit before the spin cycle. It would make 2 or 3 loud clicks and quit. Other times it worked fine. Problem was with the lid lock. On the lid there is a loop that fits into a slot in the washer top when the lid is closed. That loop is magnetic. Somehow, a small safety pin got magnetically attached to the back side of the loop. Washer works fine with the safety pin removed.
Question edited for clarity, capitalization and typo.
Question moved from MISC to make category.
Sound like a control board issue or connection issue. Call for service for correct diagnosis. If it is old, consider replacement.