Windows Dev Center

0x800a138f - JavaScript runtime error: Unable to get property 'dispatchEvent' of undefined or null reference


  • I'm navigating back and forth in my application and I get this error a number of times.

    It comes from ui.js file.

     msWriteProfilerMark("WinJS.UI.ListView:loadingStateChanged:" + state + ",info");
                    this._loadingState = state;
                    var eventObject = document.createEvent("CustomEvent");
                    eventObject.initCustomEvent("loadingstatechanged", true, false, detail);

    What should I do to prevent this error.

    I'm using RC.

    Tuesday, September 11, 2012 12:59 PM


All replies

  • Hi

    I suggest you migrate you project to RTM.

    Some known issue have been fixed in RTM.

    So maybe after you migrate, you can get right behavior.

    And for migration please also Migrating you windows OS to RTM.

    Refer to Migrating your Release Preview app to Windows 8.

    Hope it helpful.



    • Marked as answer by spesalvi Saturday, September 15, 2012 10:35 AM
    Friday, September 14, 2012 1:39 AM
  • Hi,

    I am getting the same error at same point in ui.js. I have migrated to RTM.

    This happens when I navigate to a page with a listview and press back button before the list view loads completely.

    It doesn't happen when I press back button after the listview loads.

    The listview loads from a custom grouped datasource(indexeddb).

    Any help here?


    Sunday, October 07, 2012 2:04 PM
  • ner9G, can you share some more information about the structure of your app?

    Are you doing anything to the ListView before navigation?

    Is it incremental/randomAccess loading behavior?

    Can you reproduce the behavior with a smaller data source? Or even using a Binding.List?


    Monday, October 08, 2012 6:04 PM
  • Hi,

    I can reproduce the error after stripping down to just a pagecontrol with the listview.

    If I change the datasource from indexeddb to a binding list it goes to terminateAppHandler in base.js.

    I can reproduce the error with a smaller datasource, if I click the back button quick enough. I have around 2500 items in database, can reproduce with around 1000 items. 

    I can send you the files if you need them. 

    • Edited by ner9G Wednesday, October 10, 2012 7:23 PM typo
    Wednesday, October 10, 2012 7:22 PM