statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.06k stars 530 forks source link

Debugbar no longer loads since v4.8.0 #8352

Closed ryanmitchell closed 1 year ago

ryanmitchell commented 1 year ago

Bug description

The debugbar on our staging site no longer loads since v4.8.0 (at a guess with the inclusion of the antlers performance profiler).

We are getting a JS error in the console Invalid or unexpected token, relating to this line in the logs: https://pastebin.com/PXchbt1G

I can provide access to the site if this is required.

How to reproduce

See above.

Logs

https://pastebin.com/PXchbt1G
(GitHub couldn't cope with the length of the log)

Environment

Environment
Laravel Version: 10.13.5
PHP Version: 8.1.20
Composer Version: 2.5.8
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: NOT CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: daily
Mail: postmark
Queue: redis
Scout: meilisearch_multiple
Session: database

Statamic
Addons: 8
Antlers: runtime
Stache Watcher: Disabled
Static Caching: Disabled
Version: 4.8.0 PRO

Statamic Addons
aerni/social-links: 3.1.0
doublethreedigital/runway: 5.0.10
jonassiewertsen/statamic-livewire: 2.12.0
pecotamic/sitemap: 1.4.6
statamic/eloquent-driver: 2.2.0
statamic/seo-pro: 5.2.0

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

jasonvarga commented 1 year ago

It seems like maybe the pastebin was also incomplete. Can you double check that's the entire thing?

ryanmitchell commented 1 year ago

Even pastebin thinks it's too much data. Let's try this - attached.

debugbar.txt

jasonvarga commented 1 year ago

I don't have a fix but in #8356 you'll at least be able to disable it.

ryanmitchell commented 1 year ago

That’s cool. My guess is our templates are too much for it to handle. Turning it off is good enough for us.

JohnathonKoster commented 1 year ago

@ryanmitchell

Would you be able to test with the changes in PR #8358? This PR makes a dramatic reduction in the amount of data sent to the client, as well as changes what content is sent to help prevent JSON encoding errors.

Thanks!

ryanmitchell commented 1 year ago

Yeah that it working again now, thanks @JohnathonKoster!