I used sqlite.
ErrorException: unlink(...\dusk.sqlite): Resource temporarily unavailable
the exception throwed from
public function refreshDatabaseFile()
{
unlink($this->connection->getDatabaseName());
touch($this->connection->getDatabaseName());
}
after I comment the unlink line, it works again.
seems touch() can overwrite the existing file
anyone has same issue?
Yes, Same issue when running Dusk Browser tests.
I temporarily fixed this by changing our DatabaseMigrations.php file to use migrate:refresh again instead og migrate:fresh. No permanent fix found yet, though.
by the way, the issue occurs on Windows10. macOS seems not have this problem
@xralphack Yes. My mac is not with me, but if I remember correctly, Windows only (I'm on 7), Mac is fine. I am running homestead on both Mac and Windows.
@AdamEsterle I run laravel on both platform by docker, so may be platform specific problem
Same issue on Win10
https://github.com/laravel/framework/pull/21720 may be related to this, can you check if that PR fixes this issue?
Works for me on Win10. Thanks
KristofMorva, Thank you very much! I have also solved this issue by using your solution. Nice!
@KristofMorva Worked for me!
Me to got this error in my local working environment.
I just close the my SQLite browser.
Then command executed as expected.
It seems, the issue was SQLite browser was locking the database file.
Closing this issue because it's already solved, old or not relevant anymore. Feel free to reply if you're still experiencing this issue.
Most helpful comment
https://github.com/laravel/framework/pull/21720 may be related to this, can you check if that PR fixes this issue?