Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug on Browser Engine: browser.newContext: Target page, context or browser has been closed. #4373

Closed
2 tasks done
calebcall opened this issue Jan 15, 2024 · 5 comments
Closed
2 tasks done
Labels
area:monitor Everything related to monitors bug Something isn't working type:enhance-existing feature wants to enhance existing monitor

Comments

@calebcall
Copy link

calebcall commented Jan 15, 2024

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

I get this error with the browser engine checks:

browser.newContext: Target page, context or browser has been closed. 

The Checks using the Browser Engine work great for an initial period of time and then all of the checks using the browser engine start to fail at the same time and never recover.

👟 Reproduction steps

Configure Browser Engine monitor

👀 Expected behavior

To continue to work

😓 Actual Behavior

return the error :

browser.newContext: Target page, context or browser has been closed

🐻 Uptime-Kuma Version

1.23.11

💻 Operating System and Arch

Debian 12.4

🌐 Browser

Brave v1.61.116

🐋 Docker Version

K8s 1.27.7

🟩 NodeJS Version

No response

📝 Relevant log output

No response

@calebcall calebcall added the bug Something isn't working label Jan 15, 2024
@CommanderStorm
Copy link
Collaborator

  • What exactly is returning this log message? the browser console or the node/docker log?
  • To be able to reproduce this: what website are you monitoring? Is this reproducible?

@calebcall
Copy link
Author

I'm seeing this error in Kuma. The services are internal services (Jellyseerr, Radarr, Sonarr, Sabnzbd, and Scrypted)

Screenshot 2024-01-15 at 6 41 20 PM

This shot shows they all went down in the same check period.
Screenshot 2024-01-15 at 6 45 40 PM

Prior to that, they had all been up for about 6.5 hours when they all failed in the same way.

@CommanderStorm
Copy link
Collaborator

Thanks ^^
We might have a race condition in the playwright code as in https://stackoverflow.com/questions/61933492/playwright-error-target-closed-after-navigation

Given that this does not seem very widespread/reprducible I am not going to prioritse reproducing/debugging this (I am currently quite under the water Uni-wise).
If somebody else wants to give this a shot, here is our contribution guide: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md

@CommanderStorm CommanderStorm added the area:monitor Everything related to monitors label Jan 17, 2024
@chakflying
Copy link
Collaborator

Added a simple fix in #4417 but I'm not sure if this is the root cause, you can help by testing it if you're interested.

https://github.com/louislam/uptime-kuma/wiki/Test-Pull-Requests

@CommanderStorm CommanderStorm added the type:enhance-existing feature wants to enhance existing monitor label Jan 24, 2024
@CommanderStorm CommanderStorm changed the title Bug on Browser Engine Bug on Browser Engine: browser.newContext: Target page, context or browser has been closed. Apr 15, 2024
@CommanderStorm
Copy link
Collaborator

@calebcall
I think this issue was fixed by #4417
Given that we cannot reproduce the issue, testing said PR would be greatly appreaciated ^^

I am going to assume that said PR works and does not contain bugs => closing as resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:monitor Everything related to monitors bug Something isn't working type:enhance-existing feature wants to enhance existing monitor
Projects
None yet
Development

No branches or pull requests

3 participants