Unable to install plugins via run-node-script.sh on on-prem instance (TranspilerEngine failure)

BenoîtB
Tera Contributor

Hello,

I am trying to install plugins (specifically i18n French) on an on-premise ServiceNow instance using the CLI tool `run-node-script.sh`.

Here is the script I am using:

---
var plugins = [];
plugins.push('com.snc.i18n.french');

var main = new GlideMultiPluginManagerWorker();
main.setPluginIds(plugins);
main.setProgressName("Plugin Installer I18N FR");
main.setBackground(true);
main.start();

gs.print("STATUS:WORKER_STARTED");
---

The script executes without error, but the plugin is never installed.

After investigating the logs, I noticed the following error during startup:

---
TranspilerEngine *** ERROR *** TranspilerEngine failed to initialize.
Error: no swc-jni_linux64 in java.library.path
ScriptEvaluator *** WARNING *** TranspilerEngine failed to initialize.
---

It seems that the JavaScript engine is not properly initialized, which might prevent any script execution from happening.

Additional context:
- On-premise instance
- Running via `run-node-script.sh`
- Java 17
- PostgreSQL backend
- No plugin installation logs appear
- Even simple `gs.print()` tests do not produce output

My questions:
1. Is the `run-node-script.sh` method still supported for plugin installation in recent versions?
2. Is the TranspilerEngine (SWC) required for script execution in this context?
3. Is there a way to disable the transpiler or fallback to a legacy JS engine?
4. Are there additional native libraries (like `swc-jni_linux64`) that must be manually installed in on-prem environments?

Any guidance or best practices for installing plugins via CLI on on-prem instances would be greatly appreciated.

Thanks in advance!

3 REPLIES 3

Alex Coope - SN
ServiceNow Employee

Hi @BenoîtB,

So, I wouldn't typically recommend trying to install a "plugin" via a shell script (even if it's for an on-prem instance), instead you should be able to do it from within the standard "Application Manager" because a "plugin" is contained within the Platform itself (it's not like a Store App that has to be obtained separately).

With that being said, if you really wanted to install it via a script, it should be within something like a "Fix Script" to ensure it has access to the API's. I suspect the reason you're not getting success is because of how your shell script is running, it doesn't know what "gs" is, nor the API's, as they come from the Application level not the shell level.

So, in theory, you could run a "Fix Script" in the instance like this:

// install french
var pluginInstall = new GlideRecord('v_plugin');
pluginInstall.addEncodedQuery("com.glide.i18n.french"); // find french
pluginInstall.query();
while(pluginInstall.next()){
    pm.registerPlugin(pluginInstall.id); // install the plugin
    if(pluginInstall.has_demo_data == 'true'){
        pm.loadDemoData(pluginInstall.id);
    }
    gs.log("Plugin -> "+pluginInstall.id+" | "+pluginInstall.active);
}
 

^ note that there are two French language packs "French" for France, and "French Canadian" for Quebecois - this would only install "French", so if you want to install Quebecois that would be "com.glide.i18n.french_canada". The output of this log entry would be present in "Script Log Statements" because of the gs.log() call.

However, installing in this way is not the recommended approach, instead it is better to go to the "Application Manager" and install the plugin (not app) from there. On-prem instances do however need to install "Store Apps" separately which I appreciate could cause some confusion,

Many thanks,
Kind regards

--------------------------------------------------------------------
Director of Globalization Deployment, Internationalization

BenoîtB
Tera Contributor

Hi Alex, 

 

Thank you for your detailed response and suggestions, I really appreciate it.

 

I tried adapting the script approach, and while it does seem to trigger something, the execution takes a very long time (several hours). Eventually, I do see a language dropdown appearing on the login page, but it only contains English.

More concerning, after running the script, I am no longer able to log into the instance at all, which is quite problematic.

 

Overall, this approach feels too unreliable and risky to be used in our context.

Initially, our process was simpler: once the instance is installed on our test servers, we install the required French language plugins (i18n, etc.) via the Plugin Manager. The plugins do install correctly, but the instance ends up only partially translated.

 

So my remaining question is:


Is there any way to install ServiceNow in a language other than English from the start, instead of installing in English and then adding translations afterward?

 

Thanks again for your help!

Hi ,

Ok so there's a few things to unpack there. A Language Pack install, will take a bit of time - this is to be expected. Ideally nowadays (post Tokyo release) it should take around 30mins, in earlier releases it would have taken around 3 hours, due to the volume of records it's putting in the translation tables.

The partial translation you mention is almost certainly because the Language Pack (of any language we provide) is only going to contain the ootb UI made by SN (Core Platform, Plugins and Apps) translated, and not anything you may have built - that concept is called "Self-Localization", which is where the "Localization Framework" / "Localization Workspace" would be used to translate anything not ootb.

For your last question - no. This is because the development language of the platform is English, so any language is always treated as a translation layer.

Have you read through the "In Platform Language Support Guide" thread? 

Many thanks,
kind regards

--------------------------------------------------------------------
Director of Globalization Deployment, Internationalization