Hi,
I’m not sure when the error occurs. I just encountered the error myself, but I had taken some screenshots beforehand, and now it’s working again.
When the problem occurs, open the terminal and enter the following: devicectl list devices
One or more show in the 'State' column that they are connected.
Copy the UUID from the “Identifier” column.
You can get the UUID fromm the Device Hub too. On the right side in the Info section.

Then enter following: devicectl device capture screenshot --device <Identifier> --destination screen.png
Replace <Identifier> with your copied UUID and press enter.
The same error message may occur because the DUO has two screens, and you must select the specific screen for which you want to take a screenshot.
@reborn1991 copied the message that contains the two UUID for both screens.
Enter the following to take a screenshot of a iPhone DUO:
devicectl device capture screenshot --device <Identifier> --destination screen.png --display-unique-id <Display-Identifier>
Replace <Display-Identifier> with on of the screen UUID.
If you get a black screenshot, it means you need to change the view of your Duo in Device Hub. A screenshot can only be taken of the screen that is currently visible.
It’s quite possible that the screenshot button in Device Hub will start working again after that; that’s what happened in my case.
Christian