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] "Failed to Execute 'postMessage' on Worker" in ultrasound study from a specific center #4078

Open
rmasad opened this issue May 2, 2024 · 9 comments
Labels
fixed-in-dev-await-release This issue is fixed in master (viewer-dev) but we are pending testing for release (viewer.ohif.org)

Comments

@rmasad
Copy link

rmasad commented May 2, 2024

Describe the Bug

I encountered an error while using the OHIF DICOM image viewer. When attempting to view an ultrasound study from a specific center, the following error occurred in the viewer:

Uncaught DOMException: Failed to execute 'postMessage' on 'Worker': #<Promise> could not be cloned.

Study Link: [Study Link Here]

This error seems to be related to a failure in executing the 'postMessage' function on a Worker. It's possible that there's an issue with the Promise object being passed as an argument, preventing it from being cloned properly.

This study works with OHIF v2.

Steps to Reproduce

  1. Open the OHIF DICOM image viewer.
  2. Load the ultrasound study from the provided link.
  3. Attempt to view the images.

The current behavior

Load with error and doesn't show the images

The expected behavior

The ultrasound study should load without any errors, and the images should be displayed correctly in the viewer.

OS

Ubuntu

Node version

18

Browser

Chrome 124

@sedghi
Copy link
Member

sedghi commented May 21, 2024

Seems like the issue is that the context getting passed to the worker has a promise which is the result of the palette metadata retrieval.

So instead of bluePaletteColorLookupTableData being numer[] it is a promise, which webworkers cannot handle, we should await those before decode.

I'm working on this

@sedghi sedghi added Bug Verified Bug reported, reproducible, and verified. and removed Awaiting Reproduction Can we reproduce the reported bug? labels May 21, 2024
@sedghi
Copy link
Member

sedghi commented May 21, 2024

BTW it says files not available in your link, can you re-upload your study?

@rmasad
Copy link
Author

rmasad commented May 21, 2024

Here it is: elevic-an.zip

@sedghi
Copy link
Member

sedghi commented May 22, 2024

It renders fine after my fix, i will merge it

CleanShot 2024-05-21 at 22 15 15@2x

@rmasad
Copy link
Author

rmasad commented May 22, 2024

Thanks @sedghi, we are waiting for when it's uploaded the change to test it.

@james-hanks
Copy link

#4110 parent issue

@arturojain
Copy link

arturojain commented May 28, 2024

I'm facing the same issue, I thought the problem was that I was missing sequence of ultrasound regions. I'm using DICOMJSON

@rmasad
Copy link
Author

rmasad commented May 28, 2024

Yesterday I had this same problem with a CT scan (but not in all series, in 3 out of 10)

@sedghi sedghi added fixed-in-dev-await-release This issue is fixed in master (viewer-dev) but we are pending testing for release (viewer.ohif.org) and removed Bug Verified Bug reported, reproducible, and verified. labels May 29, 2024
@sedghi
Copy link
Member

sedghi commented May 29, 2024

@rmasad please open a separate issue for ct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-dev-await-release This issue is fixed in master (viewer-dev) but we are pending testing for release (viewer.ohif.org)
Projects
None yet
Development

No branches or pull requests

4 participants