lando / core

Current Lando v3 runtime
https://docs.lando.dev/
GNU General Public License v3.0
11 stars 22 forks source link

"Error: EPERM: operation not permitted" after Lando re-install #112

Closed dave-cross closed 8 months ago

dave-cross commented 5 years ago

Tell us about your setup

Example: v3.0.0-rc.16 on MacOS 10.14.5

Example:

name: test
recipe: lamp

This was a reduced test case for debugging why lndo.site urls were failing. The only other file in this project is index.php with this content:

<h1>Hello World</h1>

Tell us about the command you were running

Unhandled rejection Error: EPERM: operation not permitted, unlink '/Users/dave/.lando/scripts/lando-entrypoint.sh'
    at Object.fs.unlinkSync (fs.js:1049:3)
    at Object.exports.moveConfig (/snapshot/lando/build/cli/lib/utils.js:0:0)
    at lando.Promise.map.plugin (/snapshot/lando/build/cli/lib/lando.js:0:0)
    at runCallback (timers.js:696:18)
    at tryOnImmediate (timers.js:667:5)
    at processImmediate (timers.js:649:5)
From previous event:
    at bootstrapEngine (/snapshot/lando/build/cli/lib/lando.js:0:0)
    at bootstrapRouter (/snapshot/lando/build/cli/lib/lando.js:0:0)
    at module.exports.bootstrap.Promise.each.level.events.emit.then (/snapshot/lando/build/cli/lib/lando.js:0:0)
From previous event:
    at module.exports.bootstrap.Promise.each.level (/snapshot/lando/build/cli/lib/lando.js:0:0)
From previous event:
    at Lando.bootstrap (/snapshot/lando/build/cli/lib/lando.js:0:0)
    at Object.<anonymous> (/snapshot/lando/build/cli/bin/lando.js:0:0)
    at Module._compile (pkg/prelude/bootstrap.js:1254:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:10)
    at Module.load (internal/modules/cjs/loader.js:610:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:549:12)
    at Function.Module._load (internal/modules/cjs/loader.js:541:3)
    at Function.Module.runMain (pkg/prelude/bootstrap.js:1309:12)
    at startup (internal/bootstrap/node.js:274:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:608:3)

Tell us generally about your bug

Since yesterday afternoon, lndo.site urls have failed. I finally stumbled on https://github.com/lando/lando/issues/1490.

Deleted my /.lando directory and tried reinstalling 3.0.0rc16. Now, I get the above error on every project.

dave-cross commented 5 years ago

I can't even run the uninstaller because lando poweroff gives the same error. I went through the file and ran all the commands manually. Then, tried reinstalling from scratch and get the same error.

Please help.

dave-cross commented 5 years ago

Update:

lando-entrypoint.sh was a directory inside of ~/.lando/scripts. Not sure why that was happening, but I replaced it with the actual file from another computer and now I'm up and working again. I am running Node12.2.0, so that could be the issue here.

Can't test it right now, but I don't consider this issue closed. Something is buggering a fresh install. Please have a look when you have a moment.

pirog commented 5 years ago

@cloudsociety unless you are running lando from source the node version is not going to matter eg the Lando binary self-packages LTS node 10.x.

I've seen this behavior periodically happen but its usually when a user kills a process mid-execution and specifically when volumes are being reconciled. Without clear steps to replicate im not exactly what lando can do about it but i'll keep the issue open for now.

Also FWIW this is not something that is consistently happening on fresh installs or im guessing we'd see more issues or comments here indicating that.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

michalkuchtapl commented 1 year ago

For the ones that are having that issue:

I had the same issue lately. To fix that I opened Docker Desktop (on windows) and I turned off all containers/apps. After that it started working correctly

adevade commented 9 months ago

This happened to me today on a fresh install of latest alpha (3.21.alpha.10). Running on Windows 11 with WSL2 and Ubuntu 22.04.

The fix above by @michalkuchtapl worked, stopping manually in the Docker Desktop app 👍

zdenekgebauer commented 8 months ago

Problem persisted in v3.21.0-beta.1, Win10 . I can start new lamp setup, but then lando stop/poweroff/update write above error . Restart Docker Desktop (4.23) did not help.

bcarvalheiro commented 8 months ago

I'm having the same errors. I'm trying to lando composer key:generate after lando fresh install and getting a image from git repo.

411x commented 8 months ago

Same error here with a lando destroy lando ERROR Error: Error: EPERM: operation not permitted, lstat 'C:\Users\dev\.lando\scripts\lando-entrypoint.sh'

Windows 11 Pro 23H2 with lando-x64-v3.21.0-beta.1

pVVEN commented 8 months ago

I'm having this same issue, Windows 10 Enterprise 22H2 (19045.4046). Downloaded lando-x64-v3.21.0-beta.1, install went smoothly. I've tried viewing the lando-entrypoint.sh file, but Notepad doesn't believe the file exists. I tried going into WSL and chmodding the file but when I do ls on the directory, it says it cannot access, "no such file". Windows similarly refuses to show me or grant me permissions on it, despite being administrator. I copied the file over from another computer where Lando is working, but at some point during lando start the file got overwritten and is back to the same issue.

pirog commented 8 months ago

for people having this issue i would recommend:

  1. Turning off Docker Desktop/Engine
  2. Removing ~/.lando/config and ~/.lando/scripts
  3. Installing the latest beta via the package installer over here: https://github.com/lando/lando/releases. i would not use lando update but once you install from the package installer you should be safe to use lando update with the exception of CLI updates on Windows, a fix is coming for this
  4. Proceeding with stuff as usual