Skip to content

Shutdown of playwright_server failing during global destruction #64

Description

@kcaran

When I run tests on my macbook (perl 5.36), I get the following error at the end of the program:

(in cleanup) Can't call method "request" on an undefined value at /usr/local/lib/perl5/site_perl/5.36.1/Playwright/Util.pm line 39 during global destruction.

I've confirmed that the LWP::UserAgent object used by the Playwright handle is being destroyed before the Playwright object itself.

Creating a new LWP::UserAgent object inside of Playwright::quit() before (or inside) the call to Playwright::Util::request() fixes the issue, but I'm not sure that is the cleanest way to solve it. But it doesn't look like there is an easy way to guarantee object destruction order.

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions