Greetings,
Welcome to the forum.
I am not a HP employee.
Try tapping "ESC" at system startup to see if you can get to the UEFI Startup Menu.
Then tap "F2".
Run some hardware tests.
You could pull the CR2032 motherboard (MB) battery. Let the PC sit for a while. Install a new MB battery. This action will reset CMOS.
Try to get to HP Diagnostics again.
The system may have to be serviced if you cannot run diagnostics. AIO PC's have most components integrated on the motherboard. You may have possible component failure or the power supply is failing.
Regards