X and Y homing issues
Without the images of how you connected the endstops, the best guess for your problem is that the endstops cause a short circuit, once pressed, the microprocessor trips and shuts down. If you provide more information, other people may even add better answers based on your added information.

E.g. how is everything connected at both sides of the cable (board and endstop), does the message occur when you press an endstop, maybe it is even wise to add a link to your configuration files.