Isaac sight error in chrome console : THREE and cytoscape not defined

When runnig a sample on my jetson nano and looking at sight on pc (both on ubuntu 18.04, nano on jetson43) I get the following error inspecting the console in the PC google chrome when I am in isaac sight (sight work perfectly when the sample is run on my pc or when the sample run on nano and sight as well)(reinstalled jetson and nano sdks and did nothing) :

Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
FreeControls.js:12 Uncaught ReferenceError: THREE is not defined
    at FreeControls.js:12
FBXLoader.js:22 Uncaught ReferenceError: THREE is not defined
    at FBXLoader.js:22
MTLLoader.js:9 Uncaught ReferenceError: THREE is not defined
    at MTLLoader.js:9
OBJLoader.js:1 Uncaught ReferenceError: THREE is not defined
    at OBJLoader.js:1
OrbitControls.js:16 Uncaught ReferenceError: THREE is not defined
    at OrbitControls.js:16
STLLoader.js:35 Uncaught ReferenceError: THREE is not defined
    at STLLoader.js:35
TransformControls.js:5 Uncaught ReferenceError: THREE is not defined
    at TransformControls.js:5
bootstrap-slider.min.js:48 bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead.
(anonymous) @ bootstrap-slider.min.js:48
asset_manager.js:33 Uncaught ReferenceError: THREE is not defined
    at new AssetManagerImpl (asset_manager.js:33)
    at AssetManager (asset_manager.js:385)
    at WebSocket.my_socket.onmessage ((index):326)

some other time I get those errors :

Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
cytoscape-cose-bilkent.js:1 Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
fabric.min.js:1 Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
cytoscape.min.js:1 Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
renderer_2d.js:1 Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
three.js:1 Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
FBXLoader.js:1 Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
map_container.js:1108 Uncaught ReferenceError: fabric is not defined
    at map_container.js:1108
FreeControls.js:12 Uncaught ReferenceError: THREE is not defined
    at FreeControls.js:12
MTLLoader.js:9 Uncaught ReferenceError: THREE is not defined
    at MTLLoader.js:9
OBJLoader.js:1 Uncaught ReferenceError: THREE is not defined
    at OBJLoader.js:1
OrbitControls.js:16 Uncaught ReferenceError: THREE is not defined
    at OrbitControls.js:16
STLLoader.js:35 Uncaught ReferenceError: THREE is not defined
    at STLLoader.js:35
TransformControls.js:5 Uncaught ReferenceError: THREE is not defined
    at TransformControls.js:5
jquery-ui.js:1 Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
pose_tree.js:44 Uncaught ReferenceError: cytoscape is not defined
    at new PoseTreeImpl (pose_tree.js:44)
    at PoseTree (pose_tree.js:460)
    at new InteractiveMarkersManagerImpl (interactive_markers_manager.js:20)
    at InteractiveMarkersManager (interactive_markers_manager.js:276)
    at WebSocket.my_socket.onopen ((index):396)
32pose_tree.js:44 Uncaught ReferenceError: cytoscape is not defined
    at new PoseTreeImpl (pose_tree.js:44)
    at PoseTree (pose_tree.js:460)
    at WebSocket.my_socket.onmessage ((index):333)
asset_manager.js:33 Uncaught ReferenceError: THREE is not defined
    at new AssetManagerImpl (asset_manager.js:33)
    at AssetManager (asset_manager.js:385)
    at WebSocket.my_socket.onmessage ((index):326)
12pose_tree.js:44 Uncaught ReferenceError: cytoscape is not defined
    at new PoseTreeImpl (pose_tree.js:44)
    at PoseTree (pose_tree.js:460)
    at WebSocket.my_socket.onmessage ((index):333)
graph.js:27 Uncaught ReferenceError: cytoscape is not defined
    at AddNodesIfNecessary (graph.js:27)
    at UpdateAppGraph (graph.js:14)
    at WebSocket.my_socket.onmessage ((index):330)
31pose_tree.js:44 Uncaught ReferenceError: cytoscape is not defined
    at new PoseTreeImpl (pose_tree.js:44)
    at PoseTree (pose_tree.js:460)
    at WebSocket.my_socket.onmessage ((index):333)
:3000/favicon.ico:1 Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
227pose_tree.js:44 Uncaught ReferenceError: cytoscape is not defined
    at new PoseTreeImpl (pose_tree.js:44)
    at PoseTree (pose_tree.js:460)
    at WebSocket.my_socket.onmessage ((index):333)
