Skip to content

Encountering timeout errors in GitHub Actions I don't see locally #46

Closed

Description

@palewire

Here's a recent call that hung for 360 minutes before being killed by GitHub. I'm unclear of the cause.

Activity

  1. palewire commented on Mar 21, 2022

    @palewire
    ContributorAuthor

    I think this could be something besides a timeout. I added a shorter timeout method in #47 and then tried a site that's caused problems in interactive mode.

    pipenv run shot-scraper shot https://ktla.com --timeout=10000 --interactive
    

    The page loads. I hit enter in the terminal to approve the screenshot. It still hangs.

    Screenshot from 2022-03-21 11-20-11

    It's hanging right there, with the window open and a blank line after the enter in the term forever. My hunch is there must be some event in playwright that isn't firing. Not sure yet though. Any help would be appreciated.

  2. palewire commented on Mar 21, 2022

    @palewire
    ContributorAuthor

    Here's the console log from that site. It's a news site, so it's full of errors, of course.

    ktla.com-1647887063269.log

  3. palewire commented on Mar 21, 2022

    @palewire
    ContributorAuthor

    Here are the errors.
    Screenshot from 2022-03-21 11-26-15

  4. palewire commented on Mar 21, 2022

    @palewire
    ContributorAuthor

    After adding some click.echo logs to the cli file and repeated testing, I'm fairly confident that the problem isn't with the page load but is instead somewhere inside the page.screenshot() method.

  5. palewire commented on Mar 21, 2022

    @palewire
    ContributorAuthor

    This may be related microsoft/playwright#9757

  6. simonw commented on Mar 21, 2022

    @simonw
    Owner

    I agree, having a default timeout feels like the right thing to do here. Can give people an option to turn that timeout off if they really don't want it for some reason.

  7. palewire commented on Mar 21, 2022

    @palewire
    ContributorAuthor

    Fun fact: I just downgraded to playwright version 1.14.1 as recommended in microsoft/playwright#9757 and the site above worked immediately, after failing 10 times before.

  8. simonw commented on Mar 21, 2022

    @simonw
    Owner

    To clarify, this bug occurs even with your new timeout mechanism from this PR?

  9. palewire commented on Mar 21, 2022

    @palewire
    ContributorAuthor

    Yes. It appears to be an issue deeper inside the screenshot method, after the page has finished loading.

  10. simonw commented on Mar 21, 2022

    @simonw
    Owner

    Since this looks to be a Playwright bug I'm inclined not to work around it at a code level, but instead to describe a workaround in the documentation.

    Have you tried setting a time limit on the GitHub Actions step that takes the screenshot? Something like this should be pretty reliable I would hope:

    timeout-minutes: 5
    

    It looks like you started doing that four hours ago: palewire/news-homepages@8be4300

  11. palewire commented on Mar 21, 2022

    @palewire
    ContributorAuthor
  12. palewire commented on Mar 22, 2022

    @palewire
    ContributorAuthor

    With the pinned version fixing the issue on my end, I am going to withdraw this issue. Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions