'Live' Preview broken for some files?


#1

Hi,

I’m trying to use ‘live’ preview for an html file, but all I can see is a simple ‘Preview’ option in the contextual menu. The file opens successfully when I choose that option, and I can see its rendered content just fine in a Cloud9 built-in browser tab. I assume each Preview is ‘live’ by default now?

However, when the file gets updated in the background, its content is not re-rendered, and I have to manually press the built-in ‘refresh’ button. But isn’t it supposed to auto-refresh?

The developer console seems to hint that the refresh request is indeed happening, and I can see ‘1920x1080px’ briefly flash on the preview tab. In addition, I have ‘livepreview’ cookies saved successfully for https://preview.c9users.io (if that is relevant). However, the console displays a couple identical errors saying:

workspace-nodejs.js:8571 Error: Tracked: doc.update is not a function(…)log @ workspace-nodejs.js:8571(anonymous function) @ workspace-nodejs.js:17672cb @ workspace-nodejs.js:29246(anonymous function) @ workspace-nodejs.js:29212(anonymous function) @ workspace-nodejs.js:45621(anonymous function) @ workspace-nodejs.js:44002done @ workspace-nodejs.js:46298xhr.onload @ workspace-nodejs.js:46336
workspace-nodejs.js:8571 Object {path: “/reports/coverage/Chromium 52.0.2743 (Ubuntu 0.0.0)/html/sorter.js”, err: null, doc: Plugin}

If it helps, the html file is a code coverage report for the JavaScript Karma framework. May the above errors be due to the page having dynamic content (implemented using JavaScript)? It seems to render correctly (without errors) on manual refresh though.

Thanks


#2

As a workaround, lite-server seems to fit the bill.