ServiceNow IDE shows blank page – "Unexpected identifier" / "sn_glider is not defined"

aymane
Tera Expert

Hi all,

ServiceNow IDE (/sn_glider_app/ide.do) only shows a blank page on our dev instance. On preprod and prod it works fine, same IDE version, same user and roles.

 

Console shows:

ide.do?sysparm_nostack=true:194 Uncaught SyntaxError: Unexpected identifier 'un'
ide.do?sysparm_nostack=true:390 Uncaught ReferenceError: sn_glider is not defined
GET .../sn_glider_app/vs/workbench/workbench.web.main.css 404 (Not Found)

 

Any idea what could cause this?

1 ACCEPTED SOLUTION

aymane
Tera Expert

Found it, posting in case someone runs into the same thing.

Line 194 of ide.do is where the IDE builds window.sn_glider. The studioShellConfig value is a JSON string inside single quotes, and it includes the name of your current update set without escaping it.

My update set name had a French apostrophe in it ("...création d'un nouveau utilisateur..."), so the ' closed the string and the browser tried to run "un" as code.

The other errors are just side effects: sn_glider never gets defined, so the require.config at line 390 never runs and the loader looks for the CSS in the wrong place (hence the 404). No need to repair the app.

Fix: switch to another update set, or rename it without the straight apostrophe (’ works fine), then reload the IDE.

Probably worth knowing if your team writes update set names in French.

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron

@aymane 

if this is for customer instance please raise case with ServiceNow

aymane
Tera Expert

Found it, posting in case someone runs into the same thing.

Line 194 of ide.do is where the IDE builds window.sn_glider. The studioShellConfig value is a JSON string inside single quotes, and it includes the name of your current update set without escaping it.

My update set name had a French apostrophe in it ("...création d'un nouveau utilisateur..."), so the ' closed the string and the browser tried to run "un" as code.

The other errors are just side effects: sn_glider never gets defined, so the require.config at line 390 never runs and the loader looks for the CSS in the wrong place (hence the 404). No need to repair the app.

Fix: switch to another update set, or rename it without the straight apostrophe (’ works fine), then reload the IDE.

Probably worth knowing if your team writes update set names in French.