Support the ongoing development of Laravel.io →
posted 10 years ago
Architecture
Last updated 2 years ago.
0

How did you install your laravel? through git or composer?

Last updated 2 years ago.
0

I installed via composer. I've had it working for a week give or take. I made some changes that broke it. I had this happen before and it was a route closure I'd done wrong but it showed up right after making the change so it was easy enough to find.

This most recent problem I probably made just before quitting for the day. When I came back to it two days later, I couldn't recall what I'd done last. All other errors I've been able to figure out eventually but this one leaves no clues as to where it's coming from.

Last updated 2 years ago.
0

I'm also getting a similar error. Any ideas?

Last updated 2 years ago.
0

Try updating superclousure , its being used for serializing the closures to be used in queues.

Last updated 2 years ago.
0

I resorted to creating a new empty Laravel project then adding pieces back until I found what caused the error. I finally found it in a model with an appends where the appended item had an error in it. (A stray character!) When I removed the function from the appends, the error came to light readily. Delete the offending character, replace the function in the appends array and all was well. All with only three days lost! Phenomenal!

What's frustrating is that the error was of no use in debugging since it didn't point anywhere. And though it did turn out to be the file I'd been most recently working on, because it was caused by a stray character in a function I hadn't been working on, I didn't see it. Until now Laravel's errors have always been informative but this one was just dumb. Maybe it's not a place where an error should normally occur?

Last updated 2 years ago.
0

You might also check the app\storage\logs\laravel.log file it sometimes has more info

Last updated 2 years ago.
0

Almost every time I make an error now, I get this message instead of the normal whoops page. I had looked at the log files and nothing was being reported there. Thinking about this eventually lead me to check the my app\start\global.php file.

Sure enough, I'd placed a custom ~~~App::error~~~ function in there that as attempting to ~~~Log::error($exception);~~~ which is where the odd error was coming from. Somewhere along the line this line of code that hadn't caused trouble before (probably because it wasn't actually being used) started failing.

Since "Serialization of 'Closure' is not allowed" doesn't include a stack trace, you can't see where the error originates. Of course, I thought the error was coming from the page I was working on but it turned out it was error handling I'd forgotten about that was causing it.

Hopefully this helps someone else down the road.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

BRupholdt brupholdt Joined 31 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.