JavaScript debugging issues and `output` object

When working on JavaScripts in SeaTable, it looks like there is an issue with the output function. Any errors in the script are not caught and presented on the right-hand output pane, but instead trigger this browser console message:

Uncaught (in promise) TypeError: output is null

And indeed, also in regular JavaScripts, I was not able to use the output object:

console.log(row.frame);
output.text(row.frame);

will produce no output on the output pane, but this console output:

f0000.png
Uncaught (in promise) TypeError: output is null

(f0000.png is the correct value here.)

It is possible to use the output object at the top of my scripts, but after calling a base method, the above error appears.

Is there anything I am missing here?

Are you using SeaTable in the Cloud or self-hosted? If the latter, which version are you using?

Oops, sorry, I am using Docker developer release 1.8.0.

No worries, thanks for the information. In the next week we will update to a new version, there wilil be some changes in the JavaScript’s behavior. Hopefully that will solve the problem! Let us know if it is the case then… we will announce the new version here in the forum.

Superb, thank you!

I have noticed that the global objects base and output do not seem to survive certain JavaScript calls I did in my scripts, notably await fetch(...) (to pull data from other web services). My workaround is to start every script with these lines:

const Base = base;
const Output = output;

…and then continue using the uppercase version of the objects — however Seatable’s debugging hints won’t know about them :slightly_smiling_face:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.