IHTSDO / snap2snomed

Other
12 stars 6 forks source link

Authorization issue on local setup #165

Open MaxLmqr opened 1 year ago

MaxLmqr commented 1 year ago

Hello !

I am trying to launch the project locally, with a view to integrating it into a wider application. I am having an issue running the mvn clean package command. It seems that I am not allowed to get the package for the SNAP-2-SNOMED user interface.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for SNAP-2-SNOMED 0.1.0-SNAPSHOT:
[INFO]
[INFO] SNAP-2-SNOMED ...................................... SUCCESS [  0.098 s]
[INFO] Snap2SNOMED API .................................... SUCCESS [ 16.553 s]
[INFO] SNAP-2-SNOMED UI ................................... FAILURE [  5.726 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  22.537 s
[INFO] Finished at: 2023-04-28T14:38:03+02:00
[INFO] ------------------------------------------------------------------------

More details :

[INFO] --- frontend:1.12.1:yarn (yarn install) @ ui ---
[INFO] Running 'yarn install' in /Users/max/Galadrim/snap2snomed/ui/snapclient
[INFO] yarn install v1.22.10
[INFO] [1/4] Resolving packages...
[INFO] [2/4] Fetching packages...
[INFO] error An unexpected error occurred: "https://pkgs.dev.azure.com/aehrc/ontoserver/_packaging/aehrc-npm/npm/registry/@csiro/shrimp-hierarchy-view/-/shrimp-hierarchy-view-0.0.7.tgz: Request failed \"401 Unauthorized\"".
[INFO] info If you think this is a bug, please open a bug report with the information provided in "/Users/max/Galadrim/snap2snomed/ui/snapclient/yarn-error.log".
[INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

The shrimp-hierarchy-view seems to be private. Is there any additionnal procedure I should follow ?

Best regards, Max

abdulmateenraj commented 1 year ago

Hi Max,

I also encountered similar problem with snap-2-snomed UI installation and it also failed, seems there are various issues. Are you also using Windows operating system ?

Best, Mateen

lawley commented 1 year ago

I am attaching the appropriate file that you can manually install until we can sort out alternate access.

shrimp-hierarchy-view-0.0.7.tgz

MaxLmqr commented 1 year ago

Thank you !

MaxLmqr commented 1 year ago

I managed to launch it locally with the following steps :

  1. Manually installing node_modules and replacing shrimp hierarchy view with the zip you gave me

  2. I had to change in the pom.xml

From :

<dependency>
  <groupId>com.h2database</groupId>
  <artifactId>h2</artifactId>
  <scope>test</scope>
</dependency>

To :

<dependency>
  <groupId>com.h2database</groupId>
  <artifactId>h2</artifactId>
  <scope>compile</scope>
</dependency>
  1. mvn clean package -> generates the docker image and build the frontend

I still have an issue on this command, building the frontend it fails on yarn run test-headless, but it works when I run it manually. And I can run the frontend with yarn start

[INFO] Chrome Headless 113.0.5672.92 (Mac OS 10.15.7) ERROR
[INFO]   An error was thrown in afterAll
[INFO]   Error: Expected false to be truthy.
[INFO]       at <Jasmine>
[INFO]       at http://localhost:9876/_karma_webpack_/webpack:/src/app/mapping/mapping-add/mapping-add.component.spec.ts:168:37
[INFO]       at _ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-evergreen.js:372:1)
[INFO]       at ProxyZoneSpec.push.QpwO.ProxyZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/dist/zone-testing.js:303:1)
  1. Running ./latest_ddl.sh

  2. Running docker compose up