Dusk: unlink sqlite file problem

Created on 10 Sep 2017  路  12Comments  路  Source: laravel/dusk

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?

Most helpful comment

https://github.com/laravel/framework/pull/21720 may be related to this, can you check if that PR fixes this issue?

All 12 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmitryuk picture dmitryuk  路  5Comments

godruoyi picture godruoyi  路  6Comments

fwang-laralabs picture fwang-laralabs  路  6Comments

dellow picture dellow  路  4Comments

antonioribeiro picture antonioribeiro  路  5Comments