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

Close Browser #95

Merged
merged 10 commits into from
Jul 29, 2024
Merged

Close Browser #95

merged 10 commits into from
Jul 29, 2024

Conversation

BatMiles
Copy link
Member

@BatMiles BatMiles commented Jul 23, 2024

What does this PR do?

  • updates packages
  • Adds hacky method to force-close the browser. browser.close() was hanging indefinitely, leading to the lambda timing out. This 'solution' is in several Github Issue threads about the bug, such as this one

Pairs with Blacklight Lambda PR 73

Why are we doing this? How does it help us?

The recent updates to puppeteer and the collector types broke Blacklight on staging.

How/where should this be tested?

In staging, and locally, by running the collector and lambda and ensuring BL works

What are potential areas for future improvement? Are there any dependencies (especially on 3rd party code)?

Keep an eye on Puppeteer and Chromium releases, hopefully a future one will eliminate this bug

Have you done the following, if applicable:

(optional: add explanation between parentheses)

  • [x ] Tested manually locally ( )
  • [x ] Tested manually on staging ( )

@BatMiles BatMiles requested a review from dphiffer July 23, 2024 20:01
@@ -27,6 +27,22 @@ const deleteFolderRecursive = path => {
}
};

// This is an annoying hack to get around an issue in Puppeteer
// where the browser.close method hangs indefinitely
// See https://github.com/Sparticuz/chromium/issues/85#issuecomment-1527692751
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the link you meant to put here? It talks about fixing the browser.close issue, but not the way you're doing it here (apparently by disabling the Chrome GPU function instead).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes, it's at a different point in the thread. I'll update the link

@BatMiles BatMiles merged commit b8b9953 into main Jul 29, 2024
1 check passed
@BatMiles BatMiles deleted the logs branch July 29, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants