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

htmlspecialchars(): Argument #1 ($string) must be of type string, Closure given #117

Open
simonjcarr opened this issue Sep 16, 2024 · 5 comments

Comments

@simonjcarr
Copy link

Volt Version

1.0

Laravel Version

11.9

PHP Version

8.3

Database Driver & Version

sqlite

Description

In a brand new app, when trying to access a volt full page component, I get the following error in browser.

htmlspecialchars(): Argument #1 ($string) must be of type string, Closure given (View: C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\resources\exceptions\renderer\components\context.blade.php) (View: C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\resources\exceptions\renderer\components\context.blade.php)

Steps To Reproduce

In a brand new app created in Laravel Herd, I crate a basic component

php artisan make:volt designs/list-designs

This creates the following component

<?php

use function Livewire\Volt\{state};

//

?>

<div>
    //
</div>

I create a route in web.php

Volt::route('/designs', 'designs.list-designs')->name('designs');

I visit the route in my browser and get the error

htmlspecialchars(): Argument #1 ($string) must be of type string, Closure given (View: C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\resources\exceptions\renderer\components\context.blade.php) (View: C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\resources\exceptions\renderer\components\context.blade.php)

Full Exception

Illuminate\View\
ViewException
Show exception properties
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Support\helpers.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Support/helpers.php#L135)(line 135)
        if ($value instanceof BackedEnum) {            $value = $value->value;        }        return htmlspecialchars($value ?? '', ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8', $doubleEncode);    }}if (! function_exists('env')) {    /**
CompilerEngine->handleViewException(object(ViewException), 1)
in [C:\Users\simon\Herd\visual-infra\vendor\livewire\livewire\src\Mechanisms\ExtendBlade\ExtendedCompilerEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php#L58)(line 58)
ExtendedCompilerEngine->handleViewException(object(ViewException), 1)
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\Engines\PhpEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php#L60)(line 60)
PhpEngine->evaluatePath('C:\\Users\\simon\\Herd\\visual-infra\\storage\\framework\\views/0b36a6a93be761c522a9b2f038e1c8e9.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception)))
in [C:\Users\simon\Herd\visual-infra\vendor\livewire\livewire\src\Mechanisms\ExtendBlade\ExtendedCompilerEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php#L22)(line 22)
ExtendedCompilerEngine->evaluatePath('C:\\Users\\simon\\Herd\\visual-infra\\storage\\framework\\views/0b36a6a93be761c522a9b2f038e1c8e9.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception)))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\Engines\CompilerEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php#L74)(line 74)
CompilerEngine->get('C:\\Users\\simon\\Herd\\visual-infra\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Providers/../resources/exceptions/renderer/show.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception)))
in [C:\Users\simon\Herd\visual-infra\vendor\livewire\livewire\src\Mechanisms\ExtendBlade\ExtendedCompilerEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php#L10)(line 10)
ExtendedCompilerEngine->get('C:\\Users\\simon\\Herd\\visual-infra\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Providers/../resources/exceptions/renderer/show.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception)))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\View.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/View.php#L208)(line 208)
View->getContents()
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\View.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/View.php#L191)(line 191)
View->renderContents()
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\View.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/View.php#L160)(line 160)
View->render()
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Renderer\Renderer.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php#L94)(line 94)
Renderer->render(object(Request), object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php#L845)(line 845)
Handler->renderExceptionContent(object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php#L826)(line 826)
Handler->convertExceptionToResponse(object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php#L805)(line 805)
Handler->prepareResponse(object(Request), object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php#L704)(line 704)
Handler->renderExceptionResponse(object(Request), object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php#L592)(line 592)
Handler->render(object(Request), object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php#L51)(line 51)
Pipeline->handleException(object(Request), object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L146)(line 146)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Middleware\SubstituteBindings.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php#L51)(line 51)
SubstituteBindings->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php#L88)(line 88)
VerifyCsrfToken->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php#L49)(line 49)
ShareErrorsFromSession->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php#L121)(line 121)
StartSession->handleStatefulRequest(object(Request), object(Store), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php#L64)(line 64)
StartSession->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php#L37)(line 37)
AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php#L75)(line 75)
EncryptCookies->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L119)(line 119)
Pipeline->then(object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Router.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Router.php#L807)(line 807)
Router->runRouteWithinStack(object(Route), object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Router.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Router.php#L786)(line 786)
Router->runRoute(object(Request), object(Route))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Router.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Router.php#L750)(line 750)
Router->dispatchToRoute(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Router.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Router.php#L739)(line 739)
Router->dispatch(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php#L201)(line 201)
Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L144)(line 144)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\livewire\livewire\src\Features\SupportDisablingBackButtonCache\DisableBackButtonCacheMiddleware.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php#L19)(line 19)
DisableBackButtonCacheMiddleware->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php#L21)(line 21)
TransformsRequest->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php#L31)(line 31)
ConvertEmptyStringsToNull->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php#L21)(line 21)
TransformsRequest->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TrimStrings.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php#L51)(line 51)
TrimStrings->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Http\Middleware\ValidatePostSize.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php#L27)(line 27)
ValidatePostSize->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php#L110)(line 110)
PreventRequestsDuringMaintenance->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Http\Middleware\HandleCors.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php#L49)(line 49)
HandleCors->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Http\Middleware\TrustProxies.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php#L58)(line 58)
TrustProxies->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\InvokeDeferredCallbacks.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php#L22)(line 22)
InvokeDeferredCallbacks->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L119)(line 119)
Pipeline->then(object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php#L176)(line 176)
Kernel->sendRequestThroughRouter(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php#L145)(line 145)
Kernel->handle(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Application.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Application.php#L1188)(line 1188)
Application->handleRequest(object(Request))
in [C:\Users\simon\Herd\visual-infra\public\index.php ](file:///C:/Users/simon/Herd/visual-infra/public/index.php#L17)(line 17)
require('C:\\Users\\simon\\Herd\\visual-infra\\public\\index.php')
in [C:\Program Files\Herd\resources\app.asar.unpacked\resources\valet\server.php ](file:///C:/Program%20Files/Herd/resources/app.asar.unpacked/resources/valet/server.php#L139)(line 139)
Illuminate\View\
ViewException
htmlspecialchars(): Argument #1 ($string) must be of type string, Closure given (View: C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\resources\exceptions\renderer\components\context.blade.php)

in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Support\helpers.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Support/helpers.php#L135)(line 135)
        if ($value instanceof BackedEnum) {            $value = $value->value;        }        return htmlspecialchars($value ?? '', ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8', $doubleEncode);    }}if (! function_exists('env')) {    /**
CompilerEngine->handleViewException(object(TypeError), 3)
in [C:\Users\simon\Herd\visual-infra\vendor\livewire\livewire\src\Mechanisms\ExtendBlade\ExtendedCompilerEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php#L58)(line 58)
ExtendedCompilerEngine->handleViewException(object(TypeError), 3)
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\Engines\PhpEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php#L60)(line 60)
PhpEngine->evaluatePath('C:\\Users\\simon\\Herd\\visual-infra\\storage\\framework\\views/ceed33630c94070c6ab7774aea89a5e9.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception), 'attributes' => object(ComponentAttributeBag), 'slot' => object(ComponentSlot), '__laravel_slots' => array('__default' => object(ComponentSlot))))
in [C:\Users\simon\Herd\visual-infra\vendor\livewire\livewire\src\Mechanisms\ExtendBlade\ExtendedCompilerEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php#L22)(line 22)
ExtendedCompilerEngine->evaluatePath('C:\\Users\\simon\\Herd\\visual-infra\\storage\\framework\\views/ceed33630c94070c6ab7774aea89a5e9.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception), 'attributes' => object(ComponentAttributeBag), 'slot' => object(ComponentSlot), '__laravel_slots' => array('__default' => object(ComponentSlot))))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\Engines\CompilerEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php#L74)(line 74)
CompilerEngine->get('C:\\Users\\simon\\Herd\\visual-infra\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Providers/../resources/exceptions/renderer/components/context.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception), 'attributes' => object(ComponentAttributeBag), 'slot' => object(ComponentSlot), '__laravel_slots' => array('__default' => object(ComponentSlot))))
in [C:\Users\simon\Herd\visual-infra\vendor\livewire\livewire\src\Mechanisms\ExtendBlade\ExtendedCompilerEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php#L10)(line 10)
ExtendedCompilerEngine->get('C:\\Users\\simon\\Herd\\visual-infra\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Providers/../resources/exceptions/renderer/components/context.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception), 'attributes' => object(ComponentAttributeBag), 'slot' => object(ComponentSlot), '__laravel_slots' => array('__default' => object(ComponentSlot))))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\View.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/View.php#L208)(line 208)
View->getContents()
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\View.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/View.php#L191)(line 191)
View->renderContents()
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\View.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/View.php#L160)(line 160)
View->render()
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\Concerns\ManagesComponents.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/Concerns/ManagesComponents.php#L103)(line 103)
Factory->renderComponent()
in [C:\Users\simon\Herd\visual-infra\storage\framework\views\0b36a6a93be761c522a9b2f038e1c8e9.php ](file:///C:/Users/simon/Herd/visual-infra/storage/framework/views/0b36a6a93be761c522a9b2f038e1c8e9.php#L87)(line 87)
require('C:\\Users\\simon\\Herd\\visual-infra\\storage\\framework\\views\\0b36a6a93be761c522a9b2f038e1c8e9.php')
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php#L123)(line 123)
Filesystem::Illuminate\Filesystem\{closure}()
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php#L124)(line 124)
Filesystem->getRequire('C:\\Users\\simon\\Herd\\visual-infra\\storage\\framework\\views/0b36a6a93be761c522a9b2f038e1c8e9.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception)))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\Engines\PhpEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php#L58)(line 58)
PhpEngine->evaluatePath('C:\\Users\\simon\\Herd\\visual-infra\\storage\\framework\\views/0b36a6a93be761c522a9b2f038e1c8e9.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception)))
in [C:\Users\simon\Herd\visual-infra\vendor\livewire\livewire\src\Mechanisms\ExtendBlade\ExtendedCompilerEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php#L22)(line 22)
ExtendedCompilerEngine->evaluatePath('C:\\Users\\simon\\Herd\\visual-infra\\storage\\framework\\views/0b36a6a93be761c522a9b2f038e1c8e9.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception)))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\Engines\CompilerEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php#L74)(line 74)
CompilerEngine->get('C:\\Users\\simon\\Herd\\visual-infra\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Providers/../resources/exceptions/renderer/show.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception)))
in [C:\Users\simon\Herd\visual-infra\vendor\livewire\livewire\src\Mechanisms\ExtendBlade\ExtendedCompilerEngine.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/livewire/livewire/src/Mechanisms/ExtendBlade/ExtendedCompilerEngine.php#L10)(line 10)
ExtendedCompilerEngine->get('C:\\Users\\simon\\Herd\\visual-infra\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Providers/../resources/exceptions/renderer/show.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'exception' => object(Exception)))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\View.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/View.php#L208)(line 208)
View->getContents()
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\View.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/View.php#L191)(line 191)
View->renderContents()
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\View.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/View.php#L160)(line 160)
View->render()
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Renderer\Renderer.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php#L94)(line 94)
Renderer->render(object(Request), object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php#L845)(line 845)
Handler->renderExceptionContent(object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php#L826)(line 826)
Handler->convertExceptionToResponse(object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php#L805)(line 805)
Handler->prepareResponse(object(Request), object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php#L704)(line 704)
Handler->renderExceptionResponse(object(Request), object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php#L592)(line 592)
Handler->render(object(Request), object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php#L51)(line 51)
Pipeline->handleException(object(Request), object(MissingLayoutException))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L146)(line 146)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Middleware\SubstituteBindings.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php#L51)(line 51)
SubstituteBindings->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php#L88)(line 88)
VerifyCsrfToken->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php#L49)(line 49)
ShareErrorsFromSession->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php#L121)(line 121)
StartSession->handleStatefulRequest(object(Request), object(Store), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php#L64)(line 64)
StartSession->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php#L37)(line 37)
AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php#L75)(line 75)
EncryptCookies->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L119)(line 119)
Pipeline->then(object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Router.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Router.php#L807)(line 807)
Router->runRouteWithinStack(object(Route), object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Router.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Router.php#L786)(line 786)
Router->runRoute(object(Request), object(Route))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Router.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Router.php#L750)(line 750)
Router->dispatchToRoute(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Routing\Router.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Routing/Router.php#L739)(line 739)
Router->dispatch(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php#L201)(line 201)
Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L144)(line 144)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\livewire\livewire\src\Features\SupportDisablingBackButtonCache\DisableBackButtonCacheMiddleware.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php#L19)(line 19)
DisableBackButtonCacheMiddleware->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php#L21)(line 21)
TransformsRequest->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php#L31)(line 31)
ConvertEmptyStringsToNull->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php#L21)(line 21)
TransformsRequest->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TrimStrings.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php#L51)(line 51)
TrimStrings->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Http\Middleware\ValidatePostSize.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php#L27)(line 27)
ValidatePostSize->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php#L110)(line 110)
PreventRequestsDuringMaintenance->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Http\Middleware\HandleCors.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php#L49)(line 49)
HandleCors->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Http\Middleware\TrustProxies.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php#L58)(line 58)
TrustProxies->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\InvokeDeferredCallbacks.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php#L22)(line 22)
InvokeDeferredCallbacks->handle(object(Request), object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L183)(line 183)
Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php#L119)(line 119)
Pipeline->then(object(Closure))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php#L176)(line 176)
Kernel->sendRequestThroughRouter(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php#L145)(line 145)
Kernel->handle(object(Request))
in [C:\Users\simon\Herd\visual-infra\vendor\laravel\framework\src\Illuminate\Foundation\Application.php ](file:///C:/Users/simon/Herd/visual-infra/vendor/laravel/framework/src/Illuminate/Foundation/Application.php#L1188)(line 1188)
Application->handleRequest(object(Request))
in [C:\Users\simon\Herd\visual-infra\public\index.php ](file:///C:/Users/simon/Herd/visual-infra/public/index.php#L17)(line 17)
require('C:\\Users\\simon\\Herd\\visual-infra\\public\\index.php')
in [C:\Program Files\Herd\resources\app.asar.unpacked\resources\valet\server.php ](file:///C:/Program%20Files/Herd/resources/app.asar.unpacked/resources/valet/server.php#L139)(line 139)
TypeError
htmlspecialchars(): Argument #1 ($string) must be of type string, Closure given
@bensherred
Copy link

Hey @simonjcarr,

This is most likely caused by your component missing the layout function. By default, Volt will render components using the components.layouts.app layout file (if it exists). However, if you created a new Laravel app using the Livewire (Volt Functional API) stack, the layout is file is located at layouts.app.

You will therefore need to update your component to look like so and Volt which layout to use:

<?php

use function Livewire\Volt\{layout, state};

layout('layouts.app');

?>

<div>
    //
</div>

https://livewire.laravel.com/docs/volt#full-page-components

@slovenianGooner
Copy link

@bensherred This is probably the case for this specific case, but it relates to any error you may get in any Volt file when routing with Volt::route. It makes it incredibly difficult to debug what the actual issue is, and it's mostly just trial and error by commenting out parts of code and seeing where the issue lies.

Solving this would be incredibly helpful for development.

@KamilKrr
Copy link

The mount method seems to be causing this issue, see the relevant discussion here.

For me, changing the mount method to something else like boot gets rid of the error and makes debugging much easier.
Of course, this is not a permanent solution and the underlying issue needs to be fixed.

@KishanFX
Copy link

Volt file when routing with Volt::route.
if you do anything wrong with the syntax or logical error, you will get exactly this error.
and this error is straight from the symphony framework.
I must dd(''); on every line to find the problem.
this needs to be fixed asap because it's annoying and doesn't provide anything to debug.

@jacksleight
Copy link

Also running into this on a fresh install, happens whenever any error is thrown in a component or the layout. This is the closure that's being passed to htmlspecialchars:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants