Yeah, that's normal. The setup process is finicky about range.
Your computer or phone might be out of range of the printer's Wi-Fi signal during the sensitive discovery phase. The fix is simple: just move the device you're using for setup (and the HP Smart app) much closer to the printer. Once it's fully set up and on your network, you can probably use it from the other room, but for the initial handshake, get close.
If you're close and it still fails: The printer's setup mode probably timed out. Swipe down on its screen, go to Network Setup > Restore Network Settings, and try again. Also, if your phone is involved, double-check that both Bluetooth and Location Services are turned on.