-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
Context:
- Playwright Version: 1.4
- Operating System: Mac
- Node.js version: 12 / 13
- Browser: All
- Extra: Originally from Try Playwright
Code Snippet
const domain = require("domain")
const playwright = require("playwright");
(async () => {
const local = domain.create();
local.run(() => { })
const browser = await playwright.chromium.launch();
const context = await browser.newContext();
await context.newPage();
console.log("before-block")
await browser.close();
console.log("after-block")
})();With express Sentry plugin:
const express = require('express')
const Sentry = require('@sentry/node')
const playwright = require("playwright");
const app = express()
// after removing it will work again
app.use(Sentry.Handlers.requestHandler())
app.get("/", async (req, resp) => {
try {
const browser = await playwright.chromium.launch();
const context = await browser.newContext();
await context.newPage();
console.log("before-block")
await browser.close();
console.log("after-block")
} catch (error) {
console.log(error)
}
})
app.listen(3001, () => {
console.log("curl -v http://localhost:3001")
})Their "domain" implementation: https://github.com/getsentry/sentry-javascript/blob/7c142839036e77161a6f707196762eb718b723cc/packages/node/src/handlers.ts#L272-L281
On Heroku:
Describe the bug
Browser.close() blocks. The "after block" message won't get logged. This has probably something to do with this Slack message.
Maybe upstream? nodejs/node#34720
Relates getsentry/sentry-javascript#1843
But not sure why it did not happen in 1.3.
Snooz82, vrknetha, mxschmitt, NiGhTTraX and SteveByerly
Metadata
Metadata
Assignees
Labels
No labels
