OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
3.34k stars 3.36k forks source link

Oops, looks like there's no route on the client or the server for url: "http://my-domain.com/dicom-app-viewer" #115

Closed protectedfor closed 5 years ago

protectedfor commented 7 years ago

I need to deploy a standalone-viewer to my production server.

I've did everything like described in this article - https://github.com/OHIF/Viewers/wiki/Running-and-building-the-Standalone-Viewer

But when I navigate to http://my-domain.com/dicom-app-viewer I get error:

Oops, looks like there's no route on the client or the server for url: "http://my-domain.com/dicom-app-viewer."

I've compiled my application using this command: METEOR_PACKAGE_DIRS="../../Packages" meteor-build-client dicom-app-viewer -u http://my-domain.com/dicom-app-viewer (as described in article above).

What am I doing wrong?

P.S.: What I need in the end:

I have a server application which will be used to provide an api for viewer.

Also how to configure viewer to make requests to specified url to get json with list of dicom files?

nasu38yen commented 7 years ago

I am too troubled with the same issue when the page placed in a subdirectory. I tried various combination patterns of ROOT_URL_PATH_PREFIX and ROOT_URL in the index.html. However, none of them succeeded.

swederik commented 7 years ago

There are two issues here:

  1. Setting a ROOT_URL isn't working with the standalone viewer (for subdirectories only? not sure).
  2. Add a route to standalone viewer to take in a URL instead of an ID (https://github.com/OHIF/Viewers/issues/91).

I'll see if we can get those fixed.

swederik commented 7 years ago

Can you guys try this again? I merged some changes for the absoluteUrl function which should fix some issues with using subdirectories in ROOT_URL. e.g. if I build with -u localhost:3000/subdirectory and use the redirectingSimpleServer with the same URL, I can use:

http://localhost:3000/subdirectory/?url=https://s3.eu-central-1.amazonaws.com/ohif-viewer/sampleDICOM.json

without any issues.

nasu38yen commented 7 years ago

Thank you, swederik. After downloading the latest version, overwriting my test site's files with the meteor-build-client output, it turned out that only a black screen was displayed. Those that worked with Localhost:3000 are not working right now; The following error is displayed in chrome development tool. 4bb45bec5d4d06ed3a0d9987be49df3482c25b07.js:25 Uncaught Error: The babel-runtime npm package could not be found in your node_modules directory. Please run the following command to install it:

Add the my situation. Script meteor-build-client with -u localhost: 3000 can also work with http: // localhost: 61498 by changing ROOT_URL set to meteor_runtime_config of index.html that placed on my test site, even without rebuilding. So, even if it is placed in a subdirectory, it is still unnecessary to rebuild and imagine that it works only by changing meteor_runtime_config. Is not there a misunderstanding? By the way, I tried using the code in the download SampleClientOnlyBuild, but this did not change the behavior before.

swederik commented 7 years ago

Yes you need to run meteor npm install before building. That's why it's complaining about babel-runtime.

I don't understand the second paragraph. You would need to rebuild because we changed OHIF.utils.absoluteUrl. If you just edit your index.html you won't have the updated version of the JavaScript code.

I did not update SampleClientOnlyBuild, so it makes sense that nothing changed using that.

nasu38yen commented 7 years ago

I am sorry, I have omitted one step for build process. I execute meteor npm install, rebuild client, and copy to my site, then successfully displayed the Viewer at http://localhost:3000/sample. However, i place the same application on localhost:3000/dicom, it still appears as follows. Oops, looks like there's no route on the client or the server for url: "http://localhost:3000/dicom/sample" My site localhost:3000/dicom/api/sample is correctly responding json.

Please forgive my poor English. I mean that The js code generated by building once, Since localhost:3000 and localhost:61498 also worked only modifies ROOT_URL in meteor_runtime_config of index.html. Even when placed in subdirectory, it works in the same way without rebuild, right? In other words, it is only index.html that embeds the domain name that was made into the -u parameter at build time, it is not embedded in the generated js, is it?

nasu38yen commented 6 years ago

I tried it again. This displayed no problem. http://localhost:3000/subdirectory/?url=https://s3.eu-central-1.amazonaws.com/ohif-viewer/sampleDICOM.json However, this is a load error. http://localhost:3000/subdirectory/sampleDicom.js

I feel like, use clinical.route instead of iron.route solve this problem. How is that? https://github.com/iron-meteor/iron-router/issues/1454

kmader commented 6 years ago

seems to be an iron router issue https://github.com/iron-meteor/iron-router/issues/848 and https://github.com/nosqlclient/nosqlclient/issues/237 and looks like @nasu38yen suggestion should be a drop-in replacement

marmeden commented 6 years ago

I had this problem yesterday but it was related to having two mongo databases running on localhost

dannyrb commented 5 years ago

It looks like this issue has been resolved. If any of you are still experiencing it, please feel free to create a new GitHub issue with the steps to reproduce or a minimal reproduction in a separate repository that you can link to.