SAP Knowledge Base Article - Public

3599775 - ODE Story : Fast page switch leads to failing onActive error

Symptom

  • After opening the Story and wait until the first page is loaded, go to page XX and then go to page ZZ and quickly back to page XX and quickly back to the ZZ page again, the error occurs:
  • Script execution failed for event "PageZZ.onActive"
    Correlation ID: 24308804-8813-4563-a454-534551111053
  • In the console, we can see the error 
    [FailedAction - Action: SET_SELECTEDVALUE@[{"app":"MAIN_APPLICATION"},{"story":"storyID"},{"dropdownBox":"e0715fa9-0510-4d63-a123-3ed096eee77f"}] - Error: Store.InstanceNotFound/Can not execute action "SET_SELECTEDVALUE" against instance [{"app":"MAIN_APPLICATION"},{"story":"storyID"},{"dropdownBox":"e0715fa9-0510-4d63-a123-3ed096eee77f"}] which doesn't exist.] 
  • It only happens if you switch Pages fast and it can happen on any page switch. 
  • In the onActive Event, a function switchPages() is called, which transfers the selection of a page filter between pages. In this case we try to set the selection in the dropdownbox TimeScenario4. We get the reference to the drop down widget in the switchPages() function by calling 
  • var Time_selection = currentPage.getWidgets({searchPattern: "TimeScenario", type: WidgetType.Dropdown})[0];
  • We checked with console.log(Time_selection); and this writes TimeScenario4 correctly in the console so it proves that this currentPage.getWidgets works correctly.
  • It seems to be a Timing issues that the Widget is not fully available at the time we try to set the selection.
  • If you switch the pages slowly, it always works fine. 

Environment

  • SAP Analytics Cloud 2025.1.5

Cause

Widget instance may not be ready when executing script of a revisited page.

Resolution

- Fix on 2025.8 version patch (QRC2 Release)
- Workaround : Set "Always initialize at startup" to checked of widget "ComparisonScenario4" in page "ZZ", including its parent widget "PreviousPeriod4"(also set its "Always initialize at startup" to checked.)

See Also

Your feedback is important to help us improve our knowledge base.

Keywords

onActive, dropdownBox, InstanceNotFound, Always initialize at startup , KBA , LOD-ANA-UNS-SCR , Unified Story Scripting related Issues , Problem

Product

SAP Analytics Cloud all versions