barryvdh / laravel-debugbar

Debugbar for Laravel (Integrates PHP Debug Bar)
MIT License
16.57k stars 1.53k forks source link

TypeError: data.__meta is undefined #1614

Closed darkons closed 2 months ago

darkons commented 3 months ago

I just did a clean install of Laravel 11 and found this javascript error in the browser console.

After some research, I have found that the package maximebf/php-debugbar has suffered a change in its version 1.22 which is used by barryvdh/laravel-debugbar since version 3.13.

The problem seems to be that now the addDataSet method expects the __meta property, however, it is not receiving it. https://github.com/maximebf/php-debugbar/blob/v1.22.0/src/DebugBar/Resources/debugbar.js#L944

I hope this information will help to solve the problem.

barryvdh commented 3 months ago

Are you using a custom configuration?

darkons commented 3 months ago

Are you using a custom configuration? Nope, just default one.

Did you reload browser cache? Yeah, tried on Firefox and Chrome. In both with disabled cache, private tabs and forcing with CTRL+F5.

Laravel 11 + Breeze Inertia/Vue stack. barryvdh/laravel-debugbar v3.13.4

In addition, sometimes the following warning also appears on the first visit downloadable font: Glyph bbox was incorrect (glyph ids 33 55 62 81 82 83 84 87 88 89 90 112 119 120 123 139 159 162 164 166 178 184 185 217 218 272 273 274 275 279 281 284 290 291 292 309 310 319 321 323 326 329 330 331 332 333 334 339 341 347 349 351 352 353 354 357 358 361 366 367 370 371 414 431 436 444 445 458 460 464 465 483 505 508 511 514 516 517 518 520 521 538 539 546 568 574 579 580 585 586 594 596 599 602 603 616 618 622 627 629 630 633 634 638 643 645 651 654 665 675 685 686 688 691) (font-family: "PhpDebugbarFontAwesome" style:normal weight:400 stretch:100 src index:0) source: data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAX7oAA0AAAAChqwABAAHAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAc …

parallels999 commented 2 months ago

Maybe a validation is needed in case no data comes, sometimes an exception json may come, and there is not __meta image image