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 ContextErrorException : unserialize Error at offset (DataCollector) - Error 500 when debug enabled #22231

Closed
Tracked by #17598
ghost opened this issue Dec 3, 2020 · 14 comments · Fixed by #22579 or #22688
Assignees
Labels
1.7.7.0 Affects versions BO Category: Back Office Bug Type: Bug Fixed Resolution: issue closed because fixed migration symfony migration project Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Nice-to-have Kanban prioritization: issue could be included in next version Order Component: Which BO section is concerned
Milestone

Comments

@ghost
Copy link

ghost commented Dec 3, 2020

Describe the bug

Error 500 when debug enabled php 7.3.25, if i use php 7.2 no error

Steps to Reproduce

  1. Make a new installation.

  2. Enable Debug Mode

  3. Use php 7.3.25

  4. Go to the orders list (look at the error)

  5. Go to the customers list (look at the error)

  6. Go to the categorys list (look at the error)

  7. Now go to the product list there are no error

Configuration

I use a server with Plesk on debian

Capture d’écran de 2020-12-04 00-25-06

Error in console Tab

Capture d’écran de 2020-12-04 00-25-37

Error in Network Tab

A lot of memory

Capture d’écran de 2020-12-04 00-25-46

Additional information

I found a similar issue #16873

I don't have this error on all new controller.

CRITICAL00:53:28 | php | Uncaught Notice: unserialize(): Error at offset 315894 of 1800983 bytes
-- | -- | --
CRITICAL00:53:28 | request | Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: "Notice: unserialize(): Error at offset 315894 of 1800983 bytes" at /var/www/vhosts/ee.wtf/httpdocs/1770/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php line 56
  • PrestaShop version: 1.7.7.0
  • PHP version: 7.3.25
@matks
Copy link
Contributor

matks commented Dec 4, 2020

Hi @okom3pom so you have multiple different issues here 😄

  • the JS error is because you are GDPR module V1.2.0 which is not compatible with PS 1.7.7.0 ; you need the v1.2.1
  • the HTTP 500 issue I dont know, we need more infos
  • the Uncaught Notice: unserialize(): Error at offset 315894 of 1800983 bytes is Symfony debug tools trying to serialize your data to present them into the Symfony Debug bar and failing because you have too much data 😄

@ghost
Copy link
Author

ghost commented Dec 4, 2020

Hi @matks for the js i open an other issue : #22232

The error 500 is only when i use php 7.3

@ghost
Copy link
Author

ghost commented Dec 4, 2020

I work on a new install

@florine2623
Copy link
Contributor

Hi @okom3pom & @matks ,
I did manage to reproduce the same issue on PS 1.7.7.0 fresh install + PHP 7.3 + debug mode ON.

Debug mode OFF, no error 500 :
Capture d’écran 2020-12-04 à 11 42 26

Debug mode ON :
Capture d’écran 2020-12-04 à 11 42 33
Capture d’écran 2020-12-04 à 11 42 43
Capture d’écran 2020-12-04 à 11 43 57

I’ll add this to the debug backlog so that it’s fixed.
If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks.

@florine2623 florine2623 added 1.7.7.0 Affects versions BO Category: Back Office Bug Type: Bug Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Order Component: Which BO section is concerned Ready Status: Issue is ready to be worked on labels Dec 4, 2020
@ghost
Copy link
Author

ghost commented Dec 4, 2020

Hi @florine2623 i think it's a migration page problem not only in the order page, the label migration is better?

And i don't understand why I haven't seen this when i tested the beta and RC

I try on a RC when i have the time

@florine2623
Copy link
Contributor

@okom3pom I will add migration label also, thanks!

I have tested this on beta1, beta2 and RC1, I have the same issue on the three fresh installs : PHP 7.3 + debug ON = error 500

Please see the screenshots below :
beta1 :
Capture d’écran 2020-12-04 à 15 14 56

beta2 :
Capture d’écran 2020-12-04 à 15 15 01

RC1 :
Capture d’écran 2020-12-04 à 15 15 06

The issue is present on the 3 previous versions.
Also, when clicking on the web profiler, here's the error :
Capture d’écran 2020-12-04 à 15 15 29

@marionf
Copy link
Contributor

marionf commented Dec 7, 2020

@hibatallahAouadni Could you check if it's a regression ?

