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

File helper: Error: Can't set headers after they are sent. #229

Closed
dagardner-nv opened this issue Aug 4, 2023 · 1 comment
Closed

File helper: Error: Can't set headers after they are sent. #229

dagardner-nv opened this issue Aug 4, 2023 · 1 comment
Assignees
Labels
bug Something isn't working released

Comments

@dagardner-nv
Copy link

Describe the bug
Using the file helper in 0.14.1 (works in 0.9) gives me this error:

Error: Can't set headers after they are sent.
    at SendStream.headersAlreadySent 

To Reproduce
Steps to reproduce the behavior:

  1. Mock File Content
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8

{{file path="../tests_data/filter_probs.jsonlines"}}
  1. Folder Structure mocks/api/v1/data-lines/GET.mock
  2. Error Stack Trace
2023-08-04 10:12:14 debug: Using new line as \n 
2023-08-04 10:12:14 debug: Response Status set to 200 
2023-08-04 10:12:14 debug: Headers Set Content-Type:  text/plain;charset=UTF-8 
2023-08-04 10:12:14 debug: HTTP GET /api/v1/data-lines :: Query Parameters: {} | Request Headers {"host":"localhost:8080","user-agent":"curl/8.1.2","accept":"*/*"} | Request Body {} 
Error: Can't set headers after they are sent.
    at SendStream.headersAlreadySent (/home/dagardner/work/conda/envs/morpheus/lib/node_modules/camouflage-server/node_modules/send/index.js:386:13)
    at SendStream.send (/home/dagardner/work/conda/envs/morpheus/lib/node_modules/camouflage-server/node_modules/send/index.js:613:10)
    at onstat (/home/dagardner/work/conda/envs/morpheus/lib/node_modules/camouflage-server/node_modules/send/index.js:725:10)
    at FSReqCallback.oncomplete (node:fs:209:5)

Expected behavior
Return file contents

Desktop (please complete the following information):

  • OS: Debian Bullseye
  • Browser curl
  • Version 8.1.2

Additional context
camouflage.log
https://github.com/dagardner-nv/Morpheus/blob/david-rest-source-sink/tests/tests_data/filter_probs.jsonlines

@github-actions
Copy link

github-actions bot commented Aug 5, 2023

🎉 This issue has been resolved in version 0.14.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

rapids-bot bot pushed a commit to nv-morpheus/Morpheus that referenced this issue Sep 18, 2023
…1195)

* Adopt camouflage-server 0.15, previously we've been locked on v0.9 due to outstanding bugs introduced in versions 0.10 - 0.14.1 :
  - testinggospels/camouflage#203
  - testinggospels/camouflage#223  
  - testinggospels/camouflage#227
  - testinggospels/camouflage#229
* Includes unrelated fix to running CI locally
* Restrict mlflow to versions prior to 2.7

closes #967
Fixes #1192

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md).
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Christopher Harris (https://github.com/cwharris)

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

No branches or pull requests

2 participants