Scanner not connecting. Error message "Failed to open a connection to the device (-21345)"
All of a sudden HP scanning app as well as mac Image Scanner is no longer working. Getting error message Failed to open a connection to the device (-21345). I saw an old 2020 post that said to disable IPv6 network connections on the printer, but that didn't work for me. I also reset my HP OfficeJet 4650 to factory settings and rebooted my mac. None of that worked.
What ended up working was on mac going to:
Systems Settings -> Privacy and Security -> Local Network -> HP Scanner (Toggle on)
Hope this helps anyone having this problem still in 2024