Error Reference

UI Page not loading: page script error on load

UI Page not loading: page script error on load

Where this appears

This error appears when a UI Page fails to render in the ServiceNow interface, typically displayed in the browser as a loading failure or blank page. JavaScript errors related to the UI Page are visible in the browser console, while server-side Jelly template errors appear in the ServiceNow system logs under System Diagnostics > Log > Application Log.

Sourdough
Chrome Extension

Debugging this in a real instance?

Sourdough lets you trace "UI Page not loading: page script error on load" through system logs, script errors, and API health in the ServiceNow tab you are already using.

Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Cause

JavaScript syntax errors or runtime exceptions in the UI Page's client script section, such as undefined variables, missing functions, or improper API calls. (high likelihood)

Server-side Jelly template syntax errors including malformed XML tags, incorrect GlideRecord queries, or invalid server-side script blocks. (high likelihood)

Missing or invalid dependencies such as referenced CSS files, JavaScript libraries, or other UI Pages that the current page depends on. (medium likelihood)

Access control restrictions preventing the user from viewing required records or tables referenced in the UI Page scripts. (medium likelihood)

Database connection issues or query timeouts when the UI Page attempts to load data during initialization. (low likelihood)

Fix

Step 1: Open the browser developer tools (F12) and check the Console tab for JavaScript errors while loading the UI Page. Note any specific error messages, line numbers, and function names.

Step 2: Navigate to System Diagnostics > Log > Application Log in ServiceNow and filter by the current timestamp to identify server-side errors related to the UI Page loading.

Step 3: Access the problematic UI Page record at System UI > UI Pages and review the HTML template and client script sections for syntax errors, undefined variables, or malformed code.

Step 4: Test the UI Page in isolation by navigating directly to it using the URL format: https://instance.service-now.com/nav_to.do?uri=/$ui-page-name.do to isolate the error from portal or frame contexts.

Step 5: Validate all GlideRecord queries and server-side scripts in the Jelly template by testing them in a background script at System Definition > Scripts > Background Scripts.

Step 6: Check that all referenced CSS stylesheets, JavaScript libraries, and dependent UI Pages exist and are accessible by reviewing the HTML head section and any g:requires tags.

Step 7: Verify user permissions by testing the UI Page with an admin account and checking ACL rules on any tables or records accessed by the page scripts.

Step 8: If errors persist, create a simplified version of the UI Page with minimal code to identify which specific section is causing the failure, then gradually add functionality back.

Test Your Knowledge

Quick 3-question quiz. See how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue