Feature Request: Verify javascript Configs

Hello,
first of all, thanks for this awesome software.

I just debugged an installation for quite a while, just to find out there was some syntax error in the interface_config.js (similar to this posting) . Although this is a client-side executed file, it could be very helpful to have some kind of syntax check running on the server, to verify the consistency of the config (i.e. on restart of the jitsi services).

Best regards
mpex

Welcome to the forum.

I’m not sure how much effort would be needed to add a syntax check like you’re suggesting, but usually if you look in the browser js console, you’d be clued in on the error. There are so many moving parts in the Jitsi stack with more pressing processes that I doubt a syntax check would (or should) be a high priority item. That js console is your best friend - it reveals more than what a syntax check would reveal.

I partially agree.

Although from a System Admininstrators point of view, the developer console is not the very first thing you might check, when the screen remains grey. You start to debug the server (logfiles).

Compared to lots of other web applications, jitsi has an extra ordinary amount of user adjustable config settings in javascript includes. Most open source applications I know handle those settings server side, mostly having syntax checks and a clear error message in case of a wrong config. That doesn’t happen with the extensive client side config.

You can close this topic. It was just a suggestions in the sense if there is a standard command line tool that could run a javascript syntax check on restart or with an extra syntax check command, this would avoid unnecessary debugging and probably even forum requests here.

Thanks again for jitsi.

If you install nodejs, you can validate the JS config files after you make a change by running node --check config.js.

For example:

You can even run that as part of your precommit hooks and/or CI if your customisations hit version control before live deployments.

1 Like