Hi there! My name is***** am a computer professional with over 15 years of experience with both Mac and Windows computers, phones, tablets, and printers. It would be my pleasure to assist you with this.
The error might occur if the printer firmware is outdated. Download the firmware update from the HP website, and then install it on your printer.
Turn on the printer.
If your printer is connected to the computer with a USB cable, disconnect the cable from the printer.
Go to HP Customer Support - Software and Driver Downloads.
If prompted, select a method to identify your printer model, and then follow the on-screen instructions to go to the download page.
Click Firmware, and then click Download.
Use the HP Download and Install Assistant for a guided firmware download and installation, or select Download only to manually open or run the driver file through your Internet browser’s download tools.
Please try this and let me know the results.