欢迎各位兄弟 发布技术文章
这里的技术是共享的
Hey, are you sure there is |
I have the same issue. Clockwork seem to generate json file like this "1389975744,0047.436770512.json" instead of "1389975744.0047.436770512.json" with a dot between "1389975744" and "0047". |
This should already be fixed in dev-master, I forgot to tag a new version though. If you are using 1.* as composer dependency, I've tagged new 1.4.3 revision, try running composer update. |
Fixed for me thank you |
Sorry, |
When you try to access |
The update aren't solving the Problem. When I try to access ```/__clockwork/1389615704.34.953869411´´´ I get the following result:
But the output at the Clockwork-Chrome-Extension is blank. |
same problem, folder filling up, nothing to see in chrome, all blank under clockwork
content with a debug log message ps - another question, is there some sort of garbage collection, once a day or so ? |
Hey, do your app responses contain the There is an artisan command available for cleaning old Clockwork data, |
I had this issue and fixed it by removing a stray character before the <?php tag in one of the app files. The typo was hidden because of css but it was preventing clockwork from working properly. |
Hi, I've got the same issue too. I'm getting the |
Hello guys, Thanks for your help, |
A couple weeks ago the same thing started happening for me, actually. Did a check for empty lines and such already, but that wasn't it. I can access the individual reports and I do see the clockwork headers. Anybody else got some clues as to why Chrome doesn't output anything? Are there maybe some Chrome logs I could check? |
Actually, turns out that it was the |
我执行了
1).env中 APP_DEBUG=true 也就是在调试模式下才能运行
2)删除了 boostrap/cache 下面的php文件(优化生成的缓存文件)
3) php artisan route:cache
4) RewriteRule ^.*__clockwork/(.*)$ /webform.int/index.php/__clockwork/$1 [L]
就解决了问题
laravel + Clockwork + Chrome not working #46
Comments
JasonMortonNZ commented on 11 Feb 2014
So after many hours of frustration here's where I'm at.
"itsgoingd/clockwork": "1.*"
to my composer.json file.'Clockwork\Support\Laravel\ClockworkServiceProvider'
to my providers array, and added'Clockwork' => 'Clockwork\Support\Laravel\Facade',
to my aliases array.app/filters.php
file:App::before(function($request) { Event::fire('clockwork.controller.start'); }); App::after(function($request, $response) { Event::fire('clockwork.controller.end'); });
composer dump-autoload -o
for good measure.php artisan serve
and we're running on (localhost:8000).localhost:8000
in chrome, check the headers and here's where things get strange :)The headers read:
X-Clockwork-Id:1392079506.9878.449334262
X-Clockwork-Version:1.4.2
Note: Composer installed Clockwork v1.4.4 , which is weird?
This is from my composer.lock file:
"name": "itsgoingd/clockwork", "version": "v1.4.4", "source": { "type": "git", "url": "https://github.com/itsgoingd/clockwork.git", "reference": "2d39c88ba507fde4bd21b11971e429762303224c" }
I hit the clockwork tab in Chrome (Version 32.0.1700.107) and nothing appears.
I do at this point have
.json' files in
app/storage/clockwork` containing all the correct data that should be being displayed by the Chrome extension.A few points where I feel the issue could be laying are:
I've seen other's mention that white space has been an issue for them, but this isn't the case here. I'll be interested to see if there's a solution to this.
hannesvdvreken commented on 13 Feb 2014
Is the app.debug config option set to true?
itsgoingd commented on 14 Feb 2014
Hey, sorry for the many hours of frustration. :\
What happens when you access "/__clockwork/1392079506.9878.449334262" in your browser (make sure the data file exists for that id) ? If you receive the json data can you please post it here or send it to me via email (remove personal information first) ?
The version was actually reported wrong in v1.4.3 and v1.4.4, sorry. I've just released v1.5, you might try updating before trying again as well.
thinksaydo commented on 21 Feb 2014
Clockwork will not work with the internal PHP web server because by default it reads the ID with periods as a file name and fails to route into Laravel. To fix, add this to the top of your Laravel public/index.php file:
// Allow PHP Web Server requests that resemble file requests if (file_exists(__DIR__ . $_SERVER["REQUEST_URI"])) return false;
That will allow the web server to return actual file requests while allowing Laravel to route other requests that only resemble file requests. Enjoy!
Then start the web server like:
php -S 127.0.0.1:8000 index.php
Pointing the PHP web server to a specific file makes that file act as a router for all requests.
itsgoingd commented on 24 Sep 2014
Tested with PHP web server without problems, if problem still exists in latest version please reopen.
itsgoingd closed this on 24 Sep 2014
xixo1983 commented on 26 Oct 2014
Issue still exists
xalloa commented on 12 Sep 2015
In my case it was a problem with the mod_rewrite rule. I mention that just in case.
trevorgehman commented on 22 Oct 2015
@xalloa How did you correct the mod_rewrite issue you had?
xalloa commented on 22 Oct 2015
@trevorgehman in my case a colleague had "installed" the web app at a subdir ( webform.int ) so I wrote a rule specific to the clockwork path like that:
RewriteRule ^.*__clockwork/(.*)$ /webform.int/index.php/__clockwork/$1 [L]
hope this helps though it is a workaround and not the solution (i.e. I have not fixed the original rule that caused the problem since i didn't had the time to).
trevorgehman commented on 22 Oct 2015
I actually discovered my issue was I had to clear the route cache with
php artisan route:cache
xalloa commented on 22 Oct 2015
Nice, I'll give it a try, however or other reasons we are running on nginx now so I have left mod_rewrite alone
bcalik commented on 20 Nov 2015
I have the same problem.
I have several laravel websites with same nginx configuration, all is working well but one of them does not work (which was actually working well previously. A lot of development is going on this project, so I don't know what caused Clockwork to stop working.)
Interesting thing is, clockwork-cli is working well, but the chrome extension does not work for this project. It just doesn't show anything.
Edit: Screenshots attached.
Edit: Latest clockwork json file added.
{"id":"1448021374.7071.350238989","time":1448021374.6205,"method":"GET","uri":"\/","headers":{"content-type":[""],"content-length":[""],"host":["arsiv.dev"],"connection":["keep-alive"],"cache-control":["max-age=0"],"accept":["text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,*\/*;q=0.8"],"upgrade-insecure-requests":["1"],"user-agent":["Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/46.0.2490.86 Safari\/537.36"],"referer":["http:\/\/arsiv.dev\/inventory"],"accept-encoding":["gzip, deflate, sdch"],"accept-language":["en-US,en;q=0.8,tr;q=0.6,es;q=0.4"],"cookie":["cartalyst_sentry=eyJpdiI6Ik9pTnIwK2duXC84V1lcL244MjhIXC9PRUE9PSIsInZhbHVlIjoiSEkxTGt0RjY5RDdtUTZpc3hxSnREZHZiT1JiTWRZNm1WSzlmZEoxOTNHKzZcL2ZlcjlRUHlsZFpRaG1wZDJzNUNlVUt3NEZlVUJORzhOdUdtSHp4SFpTN3pWdkQ4eVVQRk9cL0RJNFpoTzl2REtpdUhcLzV6VElCZFhwallqeVpFVHciLCJtYWMiOiIzNTNlMzJhYjk3OTgxZjFiMDRlODNlMDAwMDNhN2IzZGRmMTgwM2U1MTY0YWVkOTQ5MWUyODEwYmJkOGNhYzBjIn0%3D; laravel_session=eyJpdiI6IjM0b1BNZVwvWTZ1Z1ZrMjM2UHNqNjhRPT0iLCJ2YWx1ZSI6IldvWUt5VFcxYUdOeFV6SklWMU9FZHAxSkt2eUdYeUJOS09lcUFXOVFIa255TkphcytmZVp2elwvQlBKM0llTnd2UlJxTkUwXC9Da3NUVzRnQ3VISkZnb0E9PSIsIm1hYyI6IjVjODhkZDMxMjk0M2Y4NjcxYjAwODVhYjVmOGM5Nzg2ZTE2MDI4N2EwOTBlODRiOWNiOWQxYWIyNWRiYjJlNTIifQ%3D%3D"]},"controller":"HomeController@getIndex","getData":[],"postData":[],"sessionData":{"_token":"cydeMdVkzhOe4DHipWlS4MAIB5vYxvHltFH4vziq","flash":{"old":[],"new":[]}},"cookies":{"cartalyst_sentry":"eyJpdiI6Ik9pTnIwK2duXC84V1lcL244MjhIXC9PRUE9PSIsInZhbHVlIjoiSEkxTGt0RjY5RDdtUTZpc3hxSnREZHZiT1JiTWRZNm1WSzlmZEoxOTNHKzZcL2ZlcjlRUHlsZFpRaG1wZDJzNUNlVUt3NEZlVUJORzhOdUdtSHp4SFpTN3pWdkQ4eVVQRk9cL0RJNFpoTzl2REtpdUhcLzV6VElCZFhwallqeVpFVHciLCJtYWMiOiIzNTNlMzJhYjk3OTgxZjFiMDRlODNlMDAwMDNhN2IzZGRmMTgwM2U1MTY0YWVkOTQ5MWUyODEwYmJkOGNhYzBjIn0=","laravel_session":"eyJpdiI6IjM0b1BNZVwvWTZ1Z1ZrMjM2UHNqNjhRPT0iLCJ2YWx1ZSI6IldvWUt5VFcxYUdOeFV6SklWMU9FZHAxSkt2eUdYeUJOS09lcUFXOVFIa255TkphcytmZVp2elwvQlBKM0llTnd2UlJxTkUwXC9Da3NUVzRnQ3VISkZnb0E9PSIsIm1hYyI6IjVjODhkZDMxMjk0M2Y4NjcxYjAwODVhYjVmOGM5Nzg2ZTE2MDI4N2EwOTBlODRiOWNiOWQxYWIyNWRiYjJlNTIifQ=="},"responseTime":1448021374.7076,"responseStatus":200,"responseDuration":87.081909179688,"databaseQueries":[{"query":"SELECT * FROM `users` WHERE `users`.`deleted_at` IS NULL and `users`.`id` = '1' LIMIT 1","duration":0.32,"connection":"mysql"},{"query":"SELECT * FROM `throttle` WHERE `user_id` = '1' LIMIT 1","duration":0.2,"connection":"mysql"},{"query":"SELECT *, COUNT(*) as count, MAX(created_at) as latest_date FROM `notifications` WHERE `user_id` = '1' and `status` = '0' GROUP BY `status`, `name` ORDER BY `created_at` DESC LIMIT 10","duration":1.32,"connection":"mysql"},{"query":"SELECT * FROM `throttle` WHERE `user_id` = '1' LIMIT 1","duration":0.23,"connection":"mysql"},{"query":"SELECT count(*) as aggregate FROM `doc_types`","duration":0.24,"connection":"mysql"},{"query":"SELECT count(*) as aggregate FROM `folder_types`","duration":0.14,"connection":"mysql"},{"query":"SELECT `groups`.*, `users_groups`.`user_id` as `pivot_user_id`, `users_groups`.`group_id` as `pivot_group_id` FROM `groups` inner join `users_groups` on `groups`.`id` = `users_groups`.`group_id` WHERE `users_groups`.`user_id` = '1'","duration":0.32,"connection":"mysql"}],"databaseDuration":2.77,"timelineData":{"total":{"start":1448021374.6205,"end":1448021374.7088,"duration":88.293075561523,"description":"Total execution time.","data":[]},"initialisation":{"start":1448021374.6205,"end":1448021374.6577,"duration":37.149906158447,"description":"Application initialisation.","data":[]},"boot":{"start":1448021374.6577,"end":1448021374.6578,"duration":0.14495849609375,"description":"Framework booting.","data":[]},"run":{"start":1448021374.6577,"end":1448021374.7088,"duration":51.140785217285,"description":"Framework running.","data":[]},"dispatch":{"start":1448021374.67,"end":1448021374.7067,"duration":36.699056625366,"description":"Router dispatch.","data":[]},"controller":{"start":1448021374.6904,"end":1448021374.7067,"duration":16.26181602478,"description":"Controller running.","data":[]}},"log":[],"routes":[],"emailsData":[],"viewsData":[],"userData":null}
@itsgoingd @JasonMortonNZ please re-open the issue.
bcalik commented on 20 Nov 2015
Ok I have found the issue.
I have created a singleton named 'app'. Which causes the Clockwork error like this:
`Argument 1 passed to Clockwork\Support\Laravel\Controllers\LegacyController::__construct() must be an instance of Illuminate\Foundation\Application, instance of stdClass given``
Here is the code caused the issue:
App::singleton('app', function(){ $app = new stdClass; ... return $app; }); $app = App::make('app');
来自 https://github.com/itsgoingd/clockwork/issues/46
patrikkernke commented on 17 Jan 2014
Hello,
I installed Clockwork for Chrome and set the provider and alias in Laravel. I extended the Basecontroller too.
I see in the app/storage/clockwork folder json-files filling up. I read already the other closed issue "blank output". But disabling other profiler don't help me.
Trying this
URL: http://my_host/__clockwork/1385391368.3305.1545016532
I get only a header, but no response:Can you help me please? I want to use your tool!