The first question to ask in this situation is one that seems a little obvious. But is the power cable plugged into the printer properly? It actually has a collar which needs to be pulled back and usually a second person holding the printer stable  so you can wiggle the plug in fully before releasing the lock ring collar?

If the cable is pushed in but the lock ring is not engaged it causes this exact problem. Often the printer can work for a very long time even with the cable half plugged in.

Otherwise there is likely a short at the back of the print head bridging onto the metal fan bracket