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

wont open all files #136

Closed
howudodat opened this issue Dec 11, 2024 · 3 comments · Fixed by #138 or #139
Closed

wont open all files #136

howudodat opened this issue Dec 11, 2024 · 3 comments · Fixed by #138 or #139
Assignees
Labels
bug Something isn't working

Comments

@howudodat
Copy link

Describe the bug
The viewer opens some reports an not others. Header appears and the infinite progress appears

To Reproduce
I dont know how to create an anonymized report. I can grant access to one that does not work

Expected behavior
Report should open

Screenshots
If applicable, add screenshots to help explain your problem.

Client details:

  • OS: linux
  • Browser chrome
  • Version Version 131.0.6778.108 (Official Build) (64-bit)
  • Device: desktop
Server details

DICOM viewer app version:
Version 2.2.1

Operating system:
Ubuntu 22.04

Web server:
Apache

Database:
Server version: 10.6.18-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04

PHP version:
PHP 8.1.2-1ubuntu2.19 (cli) (built: Sep 30 2024 16:25:25) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2-1ubuntu2.19, Copyright (c), by Zend Technologies

Nextcloud version:
Nextcloud Hub 8 (29.0.9)

Logs

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

Browser log

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src http: * 'unsafe-eval' 'wasm-unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-45SAfnQC/M9txmdh1Vq45KH3DqD7anr9dixOvVciBvM='), or a nonce ('nonce-...') is required to enable inline execution.
Understand this errorAI
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name UINotificationService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name UIModalService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name UIDialogService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name UIViewportDialogService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name MeasurementService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name DisplaySetService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name ToolBarService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name ViewportGridService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name HangingProtocolService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name CineService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name UserAuthenticationService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name CornerstoneViewportService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name ToolGroupService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name SyncGroupService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name SegmentationService
app.bundle.21cb1cf02287a78c77cd.js:2 Registering old name CornerstoneCacheService
/benchmarks/d-intel.json:1 
        
        
       Failed to load resource: the server responded with a status of 404 (Not Found)Understand this errorAI
app.bundle.21cb1cf02287a78c77cd.js:2 CornerstoneRender: Using detect-gpu to get the GPU benchmark: Object
app.bundle.21cb1cf02287a78c77cd.js:2 CornerstoneRender: using GPU rendering
app.bundle.21cb1cf02287a78c77cd.js:2 New '[email protected]' source added.
10app.bundle.21cb1cf02287a78c77cd.js:2 New measurement mapping added to source '[email protected]'.
app.bundle.21cb1cf02287a78c77cd.js:2 react-i18next:: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.
s @ app.bundle.21cb1cf02287a78c77cd.js:2Understand this warningAI
app.bundle.21cb1cf02287a78c77cd.js:2 using... touch backend? true
/assets/android-chrome-144x144.png:1 
        
        
       Failed to load resource: the server responded with a status of 404 (Not Found)Understand this errorAI
dicomjson:1 Error while trying to use the following icon from the Manifest: https://collab.earthbest.com/assets/android-chrome-144x144.png (Download error or resource isn't a valid image)Understand this errorAI
3app.bundle.21cb1cf02287a78c77cd.js:2 using... touch backend? true
738.bundle.5ec451d55b7e1e08a925.js:1 No mrn found for Array(1)
app.bundle.21cb1cf02287a78c77cd.js:2 Error: Unable to query for SeriesMetadata without StudyInstanceUID
    at Object.metadata (738.bundle.5ec451d55b7e1e08a925.js:1:17341)
    at app.bundle.21cb1cf02287a78c77cd.js:2:29208
    at Array.map (<anonymous>)
    at B.init.servicesManager (app.bundle.21cb1cf02287a78c77cd.js:2:29182)
    at app.bundle.21cb1cf02287a78c77cd.js:2:29596
    at app.bundle.21cb1cf02287a78c77cd.js:2:29664
    at kl (app.bundle.21cb1cf02287a78c77cd.js:2:4179858)
    at t.unstable_runWithPriority (app.bundle.21cb1cf02287a78c77cd.js:2:4296363)
    at qa (app.bundle.21cb1cf02287a78c77cd.js:2:4120493)
    at xl (app.bundle.21cb1cf02287a78c77cd.js:2:4179321)
