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

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 opened this issue Oct 12, 2017 · 10 comments

Comments

@protectedfor
Copy link

protectedfor commented Oct 12, 2017

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
Copy link

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
Copy link
Member

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 (Change standalone viewer to accept url param instead of id #91).

I'll see if we can get those fixed.

@swederik
Copy link
Member

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
Copy link

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
Copy link
Member

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
Copy link

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
Copy link

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?
iron-meteor/iron-router#1454

@kmader
Copy link

kmader commented Feb 23, 2018

seems to be an iron router issue iron-meteor/iron-router#848 and nosqlclient/nosqlclient#237 and looks like @nasu38yen suggestion should be a drop-in replacement

@marmeden
Copy link

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

@dannyrb
Copy link
Member

dannyrb commented May 6, 2019

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.

@dannyrb dannyrb closed this as completed May 6, 2019
pedrokohler pushed a commit to pedrokohler/ohif-viewers that referenced this issue Nov 13, 2023
…gbrowser0216

Update ohif extension-dicom-tag-browser to 0.2.16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants