This a hardware fault of the printer and this is caused due to defective or loose printhead. The problem is very common with the Canon printers and you don't have to do anything for this, because any spare can stop working without any intervention due to some technical fault. Now, the final solution for this problem is replacing the printhead, but before that you can remove the printhead from the printer and then, clean the gold contacts on it with a cotton swab and IP alcohol. After that check the result and if the problem persist then, unfortuantely the printhead is defective and you have to replace the printhead to solve the problem. You can follow the steps below to remove the printhead from the printer.
Remove the ink tanks before proceeding to removing the print head.
Remove the Ink Tanks