akhenry / openmct-yamcs

Open MCT YAMCS plugin
13 stars 9 forks source link

Issue with YAMCS quickstart example #427

Open rjler opened 6 months ago

rjler commented 6 months ago

Summary

Followed https://github.com/akhenry/openmct-yamcs#installation and get blank webpage

Steps to Reproduce

1) Installed and successfully started YAMCS quickstart

2) Followed the instructions from https://github.com/akhenry/openmct-yamcs#installation git clone https://github.com/akhenry/openmct-yamcs.git cd openmct-yamcs npm install npm run build:example npm start

3) Opened firefox to http://192.168.0.69:9000/ Displays a blank black window

4) Opened the developer tools - displays the following:

Screenshot 2024-02-13 at 4 14 25 PM

Environment

npm -version 9.6.7 node -v v18.17.1

Ubuntu 20.04

ozyx commented 6 months ago

@rjler Thanks for raising this, we will investigate. In the meantime in order to unblock you, could you try using build:example:master to install the latest Open MCT and see if the quickstart example works for you?

Thanks again. Let us know if you run into any other issues.

unlikelyzero commented 6 months ago

@rjler this is a bug with our optional dependency checks. I have opened a PR to fix this

rjler commented 6 months ago

Thanks for help ...

npm run build:example:master Fixed the initial issue but encountered 'missing taxonomy'

spinning

From the developer tools:

Screenshot 2024-02-15 at 10 47 36 AM

Modified example/index.js ( changed localhost: to host ip ):

Screenshot 2024-02-15 at 10 48 41 AM

Working as expected:

Screenshot 2024-02-15 at 11 02 02 AM
unlikelyzero commented 6 months ago

@rjler can you try using 0.0.0.0 instead of your host IP? It looks like there's a CORS issue

rjler commented 6 months ago

Modified example/index.js

const config = { "yamcsDictionaryEndpoint": "http://0.0.0.0:9000/yamcs-proxy/", "yamcsHistoricalEndpoint": "http://0.0.0.0:9000/yamcs-proxy/", "yamcsWebsocketEndpoint": "ws://0.0.0.0:9000/yamcs-proxy-ws/", "yamcsUserEndpoint": "http://0.0.0.0:9000/yamcs-proxy/api/user/", "yamcsInstance": "myproject", "yamcsProcessor": "realtime", "yamcsFolder": "myproject", "throttleRate": 1000, "maxBatchSize": 15 };

Get missing:taxonomy

From dev tools:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://0.0.0.0:9000/yamcs-proxy/api/user/. (Reason: CORS request did not succeed). Status code: (null).

ozyx commented 6 months ago

@rjler how are you running yamcs? are you using the provided Makefile in quickstart to spin everything up via docker?

rjler commented 6 months ago

quickstart: From https://github.com/akhenry/openmct-yamcs?tab=readme-ov-file#prerequisites followed the quickstart link to: https://github.com/yamcs/quickstart. The followed the instructions. No docker involved, executing YAMCS quickstart and openMCT on the same Ubuntu host. Using Firefox, on a Mac, on the same network ( 192.168.0.xxx ) to access openMCT ( 192.168.0.69:9000 ).

ozyx commented 6 months ago

@rjler Thanks for the info. Seems like the non-docker workflow has broken due to some recent change-- will investigate. In the meantime, you may try the docker workflow and see if that fits your needs.