@marionf marionf added NMI Status: issue needs more information and removed Ready Status: Issue is ready to be worked on labels Dec 7, 2020
@hibatallahAouadni hibatallahAouadni added TBR Status: issue to be reproduced and removed NMI Status: issue needs more information labels Dec 7, 2020
@hibatallahAouadni hibatallahAouadni self-assigned this Dec 7, 2020
@khouloudbelguith
Copy link
Contributor

Hi @marionf, @hibatallahAouadni,

The PS1.7.6.9 is not compatible with PHP7.3.

Thanks!

@matks
Copy link
Contributor

matks commented Dec 8, 2020

Hi, from what I see in the screenshots there is 2 issues:

  1. the JS error is this one BO - Error in console in order page  #18776 it is fixed when using GDPR module v1.2.1

  2. the HTTP 500 error you can see being displayed in the Console is Symfony Debug Bar that crashes because it tries to serialize an object too big and it crashes (not enough memory). This can happen with big orders data, but it's not an issue.

It's not an issue because it's just Symfony debug tool trying to compute some data to help the developer but the data is too big 😄 . Symfony is just too hungry and tries to process a data too big for it, nothing bad about that. The only consequence is that the request fail and the SF debug bar does not appear in debug mode.

@ghost
Copy link
Author

ghost commented Dec 8, 2020

Hi,

@matks i know 1.2.1 fix the JS error but the issue is :

#22232

If prestashop don't propose update i don't think merchant goes download zip from github and install the zip manualy .

This issue concern only the 500 in the Console.

@matks matks changed the title Error 500 when debug enabled php 7.3.25 Symfony ContextErrorException : unserialize Error at offset (DataCollector) - Error 500 when debug enabled Dec 8, 2020
@matks
Copy link
Contributor

matks commented Dec 8, 2020

I update the title to make it more accurate.

@hibatallahAouadni
Copy link
Contributor

Hello @marionf

As @khouloudbelguith mentioned above, it couldn't be a regression cause 1.7.6.9 is not compatible with 7.3.
So, I change the status to To Do, feel free to change it 😅

Thanks!

@hibatallahAouadni hibatallahAouadni removed their assignment Dec 8, 2020
@hibatallahAouadni hibatallahAouadni added Ready Status: Issue is ready to be worked on and removed TBR Status: issue to be reproduced labels Dec 8, 2020
@ghost
Copy link
Author

ghost commented Dec 8, 2020

I complete the Issue with :

Make a new installation.

Go to the orders list (look at the error)

Go to the customers list (look at the error)

Go to the categorys list (look at the error)

Now go to the product list there are no error

@matks say :

It's not an issue because it's just Symfony debug tool trying to compute some data to help the developer but the data is too big

But a lot of listing give an error and not a lot of datas

@marionf marionf added this to Backlog in PrestaShop 1.7.7.3 via automation Dec 9, 2020
@marionf marionf added the Nice-to-have Kanban prioritization: issue could be included in next version label Dec 14, 2020
@MatShir MatShir added Nice-to-have Kanban prioritization: issue could be included in next version and removed Nice-to-have Kanban prioritization: issue could be included in next version labels Dec 15, 2020
@marionf marionf added this to the 1.7.7.2 milestone Dec 23, 2020
@atomiix atomiix self-assigned this Dec 24, 2020
@atomiix atomiix moved this from Backlog to In progress in PrestaShop 1.7.7.3 Dec 24, 2020
@atomiix atomiix moved this from In progress to To be reviewed in PrestaShop 1.7.7.3 Dec 24, 2020
@matthieu-rolland matthieu-rolland moved this from To be reviewed to To be tested in PrestaShop 1.7.7.3 Dec 28, 2020
@khouloudbelguith khouloudbelguith added Fixed Resolution: issue closed because fixed and removed Ready Status: Issue is ready to be worked on labels Jan 4, 2021
@khouloudbelguith khouloudbelguith moved this from To be tested to To be merged in PrestaShop 1.7.7.3 Jan 4, 2021
@Progi1984
Copy link
Contributor

Fixed by #22688

PrestaShop 1.7.7.3 automation moved this from To be merged to Done Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.7.0 Affects versions BO Category: Back Office Bug Type: Bug Fixed Resolution: issue closed because fixed migration symfony migration project Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Nice-to-have Kanban prioritization: issue could be included in next version Order Component: Which BO section is concerned
Projects
No open projects
8 participants