question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
meotimdihiacommented, Mar 5, 2021

@aslushnikov: the bug is remaining for playwright 1.9.1

1reaction
MkrVcommented, Mar 6, 2021

I have the same issue, even at headful mode. playwright-python 1.9.1, Windows 10.

because of it Chromium(chrome.exe) doesn’t close correctly, and very soon start consuming 100% CPU. As a temporary solution I close all Chromiums via CMD in Admin mode: wmic process where ExecutablePath=‘C:\Users\User\AppData\Local\ms-playwright\chromium-854489\chrome-win\chrome.exe’ delete

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: EPERM: operation not permitted, unlink puppeteer ...
Hello! I am testing out the puppeteer api, and the script I'm writing seems to crash partway through execution. Here is the error: ......
Read more >
node.js - Error: EPERM: operation not permitted while running ...
For me worked doing this. While this is annoying behaviour, there is a workaround: close all pages before closing the browser.
Read more >
yarn eperm: operation not permitted, unlink, Operation not permitted ...
Actual behavior All commands are run as root/Administrator. Operation not permitted, unlink angular. This seems like a problem with your node/npm and not...
Read more >
Self Explore App part 2. Automating Facebook data retrival.
Error [Error: EPERM: operation not permitted, unlink ... \\Local\\Temp\\playwright_chromiumdev_profile-3XZLP0\\CrashpadMetrics-active.pma'.
Read more >
Npm failed with return code: 4294963248, Error: EPERM
We have the `npm install` task that suddenly fails with Error: EPERM: operation not permitted, unlink 'C:\....\tsserver.js'. This was not happening before ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found