Whoops pages stopped displaying for errors in some pages #162

Closed
goharsahi opened this Issue Feb 23, 2014 · 14 comments

Comments

Projects
None yet
3 participants
@goharsahi

I'm using Laravel 4.1 and Whoops pages were working perfectly for me, when all of a sudden, it stopped displaying errors in certain pages in the middle of programming, however, for some pages, it still shows errors, e.g. if I make a deliberate mistake in app.php, routes.php, views.php etc... it does show whoops page, however, certain other pages like, filters.php, config/auth.php, contollers/, views/, models and most others, it stopped displaying errors. Just shows white screen.

However, it is logging all the errors in laravel.log file along will whole stack trace and time etc. This has happened to me second time. Any guess?

@denis-sokolov

This comment has been minimized.

Show comment Hide comment
@denis-sokolov

denis-sokolov Feb 23, 2014

Collaborator

To begin with, could you let me know the version of Whoops you are using?

Collaborator

denis-sokolov commented Feb 23, 2014

To begin with, could you let me know the version of Whoops you are using?

@goharsahi

This comment has been minimized.

Show comment Hide comment
@goharsahi

goharsahi Feb 23, 2014

I don't know how to check the version. I just installed Laravel 4.1 a week back.

I don't know how to check the version. I just installed Laravel 4.1 a week back.

@denis-sokolov

This comment has been minimized.

Show comment Hide comment
@denis-sokolov

denis-sokolov Feb 23, 2014

Collaborator

That's okay. It means you are using Whoops 1.0.10.
There are no known issues that resemble anything like you tell.

If you would be willing to debug this, I could guide you on what to do.
To begin with, it seems that the Whoops is not being registered as a handler at some point in the runtime of your application. Could you play search around, see if anything in your application does anything with set_error_handler or restore_error_handler?

Collaborator

denis-sokolov commented Feb 23, 2014

That's okay. It means you are using Whoops 1.0.10.
There are no known issues that resemble anything like you tell.

If you would be willing to debug this, I could guide you on what to do.
To begin with, it seems that the Whoops is not being registered as a handler at some point in the runtime of your application. Could you play search around, see if anything in your application does anything with set_error_handler or restore_error_handler?

@goharsahi

This comment has been minimized.

Show comment Hide comment
@goharsahi

goharsahi Feb 23, 2014

your help is much appreciated. I'll look around. In the meanwhile, I've pasted the stack trace of last error, not displayed by whoops. http://laravel.io/bin/Y2V6

where can I find set_error_handler? I'm just a couple of months into frameworks as such.

your help is much appreciated. I'll look around. In the meanwhile, I've pasted the stack trace of last error, not displayed by whoops. http://laravel.io/bin/Y2V6

where can I find set_error_handler? I'm just a couple of months into frameworks as such.

@goharsahi

This comment has been minimized.

Show comment Hide comment
@goharsahi

goharsahi Feb 23, 2014

ok, found quite a few instances of set_error_handler

E:\My Data\htdocs\laravel4\compliance\vendor\filp\whoops\src\Whoops\Run.php:
110 class_exists("\Whoops\Exception\Inspector");
111
112: set_error_handler(array($this, self::ERROR_HANDLER));

ok, found quite a few instances of set_error_handler

E:\My Data\htdocs\laravel4\compliance\vendor\filp\whoops\src\Whoops\Run.php:
110 class_exists("\Whoops\Exception\Inspector");
111
112: set_error_handler(array($this, self::ERROR_HANDLER));

@goharsahi

This comment has been minimized.

Show comment Hide comment
@goharsahi

goharsahi Feb 23, 2014

To give you further insight, this is precisely what I was coding when the whoops pages first disappeared.

http://laravel.io/bin/mWxq

Wonder anything wrong I did here thats a no no in laravel 4.

To give you further insight, this is precisely what I was coding when the whoops pages first disappeared.

http://laravel.io/bin/mWxq

Wonder anything wrong I did here thats a no no in laravel 4.

@denis-sokolov

This comment has been minimized.

Show comment Hide comment
@denis-sokolov

denis-sokolov Feb 23, 2014

Collaborator

I'm sorry, after reviewing everything, I'm no closer to the solution.
I am afraid this is something misconfigured in your project and you'll have to solve it on your own, unless you manage to provide exact steps to reproduce the problem on a fresh installation of Laravel. :(

Collaborator

denis-sokolov commented Feb 23, 2014

I'm sorry, after reviewing everything, I'm no closer to the solution.
I am afraid this is something misconfigured in your project and you'll have to solve it on your own, unless you manage to provide exact steps to reproduce the problem on a fresh installation of Laravel. :(

@goharsahi

This comment has been minimized.

Show comment Hide comment
@goharsahi

goharsahi Feb 23, 2014

Ok, I'll try to do that and get back to you. Thanks for your time and help.

Ok, I'll try to do that and get back to you. Thanks for your time and help.

@goharsahi

This comment has been minimized.

Show comment Hide comment
@goharsahi

goharsahi Feb 24, 2014

i've finally traced the issue. I had following code in my routes.php.

App::error(function(NotFoundHttpException $e)
{
    return View::make('Not Found', 404);
});

i've finally traced the issue. I had following code in my routes.php.

App::error(function(NotFoundHttpException $e)
{
    return View::make('Not Found', 404);
});
@denis-sokolov

This comment has been minimized.

Show comment Hide comment
@denis-sokolov

denis-sokolov Feb 24, 2014

Collaborator

Ah, so you have installed your own error handler, I see.
I am glad that you have found the issue!

Collaborator

denis-sokolov commented Feb 24, 2014

Ah, so you have installed your own error handler, I see.
I am glad that you have found the issue!

@Anahkiasen

This comment has been minimized.

Show comment Hide comment
@Anahkiasen

Anahkiasen Feb 24, 2014

Contributor

Well that makes sense no, if you catch the Exception, then there's no reason for Whoops to trigger is there ?

Contributor

Anahkiasen commented Feb 24, 2014

Well that makes sense no, if you catch the Exception, then there's no reason for Whoops to trigger is there ?

@goharsahi

This comment has been minimized.

Show comment Hide comment
@goharsahi

goharsahi Feb 24, 2014

Actually, like I mentioned, I'm still new to Laravel. And I didn't know how whoops operates. Thats one step up the learning curve though.

Another thing I found though. I've got this code in app/start/global.php

App::error(function(Exception $exception, $code)
{
    Log::error($exception);
});

And then I have this another piece in my routes.php

App::error(function(Exception $e)
{
    Log::error($e);
});

Isn't this redundancy?

Actually, like I mentioned, I'm still new to Laravel. And I didn't know how whoops operates. Thats one step up the learning curve though.

Another thing I found though. I've got this code in app/start/global.php

App::error(function(Exception $exception, $code)
{
    Log::error($exception);
});

And then I have this another piece in my routes.php

App::error(function(Exception $e)
{
    Log::error($e);
});

Isn't this redundancy?

@denis-sokolov

This comment has been minimized.

Show comment Hide comment
@denis-sokolov

denis-sokolov Feb 24, 2014

Collaborator

I think you should really seek some help on Laravel about this.

Collaborator

denis-sokolov commented Feb 24, 2014

I think you should really seek some help on Laravel about this.

@goharsahi

This comment has been minimized.

Show comment Hide comment
@goharsahi

goharsahi Feb 24, 2014

ok, thanks alot for your help and time. .

ok, thanks alot for your help and time. .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment