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

No Debugbar Storage found.. when php artisan debugbar:clear #247

Closed
sergiodebcn opened this issue Dec 23, 2014 · 10 comments
Closed

No Debugbar Storage found.. when php artisan debugbar:clear #247

sergiodebcn opened this issue Dec 23, 2014 · 10 comments

Comments

@sergiodebcn
Copy link

When I execute the command 'php artisan debugbar:clear' I get an error, No Debugbar Storage found..

If I hardcode the class ClearCommand to set the storage manually it works perfect.

public function fire()
{
/* Added Code
$storage = new FilesystemStorage($this->debugbar->app['files'], storage_path() . '/debugbar');
$this->debugbar->setStorage($storage);
*/
if ($storage = $this->debugbar->getStorage()) {
$storage->clear();
$this->info('Debugbar Storage cleared!');
} else {
$this->error('No Debugbar Storage found..');
}
}

Thanks

@barryvdh
Copy link
Owner

Do you have the correct environment set on Artisan? Try php artisan env, does it return the exected value?

@sergiodebcn
Copy link
Author

Yes, I have an incorrect envioronment set on artisan. I have production envioronment. I'm working actually in local. I tried this command, php artisan debugbar:clear --env=local. But same result. No Debugbar Storage found..

@tonglil
Copy link

tonglil commented Jan 12, 2015

Yes, I also have this issue, even though the /storage/debugbar folder exists with .json files inside.

I only stumbled upon this because I'm getting a 500 when the debugbar tries to load something like this: https://example.com/_debugbar/open?op=get&id=1ea0b33b6eaf429b32829943a030b9da

@ghost
Copy link

ghost commented Mar 31, 2015

I'm also getting this error when I run the artisan command. My env is local. I don't have any storage/debugbar folder. It's an app that I've just migrated to Laravel 5 from v4. Any ideas?

@goyote
Copy link

goyote commented Jul 8, 2015

I found the issue, in the service provider in line 62 you have this:

    if ($app->runningInConsole()) {
        $this->app['config']->set('debugbar.enabled', false);
    }

So when the following check happens debugbar.enabled is set to false and not null.

    // If enabled is null, set from the app.debug value
    if (is_null($enabled)) {
        $enabled = $this->app['config']->get('app.debug');
        $this->app['config']->set('debugbar.enabled', $enabled);
    }

@furey
Copy link

furey commented Nov 13, 2015

@barryvdh I'm experiencing the same error.


Published package config

/config/debugbar.php

storage-settings

Project directory (storage folder exists)

root

Artisan output

artisan


Any ideas?

@spajz
Copy link

spajz commented Nov 15, 2015

Same for me.

@wink-
Copy link

wink- commented Jan 7, 2016

I have the same issue when migrating to my live Forge server. The .json files are there in the debugbar directory in storage, the APP_ENV=local, and APP_DEBUG=true. Works great on my local machine. When I hit f12 it tells me that the resources will not load. But if I view the source, it shows the typical debugbar mumbo jumbo on the bottom.

@neylsongularte
Copy link

php artisan debugbar:clear

// in console enabled is defined as false
if ($app->runningInConsole()) {
      $this->app['config']->set('debugbar.enabled', false);
}
...
// here
if ( ! $enabled) {
            return;
        }
// debugbar not is booted
        /** @var LaravelDebugbar $debugbar */
        $debugbar = $this->app['debugbar'];
        $debugbar->boot();

neylsongularte added a commit to neylsongularte/laravel-debugbar that referenced this issue Feb 12, 2016
@barryvdh
Copy link
Owner

Fixed by booting the storage before clearing.

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

8 participants