Skip to content
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

ExportAsCsv with Excel type selector not working on Vapor #6018

Closed
Mihkel100 opened this issue Nov 3, 2023 · 10 comments
Closed

ExportAsCsv with Excel type selector not working on Vapor #6018

Mihkel100 opened this issue Nov 3, 2023 · 10 comments
Labels
needs more info More information is required

Comments

@Mihkel100
Copy link

  • Laravel Version: 10.30.1
  • Nova Version: 4.29.2
  • PHP Version: 8.2

On Vapor, ExportAsCsv only works with CSV.
Locally, it works with both CSV and Excel.

public function actions(NovaRequest $request)
{
    return [
        (new ExportAsCsv())->withTypeSelector(),
    ];
}
@crynobone
Copy link
Member

What doesn't work when you try it with Excel? Can you share any screenshots, return response data (using Browser Network history) etc?

@crynobone crynobone added the needs more info More information is required label Nov 6, 2023
@Mihkel100
Copy link
Author

What doesn't work when you try it with Excel? Can you share any screenshots, return response data (using Browser Network history) etc?

It works locally but not on Vapor. CSV export works on Vapor too.

Excel export seems to get 502 error when posting to
https://<url>action?action=export-as-csv&pivotAction=false&search=&filters=W3siQXBwXFxOb3ZhXFxGaWx0ZXJzXFxCdXNpbmVzc1JlZ2lvblN0YWZmRmlsdGVyIjoiIn0seyJBcHBcXE5vdmFcXEZpbHRlcnNcXFNoaWZ0RmlsdGVyIjoiIn0seyJBcHBcXE5vdmFcXEZpbHRlcnNcXFN0YWZmUm9sZUZpbHRlciI6IldPUktFUiJ9XQ%3D%3D&trashed

@crynobone
Copy link
Member

SmartSelect_20231106_162333_Chrome.png

are you sure it's not hitting any Laravel Vapor limitations such as above?

@Mihkel100
Copy link
Author

I don't think this is the case.
It even happens when I try to export one row. When I export locally, the Excel file size is 8KB.

@crynobone
Copy link
Member

It could be code related if the error code was 500, generic exception HTTP response from Laravel. But since it's 502 that indicate that's it either Laravel Vapor or the web server gateway returning the error.

@Mihkel100
Copy link
Author

HTTP/1.1 502 
content-type: application/json
content-length: 36
...
x-amzn-errortype: InternalServerErrorException
x-cache: Error from cloudfront

@Mihkel100
Copy link
Author

@crynobone Is there anything else I can do regarding this issue?

@Mihkel100
Copy link
Author

@crynobone please let me know the next steps.

@davidhemphill
Copy link
Contributor

Unfortunately, we can't debug issues in your production environment using Nova. Since the error seems to be something caused by your Cloudfront configuration, it's not possible for us to really help there. Thanks!

@Mihkel100
Copy link
Author

Nothing custom. Haven't touched Cloudfront confuguration. Using gateway-version: 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info More information is required
Projects
None yet
Development

No branches or pull requests

3 participants