2162pose_tree.js:44 Uncaught ReferenceError: cytoscape is not defined
    at new PoseTreeImpl (pose_tree.js:44)
    at PoseTree (pose_tree.js:460)
    at WebSocket.my_socket.onmessage ((index):333)
PoseTreeImpl @ pose_tree.js:44
PoseTree @ pose_tree.js:460
my_socket.onmessage @ (index):333

Same when I try to connect with a windows PC and same with chromium or firefox. Also same when I try ping or stereo dummy.

./isaac/engine/build/deploy.sh --remote_user thoth -p //apps/samples/stereo_dummy:stereo_dummy-pkg -d jetpack43 -h 192.168.0.14

The sample is perfectly running in terminal but isaac sight just run the loader indefinitely.
pose_tree.js:44 Uncaught ReferenceError: cytoscape is not defined at new PoseTreeImpl (pose_tree.js:44)
is the main error that run many many times.

Here is pose_treee.JS line 0 to 96:

/*
Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.

NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
*/
// A temporal pose tree to store relative coordinate system transformations over time
// This implementation does not support multiple paths between the same coordinate systems. It does
// however allow for multiple "roots". In fact the transformation relationships form an acylic,
// bi-directional, not necessarily fully-connected graph. (In other words: it's a forest).
class PoseTreeImpl {
  constructor() {
    // Dictionary of node_name -> Node
    this.nodes_ = {};
    // Latest time
    this.now_ = 0.0;
    this.start_node_ = null;
    this.end_node_ = null;
    // Create a window displaying the PoseTree
    this.graph_view_ = document.createElement("div");
    this.graph_view_.id = "__win-posetree-graph-view";
    // Create a new window with a callback to call resize() on the cytoscape object.
    let that = this;
    WindowManager().createWindow(this.graph_view_, "PoseTree",
                                 {resize: true, onresize: function (obj) {
      that.graph_view_.style.width = (obj.width-10) + "px";
      that.graph_view_.style.height = "100%";
      if (that.graph_view_.hasOwnProperty("cy")) that.graph_view_.cy.resize();
    }});

    // Create the div that output the Pose2/3
    this.legend_ = document.createElement("div");
    this.legend_.style.zIndex = "1000";
    this.legend_.style.padding = "10px";
    this.legend_.style.backgroundColor = "rgba(196, 196, 196, 0.75)";
    this.legend_.style.position = "absolute";
    this.legend_.style.top = "10px";
    this.legend_.style.left = "10px";
    this.graph_view_.appendChild(this.legend_);

    this.cy_graph_ = cytoscape({<<<<-----line 44 Where ERROR occur :( 
      container: this.graph_view_,
      boxSelectionEnabled: false,
      autounselectify: true,
      style: cytoscape.stylesheet()
        .selector('node')
          .css({
            'width': 150,
            'height': 40,
            'shape': 'roundrectangle',
            'background-color': 'rgb(0, 182, 0)',
            'border-width': 1,
            'border-color': '#333',
            'border-style': 'solid',
            'content': 'data(name)',
            'color': '#000',
            'font-weight': 'normal',
            'text-valign': 'center',
            'transition-property': 'background-color',
            'transition-duration': '0.5s',
          })
        .selector('edge')
          .css({
            'curve-style': 'bezier',
            'target-arrow-shape': 'triangle',
            'source-arrow-shape': 'triangle',
            'width': 5,
            'line-color': '#666',
            'target-arrow-color': '#666',
          })
        .selector('.start_node')
          .css({
            'background-color': '#61bffc',
            'transition-property': 'background-color',
            'transition-duration': '0.5s',
          })
        .selector('.end_node')
          .css({
            'background-color': '#fcbf61',
            'transition-property': 'background-color',
            'transition-duration': '0.5s',
          })
    });
    this.cy_graph_.on('tap', 'node', function(e) {
      that._clickNode(e.target);
    });
    this.cy_graph_.on('tap', function(e) {
      if (e.target == that.cy_graph_) that._clickNode(null);
    });
    this.graph_view_.cy = this.cy_graph_;
    this.edge_set_expansion_callbacks_ = [];
    this.edge_set_clear_callbacks_ = [];
  }

When I look at the network panel of google chrome to see requests I see 2 types :
first run very frequently and seems to be sync with the error

{data: {edges: null, nodes: [], time: 189.052545343}, type: "pose_tree_reply"}
data: {edges: null, nodes: [], time: 189.052545343}
edges: null
nodes: []
time: 189.052545343
type: "pose_tree_reply"

and the second less frequently

{data: {,…}, type: "statistics_reply"}
data: {,…}
codelet_statistics: {_config_bridge: {,…}, _interactive_markers_bridge: {,…}, _pose_tree_bridge: {,…}, _statistics: {,…},…}
ping: {,…}
ping: {average_exec_dt: 0.04, average_late_dt: 0, dt: 1000, frequency: 0.37, late_p: 0, load: 0, max: 0.1,…}
average_exec_dt: 0.04
average_late_dt: 0
dt: 1000
frequency: 0.37
late_p: 0
load: 0
max: 0.1
median: 0.04
num_ticks: 189
p90: 0.05
websight: {,…}
WebsightServer: {average_exec_dt: 0, average_late_dt: 0, dt: 5.13, frequency: 0, late_p: 0, load: 0, max: 10.71,…}
average_exec_dt: 0
average_late_dt: 0
dt: 5.13
frequency: 0
late_p: 0
load: 0
max: 10.71
median: 5.13
num_ticks: 36970
p90: 5.14
_config_bridge: {,…}
isaac.alice.ConfigBridge: {average_exec_dt: 0.13, average_late_dt: 0, dt: 67836.96, frequency: 0, late_p: 0, load: 0, max: 0.21,…}
average_exec_dt: 0.13
average_late_dt: 0
dt: 67836.96
frequency: 0
late_p: 0
load: 0
max: 0.21
median: 0.13
num_ticks: 2
p90: 0.13
_interactive_markers_bridge: {,…}
InteractiveMarkersBridge: {average_exec_dt: 0.01, average_late_dt: 0, dt: 49.94, frequency: 19.03, late_p: 0, load: 0.01,…}
average_exec_dt: 0.01
average_late_dt: 0
dt: 49.94
frequency: 19.03
late_p: 0
load: 0.01
max: 0.07
median: 0.01
num_ticks: 3780
p90: 0.01
_pose_tree_bridge: {,…}
PoseTreeJsonBridge: {average_exec_dt: 0.02, average_late_dt: 0, dt: 49.95, frequency: 20, late_p: 0, load: 0.04, max: 0.31,…}
average_exec_dt: 0.02
average_late_dt: 0
dt: 49.95
frequency: 20
late_p: 0
load: 0.04
max: 0.31
median: 0.02
num_ticks: 3781
p90: 0.03
_statistics: {,…}
NodeStatistics: {average_exec_dt: 0.16, average_late_dt: 0, dt: 1000, frequency: 0.37, late_p: 0, load: 0.01,…}
average_exec_dt: 0.16
average_late_dt: 0
dt: 1000
frequency: 0.37
late_p: 0
load: 0.01
max: 0.45
median: 0.16
num_ticks: 190
p90: 0.17
node_statistics: {_config_bridge: {lifecycle: 11, num_started: 1},…}
backend: {lifecycle: 31, num_started: 1}
lifecycle: 31
num_started: 1
ping: {lifecycle: 11, num_started: 1}
lifecycle: 11
num_started: 1
websight: {lifecycle: 11, num_started: 1}
lifecycle: 11
num_started: 1
_config_bridge: {lifecycle: 11, num_started: 1}
lifecycle: 11
num_started: 1
_interactive_markers_bridge: {lifecycle: 11, num_started: 1}
lifecycle: 11
num_started: 1
_pose_tree_bridge: {lifecycle: 11, num_started: 1}
lifecycle: 11
num_started: 1
_statistics: {lifecycle: 11, num_started: 1}
lifecycle: 11
num_started: 1
type: "statistics_reply"

Here is the statistic report seen in terminal :

2020-04-28 18:19:26.701 INFO  apps/tutorials/ping/Ping.cpp@31: My own hello world!
^C2020-04-28 18:19:27.435 INFO  engine/alice/application.cpp@221: Stopping application 'ping' (instance UUID: '95d89f16-896b-11ea-b311-bdd777dc6ce2') ...
2020-04-28 18:19:27.435 INFO  engine/alice/backend/backend.cpp@129: Backend is shutting down...
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/node_backend.cpp@350: Stopping node 'ping'
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@95: Stopping codelet 'ping/ping' ...
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@104: Stopping codelet 'ping/ping' DONE
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/node_backend.cpp@350: Stopping node '_interactive_markers_bridge'
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@95: Stopping codelet '_interactive_markers_bridge/InteractiveMarkersBridge' ...
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@104: Stopping codelet '_interactive_markers_bridge/InteractiveMarkersBridge' DONE
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/node_backend.cpp@350: Stopping node '_pose_tree_bridge'
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@95: Stopping codelet '_pose_tree_bridge/PoseTreeJsonBridge' ...
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@104: Stopping codelet '_pose_tree_bridge/PoseTreeJsonBridge' DONE
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/node_backend.cpp@350: Stopping node '_statistics'
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@95: Stopping codelet '_statistics/NodeStatistics' ...
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@104: Stopping codelet '_statistics/NodeStatistics' DONE
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/node_backend.cpp@350: Stopping node '_config_bridge'
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@95: Stopping codelet '_config_bridge/isaac.alice.ConfigBridge' ...
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@104: Stopping codelet '_config_bridge/isaac.alice.ConfigBridge' DONE
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/node_backend.cpp@350: Stopping node 'websight'
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@95: Stopping codelet 'websight/isaac.sight.AliceSight' ...
2020-04-28 18:19:27.435 DEBUG engine/alice/backend/codelet_backend.cpp@104: Stopping codelet 'websight/isaac.sight.AliceSight' DONE
2020-04-28 18:19:27.445 DEBUG engine/alice/backend/codelet_backend.cpp@95: Stopping codelet 'websight/WebsightServer' ...
2020-04-28 18:19:27.445 INFO  packages/sight/WebsightServer.cpp@118: Disconnected
2020-04-28 18:19:27.446 INFO  packages/sight/WebsightServer.cpp@406: =====================================================================================
2020-04-28 18:19:27.446 INFO  packages/sight/WebsightServer.cpp@407: |                             Websight Statistics Report                            |
2020-04-28 18:19:27.446 INFO  packages/sight/WebsightServer.cpp@408: =====================================================================================
2020-04-28 18:19:27.446 INFO  packages/sight/WebsightServer.cpp@409: | Name                                            | Bandwidth |    Total |    Count |
2020-04-28 18:19:27.446 INFO  packages/sight/WebsightServer.cpp@410: -------------------------------------------------------------------------------------
2020-04-28 18:19:27.446 INFO  packages/sight/WebsightServer.cpp@429: =====================================================================================
2020-04-28 18:19:27.446 DEBUG engine/alice/backend/codelet_backend.cpp@104: Stopping codelet 'websight/WebsightServer' DONE
2020-04-28 18:19:27.455 INFO  engine/alice/backend/asio_backend.cpp@49: Stopping ASIO service
2020-04-28 18:19:27.465 DEBUG engine/gems/scheduler/execution_groups.cpp@518: Stopping all threads for execution group __BlockerGroup__...
2020-04-28 18:19:27.465 DEBUG engine/gems/scheduler/execution_groups.cpp@522: Stopping all threads DONE
2020-04-28 18:19:27.466 INFO  engine/gems/scheduler/execution_groups.cpp@594: 
|======================================================================================================================|
|                                                Job Statistics Report (blocking)                                      |
|======================================================================================================================|
| Name                                               |          Job Mode |   Count |   Time (Median - 90% - Max) [ms]  |
|----------------------------------------------------------------------------------------------------------------------|
|                            websight/WebsightServer |          Blocking |   37503 |      5.13 |      5.14 |     10.71 |
|                                       ASIO Service |          Blocking |       1 | 191756.23 | 191756.23 | 191756.23 |
|                       NodeBackend start/stop queue | Blocking One Shot |       1 | 191746.58 | 191746.58 | 191746.58 |
|======================================================================================================================|
2020-04-28 18:19:27.466 DEBUG engine/gems/scheduler/execution_groups.cpp@518: Stopping all threads for execution group __WorkerGroup__...
2020-04-28 18:19:27.466 DEBUG engine/gems/scheduler/execution_groups.cpp@522: Stopping all threads DONE
2020-04-28 18:19:27.466 INFO  engine/gems/scheduler/execution_groups.cpp@656: 
|=========================================================================================================================================================|
|                                                             Job Statistics Report (regular)                                                             |
|=========================================================================================================================================================|
| Name                                               |   Job Mode |   Count | Time (Median - 90% - Max) [ms] | Rl Load | Overrun |   Overrun | Exec Delay |
|---------------------------------------------------------------------------------------------------------------------------------------------------------|
|               _pose_tree_bridge/PoseTreeJsonBridge |   Periodic |    3836 |     0.02 |     0.03 |     0.31 |  53.6 % |   0.0 % |   0.00 ms |  -35.0 mus |
|                         _statistics/NodeStatistics |   Periodic |     192 |     0.16 |     0.17 |     0.45 |  18.7 % |   0.0 % |   0.00 ms |  -34.5 mus |
| ..eractive_markers_bridge/InteractiveMarkersBridge |   Periodic |    3836 |     0.01 |     0.01 |     0.07 |  15.1 % |   0.0 % |   0.00 ms |  -88.8 mus |
|                                  FailsafeHeartBeat |   Periodic |   19177 |     0.00 |     0.00 |     0.00 |   7.2 % |   0.0 % |   0.00 ms |   10.0 mus |
|                                          ping/ping |   Periodic |     192 |     0.04 |     0.05 |     0.10 |   5.1 % |   0.0 % |   0.00 ms |  -36.0 mus |
|            _config_bridge/isaac.alice.ConfigBridge |      Event |       2 |     0.13 |     0.13 |     0.21 |   0.2 % |   0.0 % |   0.00 ms |   29.8 mus |
|                                   AllocatorBackend |   One Shot |       1 |     0.05 |     0.05 |     0.05 |   0.0 % |   0.0 % |   0.00 ms |   22.5 mus |
|=========================================================================================================================================================|
2020-04-28 18:19:27.466 INFO  engine/alice/backend/allocator_backend.cpp@120: 
|====================================================|
|        Big Data Memory Allocation Statistics       |
|               CPU                                  |
|====================================================|
| Duration            |                      191.8 s |
| Rate                |                      0.0 1/s |
| Count (Total)       |                            0 |
| Request Rate        |                     0.0 MB/s |
| Requested (Total)   |                         0 MB |
| Allocated (Total)   |                         0 MB |
| Deallocated (Total) |                         0 MB |
| Potentially Lost    |                          0 B |
| Efficiency          |                      100.0 % |
|====================================================|

2020-04-28 18:19:27.466 INFO  engine/alice/backend/allocator_backend.cpp@120: 
|====================================================|
|        Big Data Memory Allocation Statistics       |
|              CUDA                                  |
|====================================================|
| Duration            |                      191.8 s |
| Rate                |                      0.0 1/s |
| Count (Total)       |                            0 |
| Request Rate        |                     0.0 MB/s |
| Requested (Total)   |                         0 MB |
| Allocated (Total)   |                         0 MB |
| Deallocated (Total) |                         0 MB |
| Potentially Lost    |                          0 B |
| Efficiency          |                      100.0 % |
|====================================================|

2020-04-28 18:19:27.466 INFO  engine/alice/backend/backend.cpp@142: Backend is shutting down... DONE
Connection to 192.168.0.15 closed.

here is some scren shots :
still running
img of errors

Thank you a lot for your help or at least your time reading this post <3

Hi,

This looks a lot like a network issue, if you have a poor connection it is possible that the javascript dependencies are not loaded properly and would create the issue you see.
You can try to refresh your browser a few times see if you get lucky.
We also noticed that this issue was more frequent with chrome than Firefox, while officially we support chrome, most features are also tested on Firefox and should work. I see from your post that you have tried firefox as well, but I would try to refresh a few times with firefox to see if it helps.
Unfortunately there is no magic solution, we use a third party library for the webserver, so we have little control how the file are sent and received by the browser.

A potential hacky solution you might try (I have never tested), if you can figure out which file did not get loaded properly (which the console seems to indicate), you can try to manually load the files from the console:

document.createElement('script');
script.src = "http://robot_ip:3000/the/script.js";
document.getElementsByTagName('head')[0].appendChild(script);

Additionally, even if you manage to load sight properly, if your connection is really slow, you might have a poor experience with sight if you try to stream some images, and you might experiment some lag issue as well. (The FAQ has some information about how to figure out where the lag comes from).

1 Like

Thank you, I will try it, I am using QT as GUI and unless I could load sight in Qt it not a big deal but thanks and I hope it could help me load it in Qt we never know :D