Bug when requesting large files from WebsightServer in Sight package

Hi,

We’ve run into this issue multiple times where Web Sight will not load in the browser due to either the lib/js/cytoscape.js or lib/js/three/three.js files not loading properly from the web server.

What happens:

  • Run follow_me app
  • Go to host:3000
  • Page does not load fully
  • Chrome developer tools console shows “net::ERR CONTENT LENGTH MISMATCH” in response to a file request
  • Chrome developer tools shows constant errors on each tick, either:
  • cyctoscape is not defined (from the Pose Tree implementation) and cytoscape.js seems to be missing in the 'Sources' tab
  • THREE is not defined

This does not happen consistently, but often enough to be an issue. I had to refresh quite a few times to replicate.

What I believe the issue is:

In WebsightServer.cpp:193:

res->end(buffer.data(), buffer.size());

From uWebSockets documentation:

You should never call res.end(huge buffer). res.end guarantees sending so backpressure will probably spike. Instead you should use res.tryEnd to stream huge data part by part. Use in combination with res.onWritable and res.onAborted callbacks.

Cytoscape.js and three.js are big files. Unfortunately, the early version of the library Isaac uses does not implement tryEnd.

Any thoughts/suggestions?

1 Like

Thanks for reporting. We will check and get back to you.

1 Like

Im experiencing the same issue when launching from Jetson Xavier. However, on a desktop platform it runs without issues [ISAAC v. 2019.3).

1 Like

Hi @schulze762gr and @ugniusrumsevicius,

We have tried to fix this issue and you should be able to see some improvements in the next release of Isaac SDK. Please stay tuned!

2 Likes

Yes, in a week or so