(anonymous) @ app.bundle.21cb1cf02287a78c77cd.js:2Understand this errorAI
app.bundle.21cb1cf02287a78c77cd.js:2 TypeError: Cannot destructure property 'StudyInstanceUID' of 'e[0]' as it is undefined.
    at Object.addInstances (app.bundle.21cb1cf02287a78c77cd.js:2:722334)
    at 738.bundle.5ec451d55b7e1e08a925.js:1:17829
    at Array.forEach (<anonymous>)
    at Object.metadata (738.bundle.5ec451d55b7e1e08a925.js:1:17644)
    at app.bundle.21cb1cf02287a78c77cd.js:2:29208
    at Array.map (<anonymous>)
    at B.init.servicesManager (app.bundle.21cb1cf02287a78c77cd.js:2:29182)
    at app.bundle.21cb1cf02287a78c77cd.js:2:29596
    at app.bundle.21cb1cf02287a78c77cd.js:2:29664
    at kl (app.bundle.21cb1cf02287a78c77cd.js:2:4179858)
(anonymous) @ app.bundle.21cb1cf02287a78c77cd.js:2Understand this errorAI
app.bundle.21cb1cf02287a78c77cd.js:2 studyToDisplaySetsLoaded: 11.2880859375 ms
738.bundle.5ec451d55b7e1e08a925.js:1 No mrn found for Array(1)0: {accession: false, date: false, description: false, instances: 1, modalities: false, …}length: 1[[Prototype]]: Array(0)
app.bundle.21cb1cf02287a78c77cd.js:2 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'StudyInstanceUID')
    at app.bundle.21cb1cf02287a78c77cd.js:2:671434
    at Array.find (<anonymous>)
    at he.setActiveStudyUID (app.bundle.21cb1cf02287a78c77cd.js:2:671423)
    at he.run (app.bundle.21cb1cf02287a78c77cd.js:2:671572)
    at app.bundle.21cb1cf02287a78c77cd.js:2:29544Understand this errorAI
@howudodat howudodat added the bug Something isn't working label Dec 11, 2024
@ayselafsar
Copy link
Owner

@howudodat Thanks for reporting! Could you please send the access information to [email protected]?

@lexxai
Copy link

lexxai commented Dec 19, 2024

Perhaps you mean that most .js files are blocked by a content security policy (CSP) of NextCloud?

content-security-policy | default-src  'none';base-uri 'none';manifest-src 'self';script-src http: *  'unsafe-eval' 'wasm-unsafe-eval';style-src http: *  'unsafe-inline';img-src data: http: *;font-src data: http: *;connect-src  http: *;frame-src http: *;child-src http: *;frame-ancestors http:  *;worker-src http: *

I'm trying to solve the problem by adding to the “nginx.conf” file for php location

add_header Content-Security-Policy "font-src  data: http: * 'unsafe-inline'; default-src 'self'; script-src http: * 'unsafe-inline' 'unsafe-eval'

зображення

ayselafsar added a commit that referenced this issue Dec 24, 2024
- Encode url path segments
@ayselafsar
Copy link
Owner

ayselafsar commented Dec 24, 2024

@lexxai This is another issue caused by DICOMDIR file which is missing required tags such as Study Instance UID, and fixed here.

Please note that CSP errors are related to how your nextcloud files are served. We already added CSP rules at application level here, but your reverse proxy (nginx) probably overrides them, so you should manually add them in your reverse proxy configuration. Hope this helps.

ayselafsar added a commit that referenced this issue Dec 24, 2024
@ayselafsar ayselafsar self-assigned this Dec 24, 2024
ayselafsar added a commit that referenced this issue Dec 24, 2024
ayselafsar added a commit that referenced this issue Dec 24, 2024
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
None yet
3 participants