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

Tutorial C Not Working #22

Closed
lancesimms opened this issue Oct 11, 2017 · 12 comments
Closed

Tutorial C Not Working #22

lancesimms opened this issue Oct 11, 2017 · 12 comments

Comments

@lancesimms
Copy link

Hello,

I have been trying to follow along with your tutorials. Unfortunately, I get errors and warnings (see screenshot attached) when I try to run a historical telemetry server, as shown in Part C. The versions of node and npm we are using are:

node -v
v8.1.1
npm -v
5.0.3

Do you know what is causing these errors?

Also, are there any examples of using easier ways to read in telemetry data for display? For instance, just reading in a text file located on the server? We do not want to use websockets, and we cannot use http to access data on our webserver due to security issues. Our preferred method would be to just pull data from a database or text file using a server side script/function.

Lance

screen shot 2017-10-11 at 3 33 03 pm

@lancesimms
Copy link
Author

Does anyone know why these error messages are present?

@zicklag
Copy link

zicklag commented Oct 16, 2017

I just tried this, there is apparently a problem with Part C of the tutorial. I was able to run it off of master (0c5813f) with your version of node and it worked just fine.

@zicklag
Copy link

zicklag commented Oct 16, 2017

I removed the "x": 1 and "y": 1 lines from the dictionary.json file and that got rid of all of the warnings. It looks like the API replaced the x and y keys with domain and range.

After doing that there is still a TypeError: Cannot read property 'then' of null, but that is because there is not a telemetry adapter for the objects yet. That should be fixed when you complete Part D.

@zicklag
Copy link

zicklag commented Oct 16, 2017

You can use this patch to fix it. Download the patch and run git apply patch.txt

@lancesimms
Copy link
Author

Thank you for the patch. However, it does not get rid of the errors I am seeing. See the screenshot below that shows the following two errors:

  1. angular.min.js:110 TypeError: e is not a function
  2. angular.min.js:110 TypeError: Cannot read property 'key' of undefined

Also, I don't understand why the historical telemetry server is not working. I am looking for traffic on port 8081 using:

sudo tcpdump -i any 'port 8081'

And I don't see anything. Do you have an example of a working historical telemetry server that we can use? We aren't interested in real-time telemetry; we are only interested in displaying the contents of text files that have been saved on the server.

screen shot 2017-10-17 at 10 52 52 am

@larkin
Copy link
Contributor

larkin commented Oct 17, 2017

@lancesimms are you by chance using the code from #17? That changes the server so that it's no longer running on separate ports.

We'll have the tutorial updated shortly.

@lancesimms
Copy link
Author

I pulled the code using:

git clone https://github.com/nasa/openmct-tutorial.git

A git log shows:

commit 8752461
Author: Pete Richards [email protected]
Date: Tue May 9 20:04:26 2017 -0700

V1.0 Update

@psarram
Copy link
Contributor

psarram commented Oct 20, 2017

@lancesimms We have updated the tutorial. Please let us know if you still see the errors.

@lancesimms
Copy link
Author

@psarram Thank you very much. I just downloaded the package, re-installed it, and did the following:

  1. git checkout -f part-c
  2. Create the file historical-telemetry-plugin.js and add all of the lines shown in Part C of the tutorial
  3. Edit index.html so that the lines match the ones in Part C of the tutorial
  4. npm start

Most of the errors are gone, but I still see the one shown in the screenshot. It does look the historical telemetry server is working (although it is constantly updating the data, which doesn't make much sense to me...I would have thought the historical data would be fixed).

screen shot 2017-10-23 at 10 46 13 am

@psarram
Copy link
Contributor

psarram commented Oct 24, 2017

@lancesimms I see the error too. Looks like unsubscribeAll() in TelemetrySubscription is trying to call a null unsubscribe function.

@psarram psarram reopened this Oct 24, 2017
@zicklag
Copy link

zicklag commented Oct 24, 2017

When I was writing my own plugin I realized this too. I don't think OpenMCT should be trying to call the unsubscribe function on a historical telemetry plugin, but it is. If you make a realtime telemetry plugin that you do provide a unsubscribe function for ( because you need both the subscribe and unsubscribe functions for realtime ) it doesn't complain because the unsubscribe function exists.

I think that this is either a bug with OpenMCT or something that I am not understanding about historical telemetry plugins.

@akhenry
Copy link
Collaborator

akhenry commented Jan 8, 2019

This is due to a bug in the telemetry API's legacy provider handling. The issue lies in the main repo, so I've filed an issue there, and I'm going to close this as the originally reported issue has been resolved.

@akhenry akhenry closed this as completed Jan 8, 2019
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

5 participants