TappNetwork / laravel-uppy-s3-multipart-upload

Multipart Uploads using Laravel, AWS S3, and Uppy
MIT License
69 stars 18 forks source link

Tapp\LaravelUppyS3MultipartUpload\Http\Controllers\UppyS3MultipartController::encodeURIComponent(): Argument #1 ($str) must be of type string, null given #20

Open sheinfeld opened 1 year ago

sheinfeld commented 1 year ago

Hi there,

First of all, congrats for the initiative, perfect package!

Now, I've had my log full of this particular issue:

Tapp\LaravelUppyS3MultipartUpload\Http\Controllers\UppyS3MultipartController::encodeURIComponent(): Argument #1 ($str) must be of type string, null given

Full stack: `[2023-05-07 21:25:19] production.ERROR: Tapp\LaravelUppyS3MultipartUpload\Http\Controllers\UppyS3MultipartController::encodeURIComponent(): Argument #1 ($str) must be of type string, null given, called in /home/forge/office.motorcyclesports.net/vendor/tapp/laravel-uppy-s3-multipart-upload/src/Http/Controllers/UppyS3MultipartController.php on line 339 {"exception":"[object] (TypeError(code: 0): Tapp\LaravelUppyS3MultipartUpload\Http\Controllers\UppyS3MultipartController::encodeURIComponent(): Argument #1 ($str) must be of type string, null given, called in /home/forge/office.motorcyclesports.net/vendor/tapp/laravel-uppy-s3-multipart-upload/src/Http/Controllers/UppyS3MultipartController.php on line 339 at /home/forge/office.motorcyclesports.net/vendor/tapp/laravel-uppy-s3-multipart-upload/src/Http/Controllers/UppyS3MultipartController.php:30) [stacktrace]

0 /home/forge/office.motorcyclesports.net/vendor/tapp/laravel-uppy-s3-multipart-upload/src/Http/Controllers/UppyS3MultipartController.php(339): Tapp\LaravelUppyS3MultipartUpload\Http\Controllers\UppyS3MultipartController->encodeURIComponent()

1 /home/forge/office.motorcyclesports.net/vendor/tapp/laravel-uppy-s3-multipart-upload/src/Http/Controllers/UppyS3MultipartController.php(301): Tapp\LaravelUppyS3MultipartUpload\Http\Controllers\UppyS3MultipartController->getSignedUrl()

2 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Tapp\LaravelUppyS3MultipartUpload\Http\Controllers\UppyS3MultipartController->signPartUpload()

3 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\Routing\Controller->callAction()

4 /home/forge/office.motorcyclesports.net/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracing.php(21): Illuminate\Routing\ControllerDispatcher->dispatch()

5 /home/forge/office.motorcyclesports.net/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingRoutingDispatcher.php(31): Sentry\Laravel\Tracing\Routing\TracingControllerDispatcherTracing->Sentry\Laravel\Tracing\Routing\{closure}()

6 /home/forge/office.motorcyclesports.net/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracing.php(20): Sentry\Laravel\Tracing\Routing\TracingRoutingDispatcher->wrapRouteDispatch()

7 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Sentry\Laravel\Tracing\Routing\TracingControllerDispatcherTracing->dispatch()

8 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()

9 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Routing/Router.php(798): Illuminate\Routing\Route->run()

10 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Routing\Router->Illuminate\Routing\{closure}()

11 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

12 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Routing/Router.php(797): Illuminate\Pipeline\Pipeline->then()

13 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Routing/Router.php(776): Illuminate\Routing\Router->runRouteWithinStack()

14 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Routing/Router.php(740): Illuminate\Routing\Router->runRoute()

15 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Routing/Router.php(729): Illuminate\Routing\Router->dispatchToRoute()

16 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Routing\Router->dispatch()

17 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()

18 /home/forge/office.motorcyclesports.net/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(45): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

19 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Sentry\Laravel\Http\SetRequestIpMiddleware->handle()

20 /home/forge/office.motorcyclesports.net/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(30): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

21 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Sentry\Laravel\Http\SetRequestMiddleware->handle()

22 /home/forge/office.motorcyclesports.net/app/Http/Middleware/LocaleHeader.php(18): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

23 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\Http\Middleware\LocaleHeader->handle()

24 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

25 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()

26 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()

27 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

28 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()

29 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\TrimStrings->handle()

30 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

31 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()

32 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

33 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()

34 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

35 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\HandleCors->handle()

36 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

37 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\TrustProxies->handle()

38 /home/forge/office.motorcyclesports.net/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Middleware.php(52): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

39 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Sentry\Laravel\Tracing\Middleware->handle()

40 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

41 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pipeline->then()

42 /home/forge/office.motorcyclesports.net/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()

43 /home/forge/office.motorcyclesports.net/public/index.php(51): Illuminate\Foundation\Http\Kernel->handle()

44 {main}

"} `

I am using Laravel 10.

Any idea of might be causing this?

Best regards

andreia commented 1 year ago

@sheinfeld Thank you! I created a new Laravel 10 project locally, installed this package, and couldn't reproduce this error. Are the S3 settings all okay, according to the README instructions? Could you provide a sample repo, so I can check where the issue is?