-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Background Error SplFileInfo::getSize(): stat failed for xxx #3888
Comments
Looks like your api response is outputting to the buffer. As you are using download, everything is prepended to that output-buffer. https://www.php.net/manual/en/function.ob-clean.php |
Hey @patrickbrouwers, I think your statement about API response is correct because mainly my project is API, so every response must return the object. However, after implementing Laravel-Excel, I custom the response to make it able to download files with this custom middleware
As you can see, I add this line so the response be able to download file
fyi, I tried adding
Is that the correct implementation? or did I miss something? |
However, I tried your solution in #2281 (comment) by adding function But I am still curious, as to why there is no excel file in my temp folder at |
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
What version of Laravel Excel are you using?
3.1.45
What version of Laravel are you using?
Lumen 6.3.3
What version of PHP are you using?
7.4.28
Describe your issue
Hi there,
This issue has already been submitted multiple times, but it seems it was abandoned in the closed thread, and pardon me for creating a new ticket. I've been using this package for 5 years, I hope I can help with the issue.
I got this issue on the lumen framework, actually, it's not breaking the download process, rather it only throws an output error on the storage/logs folder.
I got several results from this error, and I'm not sure it's all related:
My Guessing:
When the download process begins, I try to check on
var/app/storage/framework/cache/laravel-excel/
but no file is generated, I try to delete thelaravel-excel
folder, and It automatically created a new folder but it still empty. I think the error happened because theSplFileInfo::getSize():
read an undefined file.Here is the permission for folder laravel-excel, I think you'd like the screenshot
Here is the full log:
How can the issue be reproduced?
I never reproduce this in another environment, but I think my code was simply enough
TicketExport.php
My Controller:
What should be the expected behaviour?
I expect no error thrown after downloading the file
The text was updated successfully, but these errors were encountered: