Gert-dev / php-ide-serenata

Atom IDE package that integrates the Serenata server to provide PHP code assistance
https://serenata.gitlab.io/
Other
274 stars 19 forks source link

Updating fails with EBUSY error #413

Closed jatubio closed 6 years ago

jatubio commented 6 years ago

Hello,

Updating to “php-integrator-base@4.0.3" failed with EBUSY error about sqlite database busy or unlocked:

Error: EBUSY: resource busy or locked, unlink '...\php-integrator-base\indexes\xxxx_web.sqlite'
at Error (native)
at Object.fs.unlinkSync (fs.js:1089:18)

Previous versiones failed also with the same error.

I need to uninstall, exit from atom, launch atom and install again php-integrator to sucess. Windows 2008 Server

Maybe it's related with this: https://github.com/Gert-dev/php-ide-serenata/issues/270

Gert-dev commented 6 years ago

This is not something I'm doing, but I'm guessing Atom is trying to remove the previous package to replace it with the new one. Normally the server should have been closed at deactivation and the database should not have been in use, but either something is wrong there or Windows doesn't recognize that it's no longer in use quickly enough, hence the error.

I've released 4.1.0, which stores the core and the indexes somewhere else entirely, hopefully fixing this problem for good.

jatubio commented 6 years ago

4.1.1 version don't fix the problem :(

Gert-dev commented 6 years ago

@jatubio Has the path changed in the error message? It is possible that this occurred one more time with the upgrade to the latest version as the old version was being removed - though it should not have happened if you were already on 4.1.0 (if you were not yet on 4.1.0, it would still have been possible).

jatubio commented 6 years ago

This is the debug on updating from 4.0.3 to 4.1.2

Updating package php-ide-serenata to v4.1.2 failed:
 Error: Updating to “php-ide-serenata@4.1.2” failed.
    at ..\atom\app-1.27.0-beta1\resources\app\node_modules\settings-view\lib\package-manager.js:441:27
    at exit (..\atom\app-1.27.0-beta1\resources\app\node_modules\settings-view\lib\package-manager.js:128:22)
    at triggerExitCallback (..\atom\app-1.27.0-beta1\resources\app\src\buffered-process.js:267:15)
    at ChildProcess.process.on (..\atom\app-1.27.0-beta1\resources\app\src\buffered-process.js:297:15)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) EBUSY: resource busy or locked, unlink '..\.atom\packages\php-ide-serenata\indexes\saluddigital_web.sqlite'

(anonymous) @ <embedded>:200835
internal/process/next_tick.js:109 Uncaught (in promise) Error: Updating to “php-ide-serenata@4.1.2” failed.
    at ..\atom\app-1.27.0-beta1\resources\app\node_modules\settings-view\lib\package-manager.js:441:27
    at exit (..\atom\app-1.27.0-beta1\resources\app\node_modules\settings-view\lib\package-manager.js:128:22)
    at triggerExitCallback (..\atom\app-1.27.0-beta1\resources\app\src\buffered-process.js:267:15)
    at ChildProcess.process.on (..\atom\app-1.27.0-beta1\resources\app\src\buffered-process.js:297:15)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

This was with project opened. And when I try to remove indexes folder on windows explorer, I can't because php is locking them.

Gert-dev commented 6 years ago

I see. I'll go ahead and close this again, since it is natural for it to occur one more time until you are on at least 4.1.0, due to the core and indexes having only moved starting with that version.

If everything is working after the update to 4.1.0 or higher and this then occurs again on a later update to a higher version, it is still not fixed.

jatubio commented 6 years ago

Sorry I had misunderstood: I thought that 'upgrade to version 4.1.0' should no longer give an error and now I understand that it is 'update from version 4.1.0'.

Thank you