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

Error: Can't set headers after they are sent when using file handlebar in docker container #249

Open
jimpanzeeee opened this issue Mar 8, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jimpanzeeee
Copy link

Describe the bug
When using file handlebar with docker camouflage a "Error: Can't set headers after they are sent" occurs instead of the file being served.

To Reproduce
Steps to reproduce the behavior:

  1. Mock File Content
HTTP/1.1 200 OK
Content-Type: image/png

{{file path="./files/mr_man.png"}}
  1. Folder Structure camouflage/mocks/aws/s3/student-plans/GET.mock
  2. Error Stack Trace
camouflage                  | Error: Can't set headers after they are sent.
camouflage                  |     at SendStream.headersAlreadySent (/usr/local/lib/node_modules/camouflage-server/node_modules/send/index.js:386:13)
camouflage                  |     at SendStream.send (/usr/local/lib/node_modules/camouflage-server/node_modules/send/index.js:613:10)
camouflage                  |     at onstat (/usr/local/lib/node_modules/camouflage-server/node_modules/send/index.js:725:10)
camouflage                  |     at FSReqCallback.oncomplete (node:fs:199:5)

Expected behavior
The file is served.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: [macOS Ventura 13.3]
  • Browser [Using postman not a browser]
  • Version [Not sure what version I am meant to put here]

Additional context
Attach camouflage.log file

@jimpanzeeee jimpanzeeee added the bug Something isn't working label Mar 8, 2024
@jimpanzeeee
Copy link
Author

Ah I can see this has been fixed already, but maybe there hasn't been a docker image update with the same fix?

@jimpanzeeee
Copy link
Author

Yep - version in docker container is

/app # camouflage --version
0.12.0

Could we get a docker image update please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants