0

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.

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

2 Answers 2

1

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

2
  • 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
    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
    Jun 16, 2021 at 10:05
0

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

Go to:

vendor/zendframework/zend-http/src/Header/GenericHeader.php:53

Add var_dump in this part:

if (! HeaderValue::isValid($parts[1])) {
    var_dump($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 that you have read and understand our privacy policy and code of conduct.

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