Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Weasis Integration failing with error "DOMException: An invalid or illegal string was specified

116 views
Skip to first unread message

Ananth Vishwamurthy

unread,
Mar 4, 2025, 10:38:00 AMMar 4
to dcm4che
We have setup a DCM4CHEE instance (Version 5.32 and NOT secure) on windows and trying to enable Weasis viewer integration. As per the instructions on integration wiki page, the below properties are configured

IID_PATIENT_URL=weasis://$dicom:rs --url "http://127.0.0.1:8080{{qidoBasePath}}" -r "patientID={{patientID}}" --query-ext "&includedefaults=false"
IID_STUDY_URL=weasis://$dicom:rs --url "http://127.0.0.1:8080{{qidoBasePath}}" -r "studyUID={{studyUID}}" --query-ext "&includedefaults=false"
IID_URL_TARGET=_self


However when we try to launch the study, we are getting the below error on the browser console:

Prepared URL:  weasis://$dicom:rs --url "http://127.0.0.1:8080/dcm4chee-arc/aets/DCM4CHEE/rs" -r "patientID=556342B^^^DCM4CHEE.F7449213.0DA2E1E6" --query-ext "&includedefaults=false" main.bf03ee3da83f8c5d.js:3:1950025
ERROR DOMException: An invalid or illegal string was specified
    openViewer http://127.0.0.1:8080/dcm4chee-arc/ui2/en/main.bf03ee3da83f8c5d.js:3
    __tryOrUnsub http://127.0.0.1:8080/dcm4chee-arc/ui2/en/main.bf03ee3da83f8c5d.js:3
    next http://127.0.0.1:8080/dcm4chee-arc/ui2/en/main.bf03ee3da83f8c5d.js:3
    _next http://127.0.0.1:8080/dcm4chee-arc/ui2/en/main.bf03ee3da83f8c5d.js:3



We have also tried to change the properties with url encoding to as below, in which case there is no error in the browser console and the Weasis viewer opens, but the study is not getting loaded.

IID_PATIENT_URL=weasis://$dicom%3Ars --url "http://127.0.0.1:8080{{qidoBasePath}}" -r "patientID={{patientID}}" --query-ext "&includedefaults=false"
IID_STUDY_URL=weasis://$dicom%3Ars --url "http://127.0.0.1:8080{{qidoBasePath}}" -r "studyUID={{studyUID}}" --query-ext "&includedefaults=false"
IID_URL_TARGET=_self



With the above properties, we see the below error in Weasis logs:

04.03.2025 21:01:58.119 *ERROR* [AWT-EventQueue-0] org.weasis.launcher.WeasisLauncher: Execute commandjava.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.weasis.launcher.WeasisLauncher.commandSessionExecute(WeasisLauncher.java:585)
Caused by: org.apache.felix.gogo.runtime.SyntaxError: bad expression: dicom%3Ars
at org.apache.felix.gogo.runtime.Expander.expandExp(Expander.java:922)
at org.apache.felix.gogo.runtime.Expander.doExpand(Expander.java:687)
at org.apache.felix.gogo.runtime.Expander.expand(Expander.java:120)


Can someone please help rectify the issue?

Ga Rt

unread,
Mar 7, 2025, 10:43:56 AMMar 7
to dcm4che
Hello, i'm having a similar problem. On multiple machines (Windows 10 and Windows 11), when we click on the eye to launch Weasis from the UI (dcm4chee arc light psql 5.32.0 secure), nothing happens, and when we inspect the page, it returns the same error "ERROR DOMException: An invalid or illegal string was specified".
Strangely, it works on Debian with GNOME and a few machine running Windows 7 and Server 2016.

Any help ? Thanks.

Ga Rt

unread,
Mar 10, 2025, 7:39:44 AMMar 10
to dcm4che
After further investigations, we find out that the problem comes from new security protocols in Firefox, Edge and Chrome. Any chance to get a fixed URL Nicolas ? Thanks.

Nicolas Roduit

unread,
Mar 23, 2025, 3:00:30 PMMar 23
to dcm4che
See how to solve this issue with #4592 (comment)

Ananth Vishwamurthy

unread,
Apr 21, 2025, 2:28:59 PM (3 days ago) Apr 21
to dcm4che
Thanks very much for the solution!

We also found another alternative solution, which is to set IID_ENCODE to false and manually encode the URL.
Below is the working configuration for us:

IID_ENCODE=false
IID_STUDY_URL=weasis://%24dicom%3Ars%20--url%20%22http%3A%2F%2Flocalhost%3A8080{{qidoBasePath}}%22%20-r%20%22studyUID%3D{{studyUID}}%22%20--query-ext%20%22%26includedefaults%3Dfalse%22%20-H%20%22Authorization%3A%20Bearer%20{{access_token}}%22
Reply all
Reply to author
Forward
0 new messages