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

[Bug]: Cannot set headers after they are sent to the client #6893

Open
1 of 3 tasks
marc-arnoult opened this issue Mar 17, 2023 · 1 comment
Open
1 of 3 tasks

[Bug]: Cannot set headers after they are sent to the client #6893

marc-arnoult opened this issue Mar 17, 2023 · 1 comment
Labels
bug Bug reports

Comments

@marc-arnoult
Copy link

Describe the Bug

Hi after upgrading our dependencies to ~2.7 @vue-storefront/middleware and @vue-storefront/magento (1.0.0)
we have this kind of errors on our testing environment : Cannot set headers after they are sent to the client.

Before that we were on @vue-storefront/middleware (2.5.4)
It seem to be pretty random, hard to reproduce. But it will block any new request from the client ( add to cart etc... )

Kind regards,

Marc

Current behavior

We can't add any product to cart, or interact with the application when this error appear ( Status 400 on the front ).

Expected behavior

The customer should be able to continue is journey on our website without having this kind of errors.

Steps to reproduce

No response

What version of Vue Storefront are you using?

2.7.1

What version of Node.js are you using?

16.19.0

What browser (and version) are you using?

Chrome 111.0.5563.64

What operating system (and version) are you using?

macOS

Relevant log output

  |   | 2023-03-17 10:38:48 | at processTicksAndRejections (node:internal/process/task_queues:96:5) |  
  |   | 2023-03-17 10:38:48 | at runMicrotasks (<anonymous>) |  
  |   | 2023-03-17 10:38:48 | at node_modules/@vue-storefront/middleware/lib/index.cjs.js:172:17 |  
  |   | 2023-03-17 10:38:48 | at ServerResponse.send (node_modules/express/lib/response.js:162:21) |  
  |   | 2023-03-17 10:38:48 | at ServerResponse.json (node_modules/express/lib/response.js:278:15) |  
  |   | 2023-03-17 10:38:48 | at ServerResponse.send (node_modules/express/lib/response.js:174:12) |  
  |   | 2023-03-17 10:38:48 | at ServerResponse.header (node_modules/express/lib/response.js:794:10) |  
  |   | 2023-03-17 10:38:48 | at ServerResponse.setHeader (node:_http_outgoing:576:11) |  
  |   | 2023-03-17 10:38:48 | at new NodeError (node:internal/errors:371:5) |  
  |   | 2023-03-17 10:38:48 |   |  
  |   | 2023-03-17 10:38:48 | ERROR  Cannot set headers after they are sent to the client

Able to fix / change the documentation?

  • Yes
  • No

Code of Conduct

  • I agree to follow this project's Code of Conduct
@marc-arnoult marc-arnoult added the bug Bug reports label Mar 17, 2023
@skirianov
Copy link
Contributor

Hi @marc-arnoult Dev Advocate Sergii here, so the only thing you did was to change to the middleware package am I right?

Is there any source code I could look at?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports
Projects
None yet
Development

No branches or pull requests

2 participants