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

[Bug]: Typed property Rappasoft\\LaravelLivewireTables\\DataTableComponent::$columns must not be accessed before initialization at /www/Honeys/site/vendor/rappasoft/laravel-livewire-tables/src/Traits/Helpers/ColumnHelpers.php:22 #2166

Open
happyclicker opened this issue Jan 8, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@happyclicker
Copy link

What happened?

I am not sure what component is creating this error in my laravel.log randomly and frequently, I don't seem to be able to recreate it locally at all. Also, the trace doesn't tell me what is actually calling the component:

I'm using Laravel 10 with Livewire 3.5.18

[2025-01-08 12:15:15] production.ERROR: Typed property Rappasoft\LaravelLivewireTables\DataTableComponent::$columns must not be accessed before initialization {"userId":9179,"exception":"[object] (Error(code: 0): Typed property Rappasoft\LaravelLivewireTables\DataTableComponent::$columns must not be accessed before initialization at /www/Honeys/site/vendor/rappasoft/laravel-livewire-tables/src/Traits/Helpers/ColumnHelpers.php:22)
[stacktrace]
#0 /www/Honeys/site/vendor/rappasoft/laravel-livewire-tables/src/Traits/Helpers/ColumnHelpers.php(56): Rappasoft\LaravelLivewireTables\DataTableComponent->setupColumns()
#1 /www/Honeys/site/vendor/rappasoft/laravel-livewire-tables/src/Traits/WithFooter.php(24): Rappasoft\LaravelLivewireTables\DataTableComponent->getColumns()
#2 /www/Honeys/site/vendor/rappasoft/laravel-livewire-tables/src/Traits/WithFooter.php(33): Rappasoft\LaravelLivewireTables\DataTableComponent->setupFooter()
#3 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Rappasoft\LaravelLivewireTables\DataTableComponent->renderingWithFooter()
#4 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#5 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#6 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#7 /www/Honeys/site/vendor/livewire/livewire/src/Wrapped.php(23): Illuminate\Container\BoundMethod::call()
#8 /www/Honeys/site/vendor/livewire/livewire/src/Features/SupportLifecycleHooks/SupportLifecycleHooks.php(144): Livewire\Wrapped->__call()
#9 /www/Honeys/site/vendor/livewire/livewire/src/Features/SupportLifecycleHooks/SupportLifecycleHooks.php(112): Livewire\Features\SupportLifecycleHooks\SupportLifecycleHooks->callTraitHook()
#10 /www/Honeys/site/vendor/livewire/livewire/src/ComponentHook.php(53): Livewire\Features\SupportLifecycleHooks\SupportLifecycleHooks->render()
#11 /www/Honeys/site/vendor/livewire/livewire/src/ComponentHookRegistry.php(110): Livewire\ComponentHook->callRender()
#12 /www/Honeys/site/vendor/livewire/livewire/src/ComponentHookRegistry.php(69): Livewire\ComponentHookRegistry::Livewire\{closure}()
#13 /www/Honeys/site/vendor/livewire/livewire/src/EventBus.php(60): Livewire\ComponentHookRegistry::Livewire\{closure}()
#14 /www/Honeys/site/vendor/livewire/livewire/src/helpers.php(98): Livewire\EventBus->trigger()
#15 /www/Honeys/site/vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php(234): Livewire\trigger()
#16 /www/Honeys/site/vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php(285): Livewire\Mechanisms\HandleComponents\HandleComponents->Livewire\Mechanisms\HandleComponents\{closure}()
#17 /www/Honeys/site/vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php(233): Livewire\Mechanisms\HandleComponents\HandleComponents->trackInRenderStack()
#18 /www/Honeys/site/vendor/livewire/livewire/src/Mechanisms/HandleComponents/HandleComponents.php(104): Livewire\Mechanisms\HandleComponents\HandleComponents->render()
#19 /www/Honeys/site/vendor/livewire/livewire/src/LivewireManager.php(97): Livewire\Mechanisms\HandleComponents\HandleComponents->update()
#20 /www/Honeys/site/vendor/livewire/livewire/src/Mechanisms/HandleRequests/HandleRequests.php(94): Livewire\LivewireManager->update()
#21 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(46): Livewire\Mechanisms\HandleRequests\HandleRequests->handleUpdate()
#22 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\Routing\ControllerDispatcher->dispatch()
#23 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()
#24 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\Routing\Route->run()
#25 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#26 /www/Honeys/site/app/Http/Middleware/TrackLastActiveAt.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#27 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\TrackLastActiveAt->handle()
#28 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#29 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Routing\Middleware\SubstituteBindings->handle()
#30 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#31 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#32 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#33 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#34 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#35 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#36 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Session\Middleware\StartSession->handle()
#37 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#38 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#39 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#40 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#41 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#42 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(805): Illuminate\Pipeline\Pipeline->then()
#43 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\Routing\Router->runRouteWithinStack()
#44 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\Routing\Router->runRoute()
#45 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\Routing\Router->dispatchToRoute()
#46 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Routing\Router->dispatch()
#47 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#48 /www/Honeys/site/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#49 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Livewire\Features\SupportDisablingBackButtonCache\DisableBackButtonCacheMiddleware->handle()
#50 /www/Honeys/site/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#51 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
#52 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#53 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#54 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(36): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#55 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\TrimStrings->handle()
#56 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#57 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
#58 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(99): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#59 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#60 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#61 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\HandleCors->handle()
#62 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#63 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\TrustProxies->handle()
#64 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#65 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pipeline->then()
#66 /www/Honeys/site/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#67 /www/Honeys/site/public/index.php(51): Illuminate\Foundation\Http\Kernel->handle()
#68 {main}

How to reproduce the bug

I wish I knew. :(

Package Version

3.5.10

PHP Version

8.3.x

Laravel Version

10.48.25

Alpine Version

No response

Theme

Bootstrap 5.x

Notes

No response

Error Message

No response

@happyclicker happyclicker added the bug Something isn't working label Jan 8, 2025
@lrljoe
Copy link
Collaborator

lrljoe commented Jan 11, 2025

Have you previously published the views?

@happyclicker
Copy link
Author

Meaning? I have tables all over the application in production that work, I just get this error in my logs from time to time and I can't figure out where it is coming from.

Sorry, I am not sure I understand your question. :)

@lrljoe
Copy link
Collaborator

lrljoe commented Jan 11, 2025

In your environment, do you have the package views published, i.e. anything in

resources/views/vendor/livewire-tables

@lrljoe
Copy link
Collaborator

lrljoe commented Jan 11, 2025

@happyclicker - I've made some assumptions, and there's a fix that should be released this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants