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

Getting error "Serialization of 'Closure' is not allowed" when notification fails over queue. #215

Open
rahul-jha-superyouclub opened this issue Jan 11, 2025 · 1 comment

Comments

@rahul-jha-superyouclub
Copy link

Stack Trace:

{
    "message": "Serialization of 'Closure' is not allowed",
    "exception": "Exception",
    "file": "vendor/laravel/framework/src/Illuminate/Queue/Queue.php",
    "line": 160,
    "trace": [
        {
            "file": "vendor/laravel/framework/src/Illuminate/Queue/Queue.php",
            "line": 160,
            "function": "serialize"
        },
        {
            "file": "vendor/laravel/framework/src/Illuminate/Queue/Queue.php",
            "line": 129,
            "function": "createObjectPayload",
            "class": "Illuminate\\Queue\\Queue",
            "type": "->"
        },
        {
            "file": "vendor/laravel/framework/src/Illuminate/Queue/Queue.php",
            "line": 107,
            "function": "createPayloadArray",
            "class": "Illuminate\\Queue\\Queue",
            "type": "->"
        },
        {
            "file": "vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php",
            "line": 71,
            "function": "createPayload",
            "class": "Illuminate\\Queue\\Queue",
            "type": "->"
        },
        {
            "file": "vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php",
            "line": 56,
            "function": "executeJob",
            "class": "Illuminate\\Queue\\SyncQueue",
            "type": "->"
        },
        {
            "file": "vendor/laravel/framework/src/Illuminate/Queue/Queue.php",
            "line": 59,
            "function": "push",
            "class": "Illuminate\\Queue\\SyncQueue",
            "type": "->"
        },
        {
            "file": "vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php",
            "line": 633,
            "function": "pushOn",
            "class": "Illuminate\\Queue\\Queue",
            "type": "->"
        },
        {
            "file": "vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php",
            "line": 552,
            "function": "queueHandler",
            "class": "Illuminate\\Events\\Dispatcher",
            "type": "->"
        },
        {
            "file": "vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php",
            "line": 478,
            "function": "Illuminate\\Events\\{closure}",
            "class": "Illuminate\\Events\\Dispatcher",
            "type": "->"
        },
        {
            "file": "vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php",
            "line": 286,
            "function": "Illuminate\\Events\\{closure}",
            "class": "Illuminate\\Events\\Dispatcher",
            "type": "->"
        },
        {
            "file": "vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php",
            "line": 266,
            "function": "invokeListeners",
            "class": "Illuminate\\Events\\Dispatcher",
            "type": "->"
        },
        {
            "file": "vendor/laravel-notification-channels/fcm/src/FcmChannel.php",
            "line": 67,
            "function": "dispatch",
            "class": "Illuminate\\Events\\Dispatcher",
            "type": "->"
        },
        {
            "file": "vendor/laravel-notification-channels/fcm/src/FcmChannel.php",
            "line": 57,
            "function": "dispatchFailedNotification",
            "class": "NotificationChannels\\Fcm\\FcmChannel",
            "type": "->"
        },
        {
            "file": "vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php",
            "line": 257,
            "function": "NotificationChannels\\Fcm\\{closure}",
            "class": "NotificationChannels\\Fcm\\FcmChannel",
            "type": "->"
        },
        {
            "file": "vendor/laravel-notification-channels/fcm/src/FcmChannel.php",
            "line": 57,
            "function": "each",
            "class": "Illuminate\\Support\\Collection",
            "type": "->"
        },
        {
            "file": "vendor/laravel-notification-channels/fcm/src/FcmChannel.php",
            "line": 47,
            "function": "checkReportForFailures",
            "class": "NotificationChannels\\Fcm\\FcmChannel",
            "type": "->"
        },
        {
            "function": "NotificationChannels\\Fcm\\{closure}",
            "class": "NotificationChannels\\Fcm\\FcmChannel",
            "type": "->"
        },
        ...
        ...
        ...
    ]
}
@dwightwatson
Copy link
Collaborator

Not sure what's going on here. Do you have anything interesting configuration on your queue? Does it affect other queue drivers? Can you narrow down environment that causes this error? Open to PRs.

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

2 participants