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

Symfony Exception instead of Ignition in Laravel 9 #48

Closed
moisish opened this issue Feb 23, 2022 · 9 comments
Closed

Symfony Exception instead of Ignition in Laravel 9 #48

moisish opened this issue Feb 23, 2022 · 9 comments

Comments

@moisish
Copy link

moisish commented Feb 23, 2022

For some reason, the errors on my server don't show the ignition error page

image

@innocenzi
Copy link
Contributor

innocenzi commented Feb 24, 2022

Same thing, except I don't even have content.

EDIT: ah nevermind, found the content by scrolling actually

@innocenzi
Copy link
Contributor

innocenzi commented Feb 24, 2022

Looks like the error comes from here:

'shareableReport' => $viewModel->shareableReport(),

The actual issue might be in Spatie\FlareClient\Report (or ReportTrimmer).

EDIT:

@innocenzi
Copy link
Contributor

Related to this actually: spatie/laravel-ignition#35

@jazerix
Copy link

jazerix commented Feb 24, 2022

This too, is happening in my application after upgrading my Laravel application from 8 -> 9 today. Some exceptions seem to show the new page fine, others just trigger what others have posted:

image

Specifically, in my case, I was trying to dd a property on an object that didn't exist.


Edit: I've created a new Laravel application where I was able to reproduce the error; you can check the repository here: https://github.com/jazerix/ignition-symfony-exception

Going to the root renders the Symfony exception page without styling :)


Edit 2: After some initial investigation it looks like under certain circumstances the Symfony exception page is being rendered inside ignition causing the issue.

@moisish
Copy link
Author

moisish commented Feb 25, 2022

The problem seems to be on this line https://github.com/spatie/flare-client-php/blob/main/src/Report.php#L323

On the laravel application @jazerix created if you encode and dump the stracktrace it returns Symfony's error page

    public function toArray(): array
    {
        dd(json_encode($this->stracktraceAsArray()));

image

@jazerix
Copy link

jazerix commented Feb 25, 2022

@moisish I do think I've found the actual problem if you look at my PR #51 :)

@AlexVanderbist
Copy link
Member

Thanks you all for your input so far. We're currently looking into this and this is a huge help. Let's continue this discussion in PR #51 👍

@AlexVanderbist
Copy link
Member

As a quick update: I've tagged spatie/flare-client-php 1.0.3 that includes a fix for most of these issues. Running composer update will pull in this fix!

@moisish
Copy link
Author

moisish commented Feb 25, 2022

Thanks @AlexVanderbist

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

4 participants