-1

Magento 2 version : 2.2.6

I am not able to export orders,customers, or any CSV from the backend. And getting an error message "Error occurred during execution of fileLock"

Please find detailed error message below :

> {"0":"Error occurred during execution of fileLock ","1":"#0
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/Filesystem\/File\/Write.php(105):
> Magento\\Framework\\Filesystem\\Driver\\File->fileLock(Resource id
> #305, 2)\n#1 \/data\/docroot\/magento2-test\/vendor\/magento\/module-ui\/Model\/Export\/ConvertToCsv.php(79):
> Magento\\Framework\\Filesystem\\File\\Write->lock()\n#2
> \/data\/docroot\/magento2-test\/vendor\/magento\/module-ui\/Controller\/Adminhtml\/Export\/GridToCsv.php(72):
> Magento\\Ui\\Model\\Export\\ConvertToCsv->getCsvFile()\n#3
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/App\/Action\/Action.php(107):
> Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv->execute()\n#4
> \/data\/docroot\/magento2-test\/vendor\/magento\/module-backend\/App\/AbstractAction.php(235):
> Magento\\Framework\\App\\Action\\Action->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#5
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/Interception\/Interceptor.php(58):
> Magento\\Backend\\App\\AbstractAction->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#6
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor->___callParent('dispatch',
> Array)\n#7
> \/data\/docroot\/magento2-test\/vendor\/magento\/module-backend\/App\/Action\/Plugin\/Authentication.php(143):
> Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#8
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/Interception\/Interceptor.php(135): Magento\\Backend\\App\\Action\\Plugin\\Authentication->aroundDispatch(Object(Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor),
> Object(Closure), Object(Magento\\Framework\\App\\Request\\Http))\n#9
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#10
> \/data\/docroot\/magento2-test\/generated\/code\/Magento\/Ui\/Controller\/Adminhtml\/Export\/GridToCsv\/Interceptor.php(26):
> Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor->___callPlugins('dispatch',
> Array, NULL)\n#11
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/App\/FrontController.php(55):
> Magento\\Ui\\Controller\\Adminhtml\\Export\\GridToCsv\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#12
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/Interception\/Interceptor.php(58):
> Magento\\Framework\\App\\FrontController->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#13
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Framework\\App\\FrontController\\Interceptor->___callParent('dispatch',
> Array)\n#14
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#15
> \/data\/docroot\/magento2-test\/generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php(26):
> Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins('dispatch',
> Array, Array)\n#16
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/App\/Http.php(135):
> Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#17
> \/data\/docroot\/magento2-test\/vendor\/magento\/framework\/App\/Bootstrap.php(257):
> Magento\\Framework\\App\\Http->launch()\n#18
> \/data\/docroot\/magento2-test\/index.php(41):
> Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))\n#19
> {main}","url":"\/admin_1lulbe\/mui\/export\/gridToCsv\/key\/92354049299734ce6b7c07ca3c9b70e9486a1989e10a44730168a5fa167d75d0\/?filters%5Bplaceholder%5D=true&filters%5Bcreated_at%5D%5Bfrom%5D=03%2F14%2F2021&filters%5Bcreated_at%5D%5Bto%5D=03%2F14%2F2021&search=&namespace=sales_order_grid&excluded=false","script_name":"\/index.php"}
4
  • File write permission is required. – Abdul Samad Abbasi Mar 22 at 8:04
  • I gave 777 permission var/export/* folder – Krupali Mar 22 at 8:07
  • Did you try giving 777 to core folder as well? – Abdul Samad Abbasi Mar 22 at 8:09
  • it's not a good idea to give permission to the Vendor folder. Is there any specific path or file needs permission for this? – Krupali Mar 22 at 8:16
0

It is server related issue. So make some changes on server and issue is resolved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.