On opening a certain product page, we are getting the following error

"exception":"[object] (Zend\\Http\\Header\\Exception\\InvalidArgumentException(code: 0): Invalid header value detected at /app/6l7tzyfknugxk/vendor/zendframework/zend-http/src/Header/GenericHeader.php:53)"

We cannot find anything wrong in the product info in the admin.

  • Did you install any new modules? This can probably cause problems, for example an older version of LiteMage Commented Jun 15, 2021 at 10:34
  • We don't have Litemage installed
    – GenZ Dev
    Commented Jun 15, 2021 at 10:37

2 Answers 2


Check the names of your products, maybe it contains special characters, or your header in the product contains some special characters.

  • Is there any way to debug this? As far as I know headers are validated in Zend's GenericHeader class. But we cannot override it to add logs.
    – GenZ Dev
    Commented Jun 16, 2021 at 6:15
  • We just removed all the content of the product and added back and it resolved the issue. I think there were invisible spaces added while creating the product. For someone who is facing this I recommend to create the product again,
    – GenZ Dev
    Commented Jun 16, 2021 at 10:05

It's easy to debug, and the reasons can be different.

Go to:


Add var_dump in this part:

if (! HeaderValue::isValid($parts[1])) {
    throw new Exception\InvalidArgumentException('Invalid header value detected');

Check what exactly is not correct and fix it.

In my case, it was empty char at the end string of base_url

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.