lockfile - Waiting for another flutter command to release the startup lock

ID : 10087

viewed : 45

Tags : flutterlockfileflutter

Top 5 Answer for lockfile - Waiting for another flutter command to release the startup lock

vote vote

90

In my case, following command in Terminal helped (as suggested by G√ľnter):

killall -9 dart 

On Windows (as suggested by upupming):

taskkill /F /IM dart.exe 
vote vote

89

Remove this file:

<YOUR FLUTTER FOLDER>/bin/cache/lockfile 

This releases the occupied lock and makes you able to run other commands.

vote vote

71

1. Stop all running dart instances

If you're using Android Studio save your work and close it. And open your terminal to kill running dart instances.

Those commands will kill all dart instances including the ones created by editors for code analysis and debug instances. So be careful before executing

Linux:

killall -9 dart 

Windows:

taskkill /F /IM dart.exe 

2. Remove lockfile

You can find lockfile inside flutter installation directory.

<flutter folder>/bin/cache/lockfile 
vote vote

63

In Windows :

Press: Ctrl + Alt + Delete

  • In task manager find out your editor such as VS Studio or Android Studio
  • In that Find "dart" and End that Task
  • Then close your editor
  • Open editor again
  • let editor to complete all things, after that run your query that will work
vote vote

53

I use a Mac with Visual Studio Code and this is what worked:

Shutdown your PC and switch it on again. Don't use the restart function. I restarted 2 times and it didn't work. Only shutdown worked.

PS: I tried out the following:

  1. Delete lockfile;
  2. Run killall -9 dart;
  3. Restart my PC.

But they all didn't work.

Top 3 video Explaining lockfile - Waiting for another flutter command to release the startup lock

Related QUESTION?