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

Debugbar is not displaying in Laravel 5 #313

Closed
Daem0nX opened this issue Mar 19, 2015 · 29 comments
Closed

Debugbar is not displaying in Laravel 5 #313

Daem0nX opened this issue Mar 19, 2015 · 29 comments

Comments

@Daem0nX
Copy link

Daem0nX commented Mar 19, 2015

I thought this was a Laravel 5.0.16 issue, however I've tested with a fresh install of 5.0.1 with the same results as below. I have a few projects created I believe with 5.0.12, where the debugbar was working. They have been updated to 5.0.16 and still display the debugbar. However new projects are not showing the debugbar.

Testing with a fresh install of Laravel 5.0.16
composer create-project laravel/laravel --prefer-dist
composer require barryvdh/laravel-debugbar

Added to config/app.php
'Barryvdh\Debugbar\ServiceProvider',
'Debugbar' => 'Barryvdh\Debugbar\Facade',

php artisan vendor:publish successfully creates config/debugbar.php

stat -c %a storage/ returns 777

.env
APP_ENV=local
APP_DEBUG=true

The Laravel 5 welcome screen is displayed, however the debugbar is not. Checking view source shows that the debugbar code has been added to the page. The following assets return a 404.
/_debugbar/assets/stylesheets?1426726547
/_debugbar/assets/javascript?1426726547

@Daem0nX Daem0nX changed the title Debugbar is not displaying in Laravel 5.0.16 Debugbar is not displaying in Laravel 5 Mar 19, 2015
@barryvdh
Copy link
Owner

What kind of error do you get on those assets? Do you have a catch all route?

@Daem0nX
Copy link
Author

Daem0nX commented Mar 19, 2015

Both assets return a 404 not found error. There are no catch all routes. This is a fresh install of L5, the only customization was adding debugbar, everything else is in a default state.

@goranata
Copy link

I'm dealing with the same issue on L5, set the debug to true and no debug is shown for example on a non-existing route... And gives me 404 no data to display.

@ryanmortier
Copy link

Same problem for me. Fresh install of Laravel, just one route for '/' but the debug bar doesn't load.

@ryanmortier
Copy link

Fuck, never mind. I solved my issue by doing php artisan config:clear

@mezofaktor
Copy link

Hi.
If problem on your's Linux OS with Apache, check working mod_rewrite or didn't.
Then sudo a2enmod rewrite
For me fix the issues with 404 for assets debugbar.

@Daem0nX
Copy link
Author

Daem0nX commented Mar 22, 2015

Unfortunately php artisan config:clear didn't resolve my issue, and I've verified that rewrite is enabled.

I've tested on two systems, both using https://github.com/bryannielsen/Laravel4-Vagrant - Ubuntu 12.04 with PHP 5.5.12 and Apache 2.4.6. Both load the welcome page, but fail to load the debugbar assets of a fresh Laravel 5 project. As far as I can recall, my vagrant VM hasn't changed. Laravel 5 projects created weeks ago still load the debugbar, only new projects fail.

I've decided to migrate to Homestead. Testing with a fresh install of Laravel 5.0.16 displays the debugbar, and so do my previously created projects.

@Daem0nX Daem0nX closed this as completed Mar 22, 2015
@syphernl
Copy link

It was most likely the L5 routing cache.

I was having the same problem, artisan route:list didn't show the routes even though everything was registered properly. Perhaps this should be added to the readme @barryvdh ?

@jklegseth
Copy link

I'm running Laravel 5.0.25 as a standalone (using php -S as a server). I was having the same problems as @Daem0nX, i.e., 404 on the assets. I tried a php artisan route:clear as @syphernl suggested and I still got 404. So I decided to try all of the clear commands:

php artisan route:clear
php artisan cache:clear
php artisan debugbar:clear //likely not necessary since it returned "No Debugbar Storage found.."
php artisan config:clear

Refreshed and all was good. Since I had already tried route:clear and debugbar:clear did nothing, it seems to come down to cache:clear or config:clear, in my case anyway.

@mushroomwithegg
Copy link

I'm running Laravel 5 and I was having the same problems. It is working on Windows and when I transfer it on my Ubuntu laptop it is now stop working. I already tried the above solution but still it is not working. I checked on the /storage/debugbar/ and the generated file is in this permission: -rw-r--r--.
Anyone?

@mushroomwithegg
Copy link

It's now working, it is the apache2 setup/configuration. Need to enable the mod_rewrite and read the .htaccess file.

@abelkbil
Copy link

Same issue exists.

3 similar comments
@riza
Copy link

riza commented Mar 10, 2016

Same issue exists.

@supgeek-rod
Copy link

Same issue exists.

@yekz
Copy link

yekz commented May 11, 2016

Same issue exists.

@barryvdh
Copy link
Owner

So all you guys aren't caching the routes/config, not catch-all routes? And you get a 404 error on the assets?
The links to assets are created in the HTML? And you do get an Laravel 404 (not apache/nginx?)

@yekz
Copy link

yekz commented May 11, 2016

I try this commands:

php artisan cache:clear && php artisan clear-compiled && php artisan view:clear && php artisan route:clear && php artisan config:clear && php artisan debugbar:clear && composer dump && php artisan route:cache

And I tried 2.1 and 2.2 with laravel 5.2
sometimes there is just nothing, debugbar add nothing to response, sometimes 404 and js error
/_debugbar/assets/stylesheets?1426726547
/_debugbar/assets/javascript?1426726547
PhpdebugBar not defined
$ not defined

My route:
php artisan route:list
+--------+----------+-----+------+-------------------------------------------+------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+-----+------+-------------------------------------------+------------+
| | GET|HEAD | / | | App\Http\Controllers\HomeController@index | |
+--------+----------+-----+------+-------------------------------------------+------------+

@barryvdh
Copy link
Owner

Also with the latest dev version?

@yekz
Copy link

yekz commented May 11, 2016

dev-master working

@barryvdh
Copy link
Owner

You could better use ^2.2@dev instead of dev-master. But I've tagged a new release (v2.2.1), so should be good in a couple of minutes.
Can the rest verify this works?

@yekz
Copy link

yekz commented May 11, 2016

thanks
I checked my nginx config, sorry I lost this:

location / {
    try_files $uri $uri/ /index.php?$query_string;
}

That's the reason why I got 404 errors.

I'll try 2.2.1 when it avaliable

@tarunhere
Copy link

I was facing the same error, what I did on production is cleared cache:

php artisan route:clear
php artisan config:clear

I was on L5.2 and these commands save me after lot of googling. Hope this helps.

@maxi032
Copy link

maxi032 commented Jan 31, 2017

Adding :
location / {
try_files $uri $uri/ /index.php?$query_string;
}
solved my problem too.
I am using Laravel 5.4

@karllo
Copy link

karllo commented Jun 19, 2017

@maxi032 thanks a lot

@goper-leo
Copy link

this solves on mine

touch storage/oauth-public.key

@ddavaham
Copy link

ddavaham commented Oct 1, 2017

Same issue for me. L5.5 fresh install, no catch all. I forgot toenable mod_rewrite when setting the VPS up

This comment reminded me: #313 (comment)

Thank You

@sumit22
Copy link

sumit22 commented Dec 27, 2017

tried everything mentioned above, still not working.
I am using laravel 5.4 and debugbar ~2.4.

@pavlokomarov
Copy link

@maxi032 thank You, this helped to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests