Skip to content

[BUG] Error: EPERM: operation not permitted, unlink "..../CrashpadMetrics-active.pma" #4780

@meotimdihia

Description

@meotimdihia

Context:

  • Playwright Version: ^v1.6.2
    System:
    OS: Windows 10 10.0.19041
    Memory: 5.71 GB / 15.92 GB
    Binaries:
    Node: 12.14.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - ~.yarn\bin\yarn.CMD
    npm: 6.14.10 - C:\Program Files\nodejs\npm.CMD
    Languages:
    Bash: 4.4.23 - C:\Program Files\git\usr\bin\bash.EXE

Code Snippet

let browser
;(async () => {
  try {
    const { chromium } = require("playwright")
    browser = await chromium.launch()
    const context = await browser.newContext()
    const page = await context.newPage()
    await page.goto("https://exampsas12le.com")
  } catch (e) {
//    await new Promise(resolve => setTimeout(resolve, 1000))  // The bug won't happen if I uncomment this line
    await browser.close()
  }
})()

Describe the bug
The code works fine in headless: false mode but the bug appear in headless mode.

$ node dist/src/examples/test
[Error: EPERM: operation not permitted, unlink 'C:\Users\meoti\AppData\Local\Temp\playwright_chromiumdev_profile-CVW7lo\CrashpadMetrics-active.pma'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'unlink',
  path: 'C:\\Users\\meoti\\AppData\\Local\\Temp\\playwright_chromiumdev_profile-CVW7lo\\CrashpadMetrics-active.pma'
}

WindowsTerminal_2020-12-20_14-55-19

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions