spatie / mailcoach-support

Questions and support for Mailcoach
https://mailcoach.app
31 stars 2 forks source link

unserialize(): Error at offset 0 of 56 bytes #235

Closed joostvanhoof closed 3 years ago

joostvanhoof commented 3 years ago

I get unserialize(): Error at offset 0 of 56 bytes multiple times when I'm creating and sending a campaign. Screenshot below of where it occurs, and these are the places that trigger the error:

\Spatie\Mailcoach\Http\App\Controllers\Campaigns\Draft\SendCampaignController
\Spatie\Mailcoach\Http\App\Controllers\Campaigns\Draft\CampaignDeliveryController
\Spatie\Mailcoach\Http\App\Controllers\Campaigns\Draft\CampaignSettingsController
Screenshot 2020-08-18 at 17 23 27
riasvdv commented 3 years ago

Is the exception thrown an ErrorException or something else?

joostvanhoof commented 3 years ago

Nope, just the message that you see in the screenshot.

riasvdv commented 3 years ago

Do you have any logs you could share? Should be in storage/logs/laravel.log

joostvanhoof commented 3 years ago

Nothing shows up in the logs...

riasvdv commented 3 years ago

Could you temporarily change the try-catch by this snippet?

        $unserialized = @unserialize($segmentClass);
        if ($unserialized !== false) {
            $segmentClass = $unserialized;
        }

If that fixes it then I'll add it to the next release, it seems like you can't try-catch unserialize errors

joostvanhoof commented 3 years ago

Thanks for looking into this. I have this running on production and I'm quite packed, is there a quick way to add this in production as this file is in the vendor folder?

joostvanhoof commented 3 years ago

Just a gentle reminder that I still get about 2 to 4 errors every time I create and send a campaign. As indicated in the previous comment I'm not too proficient in testing this in production so if you're able test, or have some instructions on how I can do this that would be much appreciated.

riasvdv commented 3 years ago

I will take a look at it again later this week

riasvdv commented 3 years ago

Should be fixed in 2.23.14