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] : Lock file is already being held #8621

Closed
mahaveer0496 opened this issue Sep 1, 2021 · 12 comments
Closed

[BUG] : Lock file is already being held #8621

mahaveer0496 opened this issue Sep 1, 2021 · 12 comments

Comments

@mahaveer0496
Copy link

mahaveer0496 commented Sep 1, 2021

Context:

  • Playwright Version: 1.12.3
  • Operating System: Mac OS Big Sur 11.5.2
  • Node.js version: 16.8.0
  • Browser: All
  • Extra: Apple silicon M1

Describe the bug
Can't install playwright with yarn or npm on M1, works fine on WSL2 and Linux. Here's a repo to reproduce https://github.com/mahaveer0496/playwright-test
Tried reinstalling everything and also this solution #4242 (comment), didn't work.

Screenshot 2021-09-01 at 7 50 11 PM

package.json

{
  "name": "playwright-test",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "@playwright/test": "^1.12.3",
    "playwright": "^1.12.3"
  },
  "scripts": {
    "test": "playwright test --workers=100"
  }
}

Thanks!

@yury-s yury-s added the triaging label Sep 1, 2021
@yury-s
Copy link
Member

yury-s commented Sep 1, 2021

Could you try this with the latest playwright (1.14.1) and see if the issue is still there?

@yury-s
Copy link
Member

yury-s commented Sep 1, 2021

This is the output I get on a fresh clone of you repo:

% cd playwright-test 
% yarn
yarn install v1.22.11
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
✨  Done in 0.56s.
% uname -m
arm64

@mahaveer0496
Copy link
Author

With the latest playwright version?

@yury-s
Copy link
Member

yury-s commented Sep 1, 2021

From the error it looks like you have another installation process that is running concurrently.

With the latest playwright version?

I tried with exact project you have. Shouldn't matter.

@mahaveer0496
Copy link
Author

mahaveer0496 commented Sep 1, 2021

So, I upgraded playwright packages to 1.14.1 and everything’s working now. Thanks for that :)
I'm not sure why the older version worked for you though, it's a fresh Mac, Node installation so it's highly unlikely that I had some other package/app/config that could be causing this issue.

From the error it looks like you have another installation process that is running concurrently.

Nope, I triple-checked, I was only installing in that project.
If there's anything I can do to help you guys with debugging or reproduce the issue please let me know.

@yury-s
Copy link
Member

yury-s commented Sep 1, 2021

I'm not sure why the older version worked for you though, it's a fresh Mac, Node installation so it's highly unlikely that I had some other package/app/config that could be causing this issue.

It might be that previous installation was aborted for some reason and left the dir lock file (which would expire after some time), which is highly unlikely though. Just speculating.

Closing the issues since your problem was solved.

@yury-s yury-s closed this as completed Sep 1, 2021
@olemaiwald
Copy link

Hi, I am still experiencing this issue on my M1 Mac, even with the playwright @ 1.15.2.

error Users/olemaiwald/example/node_modules/playwright: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /Users/olemaiwald/mhp/immersive-platform/node_modules/playwright
Output:
/Users/olemaiwald/mhp/immersive-platform/node_modules/proper-lockfile/lib/lockfile.js:68
                return callback(Object.assign(new Error('Lock file is already being held'), { code: 'ELOCKED', file }));
                                              ^

Error: Lock file is already being held
    at /Users/olemaiwald/mhp/immersive-platform/node_modules/proper-lockfile/lib/lockfile.js:68:47
    at callback (/Users/olemaiwald/mhp/immersive-platform/node_modules/graceful-fs/polyfills.js:299:20)
    at FSReqCallback.oncomplete (node:fs:199:5) {

when running yarn in my repository.

Any suggestions on what could cause this issue or how to further proceed?

@mahaveer0496
Copy link
Author

@olemaiwald I'm not sure what exactly causes it but when i install nodejs with volta it worked seamlessly

@olemaiwald
Copy link

When I reinstall node with volta (previously via homebrew) it works well for me too. Interesting, thank you!

@dancon
Copy link

dancon commented Nov 24, 2021

@mahaveer0496 not work for me. with playwright@1.16.3

@wlsf82
Copy link

wlsf82 commented Apr 19, 2022

I'm facing the same issue. I've already tried using node installed directly from https://nodejs.org/, using nvm, and volta, and I'm always getting the same error.

@samdenty
Copy link

samdenty commented Jul 7, 2022

rm -rf ~/Library/Caches/ms-playwright/__dirlock

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

No branches or pull requests

6 participants