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] "ReferenceError: Buffer is not defined" when datasetToBlob is called #3588

Closed
dxlin opened this issue Aug 9, 2023 · 3 comments
Closed
Labels
Awaiting Reproduction Can we reproduce the reported bug?

Comments

@dxlin
Copy link
Contributor

dxlin commented Aug 9, 2023

Describe the Bug

"ReferenceError: Buffer is not defined" when datasetToBlob is called (i.e. export RT report).

Steps to Reproduce

  1. Start viewer
  2. Select Water Phantom study (or any with CT and PT) in TMTV mode
  3. Create "New Label" on right right
  4. Select "Rectangle ROI Threshold Tool"
  5. Create arbitrary rectangle in axial PT viewport
  6. Click "Run"
  7. Click "Create RT Report"

The current behavior

Due to "ReferenceError: Buffer is not defined" when datasetToBlob is called, application fails to create a file to be saved to local directory.

The expected behavior

File blob should be create from datasetToBlob, which can then be used to download file.

OS

Windows 10

Node version

18.16.0

Browser

Edge v115.0.1901.188

@dxlin dxlin added the Awaiting Reproduction Can we reproduce the reported bug? label Aug 9, 2023
@sedghi
Copy link
Member

sedghi commented Aug 16, 2023

yeah buffer is in node, you should add the Buffer as dependency, see the @cornerstonejs/adapters

@dxlin
Copy link
Contributor Author

dxlin commented Aug 16, 2023

I've tried adding "buffer" as a dependency to package.json as well as to:
extensions\default\package.json
extensions\tmtv\package.json
extensions\cornerstone-dicom-sr\package.json

But ended up with the same error. I did find a possible solution and made a PR:
#3590

@sedghi
Copy link
Member

sedghi commented Oct 3, 2023

I can't reproduce this, please re-open if the issue persists

@sedghi sedghi closed this as completed Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Reproduction Can we reproduce the reported bug?
Projects
None yet
Development

No branches or pull requests

2 participants