contao / contao-manager

Contao Manager
GNU Lesser General Public License v3.0
86 stars 33 forks source link

Manager (sometimes) fails to read background-process.get.json #171

Closed bezin closed 6 years ago

bezin commented 6 years ago

As happend during the session at the Contao Camp, the Manager sometimes cannot access the background-process.get.json. However, this also happens if the file was NOT opened in a text editor and gets locked, as we assumed during the session. Unfortunately, I am not able to reproduce this (yet).

This happened as I was trying to uninstall a package via the Contao Manager.

ERROR 500 Warning: file_get_contents(C:\xampp\vhosts\contao4\contao-manager/background-process.get.json): failed to open stream: Resource temporarily unavailable 
#0 phar://C:/xampp/vhosts/contao4/web/contao-manager.phar.php/vendor/terminal42/background-process/src/ProcessController.php(249): Terminal42\BackgroundProcess\AbstractProcess::readConfig('C:\\xampp\\vhosts...')
#1 phar://C:/xampp/vhosts/contao4/web/contao-manager.phar.php/vendor/terminal42/background-process/src/ProcessController.php(152): Terminal42\BackgroundProcess\ProcessController->updateStatus()
#2 phar://C:/xampp/vhosts/contao4/web/contao-manager.phar.php/vendor/terminal42/background-process/src/ProcessController.php(147): Terminal42\BackgroundProcess\ProcessController->getStatus()
#3 phar://C:/xampp/vhosts/contao4/web/contao-manager.phar.php/api/Controller/TaskController.php(208): Terminal42\BackgroundProcess\ProcessController->isTerminated()
#4 phar://C:/xampp/vhosts/contao4/web/contao-manager.phar.php/api/Controller/TaskController.php(69): Contao\ManagerApi\Controller\TaskController->getJsonResponse(Object(Terminal42\BackgroundProcess\ProcessController))
#5 [internal function]: Contao\ManagerApi\Controller\TaskController->getTask()
#6 phar://C:/xampp/vhosts/contao4/web/contao-manager.phar.php/vendor/symfony/http-kernel/HttpKernel.php(153): call_user_func_array(Array, Array)
#7 phar://C:/xampp/vhosts/contao4/web/contao-manager.phar.php/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#8 phar://C:/xampp/vhosts/contao4/web/contao-manager.phar.php/vendor/symfony/http-kernel/Kernel.php(171): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#9 phar://C:/xampp/vhosts/contao4/web/contao-manager.phar.php/web/api.php(19): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#10 [internal function]: unknown()
#11 C:\xampp\vhosts\contao4\web\contao-manager.phar.php(100): Phar::webPhar('contao-manager....', 'index.html', '', Array, 'rewrites')
#12 {main}

Tested on Windows 10, XAMPP (PHP 7.1.11, Apache 2.4), /w admin privileges. Issue regarding Windows Support #66

aschempp commented 6 years ago

I've had this issue as well a while ago. Any idea how we can check the lock status of the file? The best would probably be to simply wait or just cancel the request?

Toflar commented 6 years ago

Today, we released version 1.0.0 stable. This version also ships with Composer Cloud that allows resolving of the dependencies on our servers. You can enable it in the hosting configuration. Try using it and see if that solves the issue and reopen if you still have the issue.


Wir haben heute Version 1.0.0 stable veröffentlicht. Diese Version bringt auch die Composer Cloud mit und ermöglicht die Abhängigkeitsauflösung auf unseren Servern. Sie kann bei den Hosting-Einstellungen aktiviert werden. Bitte damit erneut versuchen und Ticket wiedereröffnen, falls das Problem weiterhin besteht.