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
Profiler Tab stuck on "Loading profile" #665
Comments
Does this help? #591 (comment) |
I've been trying to get the profiling to work with the Slim framework. Doing so, I found one thing that causes problems: The profiler output ( The "Loading profile" message with the rotating progress indicator then gets stuck. I have only tried to reverse-engineer the JS code in Clockwork/Web/public/ and the loop there lacks a bit of error handling, it just chokes on the truncated input. When I added some checks there, it then came back with a message like "no profile info found" or so. I don't know where the actual source code for that condensed JS can be found, but the problem there is in the code that processes lines starting with "fl=". That code simply uses the two following lines without checking if they exist at all. |
Short update on that: It seems that multiple complete records are written to the output file ( |
Hey, you can try changing the The Btw. you can find the source for the client app here - https://github.com/underground-works/clockwork-app |
I'll try that! The default Also, yes, this looks exactly like the bug reported against the clockwork-app project. BTW: These are all things that are rather easy to get wrong and they will make the experience miserable. I've had good results in other apps by providing a diagnostic endpoint, where you query the app "Are you feeling well in this environment?". That endpoint (or CLI) would reply with a list of self-diagnostic checks and their results:
The use case is simply troubleshooting an installation. If something doesn't work, just call this endpoint to check for common errors before diving deeper. I'm still getting more familiar with the codebase, but I'm planning to implement something to better illustrate this goal. |
Yeah, having some diagnose command would be cool at some point. For starters, we should suggest changing the |
I'm using Laravel 10 + Sail. I wanted to use clockwork to help me do code profiling with xdebug, but I'm having issues setting everything up.
I've added these two lines to .env file:
SAIL_XDEBUG_MODE=profile
SAIL_XDEBUG_CONFIG="client_host=host.docker.internal profiler_output_name=cachegrind.out.%t-%s"
and when I refresh a page in my application a new .json file is created in storage/clockwork, and when looking at headers in network tab there is
X-Xdebug-Profile-Filename
header.I've also checked with phpinfo() if profiling is enabled and it is:
I can see all the info on Timeline tab inside clockwork add-on but when I switch to Profiler tab, it gets stuck with message "Loading profile...".
Am I missing anything? Are there any specific setup steps for using Clockwork with Sail?
The text was updated successfully, but these errors were encountered: