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

Xlsx Writer problem with Vapor #3079

Closed
1 of 8 tasks
brunomcpena opened this issue Sep 22, 2022 · 1 comment
Closed
1 of 8 tasks

Xlsx Writer problem with Vapor #3079

brunomcpena opened this issue Sep 22, 2022 · 1 comment

Comments

@brunomcpena
Copy link

This is:

- [X] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

Download the spreadsheet.

What is the current behavior?

Vapor returns "Internal server error".
It works locally.

AWS Log:
Fatal error: Uncaught Exception: Error encoding runtime JSON response: Malformed UTF-8 characters, possibly incorrectly encoded in /var/task/vendor/laravel/vapor-core/src/Runtime/NotifiesLambda.php:49

Stack trace:
#0 /var/task/vendor/laravel/vapor-core/src/Runtime/NotifiesLambda.php(19): Laravel\Vapor\Runtime\LambdaRuntime->lambdaRequest('http://127.0.0....', Array)
#1 /var/task/vendor/laravel/vapor-core/src/Runtime/LambdaRuntime.php(53): Laravel\Vapor\Runtime\LambdaRuntime->notifyLambdaOfResponse('9701efbf-d000-4...', Array)
#2 /var/task/fpmRuntime.php(88): Laravel\Vapor\Runtime\LambdaRuntime->nextInvocation(Object(Closure))
#3 /var/task/runtime.php(36): require('/var/task/fpmRu...')
#4 /opt/bootstrap.php(6): require('/var/task/runti...')

What are the steps to reproduce?

$writer = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($spreadsheet);
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment; filename="filename.xlsx"');
$writer->save('php://output');

What features do you think are causing the issue

  • Reader
  • Writer
  • Styles
  • Data Validations
  • Formula Calculations
  • Charts
  • AutoFilter
  • Form Elements

Does an issue affect all spreadsheet file formats? If not, which formats are affected?

Xlsx (I tried with Csv and it worked)

Which versions of PhpSpreadsheet and PHP are affected?

I'm using PHP 7.4.30, Laravel Framework 8.83.23 and PhpSpreadsheet 1.24.1

@MarkBaker
Copy link
Member

So why do you think this is a problem with PhpSpreadsheet? And not a problem with Vapor (whatever Vapor is)? Your stack trace shows nothing of PhpSpreadsheet?

@brunomcpena brunomcpena closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants