This article explains why OmniScript fails to load on an Experience Cloud site with the error "Failed to find definition for dependency: runtime_omnistudio_omniscript/omniscriptError : undefined" and provides steps to restore normal execution.
This error occurs when a required OmniStudio runtime dependency does not load successfully during the browser session. The OmniScript cannot complete initialization and stops executing. The failure is typically transient — caused by a momentary browser, cache, or network condition — and does not consistently reproduce across users or sessions.
Salesforce OmniStudio includes built-in versioned static assets, cache management, and resilient runtime resource loading to reduce the frequency of this type of failure. However, transient conditions can occasionally prevent a required resource from loading during the initial application load, and recovery within the same browser session is limited without a page refresh.
Who is affected: Users running OmniScripts embedded in Experience Cloud (formerly Community Cloud) sites. The issue typically affects a single user in an isolated session rather than all users simultaneously.
Important: Refreshing the browser or clearing the cache during an active OmniScript session will discard any unsaved user input. Where possible, advise users to save progress before attempting recovery steps.
The following steps address the immediate error and reduce the likelihood of recurrence. Start with the quickest recovery actions before moving to site-level remediation.
Immediate recovery steps (perform in order):
Best practices to reduce future impact
• Enable Save for Later or Resume functionality in your OmniScript so users can recover their progress after a session interruption.
• Configure autosave on step navigation where your OmniScript implementation supports it.
• Break long OmniScript journeys into shorter, resumable flows to limit data loss if a transient failure occurs.
• Republish the Experience Site after any significant OmniStudio metadata changes, package upgrades, or org deployments to ensure the latest runtime resources are served from the CDN.
005387748

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.