swinton / screenshot-website

:camera_flash: A GitHub Action to capture screenshots of a website, across Windows, Mac, and Linux
https://git.io/screenshot-website
ISC License
187 stars 24 forks source link

Process never completes #14

Closed rootwork closed 3 years ago

rootwork commented 3 years ago

I'm not sure which of the new changes might have caused this, but as of the latest commit, when I try to run even the basic usage (one screenshot, one resolution, on ubuntu-latest) the action never completes. I don't get any error, it's just stuck on the screenshot step indefinitely -- I canceled it after 2 hours.

wizche commented 3 years ago

Same here, what I see is:

Run swinton/screenshot-website@v1.x
  with:
    source: http://www.centrometeolombardo.com/moduli/stazioni.php?lema
    destination: screenshot.png
    full-page: true
    delay: 0
Error: Protocol error (Emulation.setDeviceMetricsOverride): Invalid parameters Failed to deserialize params.width - BINDINGS: mandatory field missing at position 98
Error: The operation was canceled.
swinton commented 3 years ago

That's really odd.

I have an end-to-end test suite which runs successfully: https://github.com/swinton/screenshot-website/actions/runs/534207319

Can you take a look at the end-to-end tests and let me know if there are differences in how you are running this action compared to what the end-to-end tests are doing?

wizche commented 3 years ago

Looks like the issue is only when the width field is not passed, adding it makes the workflow complete correctly

swinton commented 3 years ago

I suspect this is the culprit: https://github.com/swinton/screenshot-website/commit/2567c41849d7bc33a9319cd30fa4b37f10d2796e

We may need a default for width:

https://github.com/swinton/screenshot-website/blob/2567c41849d7bc33a9319cd30fa4b37f10d2796e/action.yml#L19-L21

swinton commented 3 years ago

OK, should be fixed now and available in v1.x, I have test coverage for this here: https://github.com/swinton/screenshot-website/commit/3ed50013db6103103a23dfc0fcf04205bc66e0b6

Thanks for the bug report!

wizche commented 3 years ago

Thanks for the quick fix

rootwork commented 3 years ago

Thank you!

danielo515 commented 2 years ago

It is still happening for me, and I'm using v1.X, can it be caused by something else?