← Back to Discord Forum

Seemingly random Target page, context or browser has been close

I've been having an issue over the last few days where I get random failure and "Target page, context or browser has been close"

It seems to be a timing thing. I've removed all close methods. I'm using chrome in a lambda function (using @sparticuz/chromium).

Oddly this is only happening in development and not production - the code is the same.

I've run DEBUG=pw:api and that just shows something failing (moves if I add /remove code) and give then "Target page, context or browser has been closed"

Any ideas of pointers would be much appreciated.

This thread is trying to answer question "Why am I getting a 'Target page, context or browser has been closed' error randomly in the development environment?"

1 reply

I've just got some more infro using pw:browser*

pw:browser [pid=26][err] [1123/221217.543854:ERROR:socket_posix.cc(93)] CreatePlatformSocket() failed: Address family not supported by protocol (97)

pw:browser [pid=26][err] [1123/221217.662861:ERROR:nss_util.cc(239)] Error initializing NSS with a persistent database (sql:/tmp/.pki/nssdb): NSS error code: -8023

[pid=26][err] [1123/221217.662945:ERROR:nss_util.cc(124)] Error initializing NSS without a persistent database: NSS error code: -8023

Related Discord Threads

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.