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] google healthcare communication #3833

Closed
niirdan opened this issue Dec 4, 2023 · 4 comments
Closed

[Bug] google healthcare communication #3833

niirdan opened this issue Dec 4, 2023 · 4 comments
Labels
Awaiting Reproduction Can we reproduce the reported bug?

Comments

@niirdan
Copy link

niirdan commented Dec 4, 2023

Describe the Bug

Comparing branches V3.7.0-beta.30 TO the stabled 3.7.0 \ MASTER branch I am facing issues with Authorization Errors coming from google healthcare api..

Steps to Reproduce

everything is set as written in docs regard to fetching data from gcp healthcare api - IN BRANCH V3.7.0-beta.30 EVERYTHING WORKS COMPLETLY FINE

The current behavior

After switching to a newer branch (and editing the google.js config file with my client id and healthcare api)
I do able to Get my study List just fine , BUT ! when i am getting into a study , Im Getting authorization ERROR

GET https://healthcare.googleapis.com/v1/projects/my-pacs-project/locations/me-west1/datasets/my-dataset/dicomStores/my-datastore/dicomWeb/studies/1.2.840.113619.2.394.124048.1697706108.2.1/series/1.2.840.113619.2.394.124048.1697706108.1.1/instances/1.2.840.113619.2.394.124048.1697706574.17.1/frames/1 401 (Unauthorized)

The expected behavior

I should get my data with no authorization error because i am setting my google.js file COMPLETLY like the one in version 3.7.0-beta.30

OS

Window 11

Node version

v20.9.0

Browser

Version 118.0.5993.118 (Official Build) (64-bit)

@sedghi
Copy link
Member

sedghi commented Dec 6, 2023

I have a PR to fix it today

@sedghi sedghi closed this as completed Dec 6, 2023
@niirdan
Copy link
Author

niirdan commented Dec 6, 2023

Hey @sedghi , first of all i really want to thank you about the interest about the issue .
unfortunately after pulling 3.8.0-beta.27 i am still facing this issue , i will send here my google.js configuration and chrome's error

uncaught (in promise) TypeError: handler is not a function
    at CornerstoneEventTarget.imageLoadFailedHandler (C:\Users\niird\OneDrive\Desktop\ohif\Viewers\extensions\cornerstone\src\init.tsx:260:1)
    at CornerstoneEventTarget.dispatchEvent (C:\Users\niird\OneDrive\Desktop\ohif\Viewers\node_modules\@cornerstonejs\core\src\eventTarget.ts:55:1)
    at triggerEvent (C:\Users\niird\OneDrive\Desktop\ohif\Viewers\node_modules\@cornerstonejs\core\src\utilities\triggerEvent.ts:37:1)
    at C:\Users\niird\OneDrive\Desktop\ohif\Viewers\node_modules\@cornerstonejs\core\src\loaders\imageLoader.ts:56:1
universalModuleDefinition:1 


Uncaught (in promise) Error: Couldn't retrieve https://healthcare.googleapis.com/v1/projects/my-pacs-project/locations/me-west1/datasets/my-dataset/dicomStores/my-datastore/dicomWeb/studies/1.2.840.113619.2.394.124048.1701182019.512.1/series/1.2.840.113619.2.394.124048.1701182019.513.1/instances/1.2.840.113619.2.394.124048.1701182165.517.1/frames/1 got status 401
    at universalModuleDefinition:1:1

google.js :

window.config = { routerBasename: '/', customizationService: { dicomUploadComponent: '@ohif/extension-cornerstone.customizationModule.cornerstoneDicomUploadComponent', }, enableGoogleCloudAdapter: false, // below flag is for performance reasons, but it might not work for all servers showWarningMessageForCrossOrigin: true, showCPUFallbackMessage: true, showLoadingIndicator: true, strictZSpacingForVolumeViewport: true, // This is an array, but we'll only use the first entry for now oidc: [ { // ~ REQUIRED // Authorization Server URL authority: 'https://accounts.google.com', client_id: '760168283266-cc2e8pi9m1ipn15rrk3fqqchudldimpc.apps.googleusercontent.com', redirect_uri: '/callback', response_type: 'id_token token', scope: 'email profile openid https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/cloud-healthcare', // email profile openid // ~ OPTIONAL post_logout_redirect_uri: '/logout-redirect.html', revoke_uri: 'https://accounts.google.com/o/oauth2/revoke?token=', automaticSilentRenew: true, revokeAccessTokenOnSignout: true, }, ], extensions: [], modes: [], showStudyList: true, // filterQueryParam: false, defaultDataSourceName: 'dicomweb', dataSources: [ { namespace: '@ohif/extension-default.dataSourcesModule.dicomweb', sourceName: 'dicomweb', configuration: { friendlyName: 'dcmjs DICOMWeb Server', name: 'GCP', wadoUriRoot: 'https://healthcare.googleapis.com/v1/projects/my-pacs-project/locations/me-west1/datasets/my-dataset/dicomStores/my-datastore/dicomWeb', qidoRoot: 'https://healthcare.googleapis.com/v1/projects/my-pacs-project/locations/me-west1/datasets/my-dataset/dicomStores/my-datastore/dicomWeb', wadoRoot: 'https://healthcare.googleapis.com/v1/projects/my-pacs-project/locations/me-west1/datasets/my-dataset/dicomStores/my-datastore/dicomWeb', qidoSupportsIncludeField: true, imageRendering: 'wadors', thumbnailRendering: 'wadors', enableStudyLazyLoad: true, supportsFuzzyMatching: true, supportsWildcard: false, dicomUploadEnabled: true, omitQuotationForMultipartRequest: true, configurationAPI: 'ohif.dataSourceConfigurationAPI.google', }, }, { namespace: '@ohif/extension-default.dataSourcesModule.dicomjson', sourceName: 'dicomjson', configuration: { friendlyName: 'dicom json', name: 'json', }, }, { namespace: '@ohif/extension-default.dataSourcesModule.dicomlocal', sourceName: 'dicomlocal', configuration: { friendlyName: 'dicom local', }, }, ], };

  • Running in Version 3.7.0-beta30 , still works fine (with its google.js file, found out there's changes between versions ,e.g : configurationAPI: 'ohif.dataSourceConfigurationAPI.google',)

@niirdan
Copy link
Author

niirdan commented Dec 6, 2023

** UPDATE ** after clone a new dir with the latest version , seems to be fixed , but now this is the result when viewing the study :
@sedghi
Screenshot 2023-12-06 171327

@sedghi
Copy link
Member

sedghi commented Dec 6, 2023

That is another problem

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