Remotely grab screenshot of ubuntu-frame display?

I encountered the same problem with ubuntu-frame.screenshot

snap connect ubuntu-frame:wayplug helped me