GE Washing machine problems

I have a GE front load washer model# WCVH6260FWW that the water wasn’t draining from the tub, so I removed the front panel and cleaned the drain trap but that didn’t fix the problem. When I try starting the washing machine the door will lock and unlock on its own and it seems like the wash tub isn’t spinning correctly..Any suggestions or ideas on what the problem may be?

If you are sure the drain hoses and pump are all cleaned out then it would seem the control unit is bad, but you will have to replace it in order to determine if that is the problem.

Thank you I’ll try that.