0

WDKUpdateCheck widget in simulator fails

I have the Simulator up and running, but I get the following displayed in the sidebar running the WDKUpdateCheck widget:
"An error occurred checking for updates."

The following log is produced:
WM 00:20:27:761: [T:3125] [KONtx/WDK Update Check] {HostEventManager} :: Got HostEvent: onShowView
WM 00:20:27:762: [T:3125] [KONtx/WDK Update Check] {HostEventManager} :: Sent HostEvent: setWaitIndicator
WM 00:20:27:762: [T:3125] ******* main._handleWaitIndicatorChanged(): App ID = com.yahoo.widgets.tv.wdkupdate
WM 00:20:27:762: [T:3125] ******** main.updateWaitIndicator(): Visible = null
WM 00:20:27:762: [T:3125] ******** Utils.Doggy.kill()
WM 00:20:27:762: [T:3125] ******** main._updateWaitIndicator(): Visible = 1
WM 00:20:27:764: [T:3125] ** AppManager.handleChildEvent() Handled @event [object HostEvent]
WM 00:20:27:764: [T:3125] [KONtx/WDK Update Check] {HostEventManager} :: Got HostEvent response: setWaitIndicator
WM 00:20:27:764: [T:3125] WDK Update Check set busy indicator state to: small spinner only
WM 00:20:27:764: [T:3125] [KONtx/WDK Update Check] {SidebarView-4} :: _onShowView
WM 00:20:27:764: [T:3125] ################# WDKUPDATE SIDEBAR ###############
WM 00:20:27:764: [T:3125] state: -1 list: 0
WM 00:20:27:764: [T:3125] newtext: An error occurred checking for updates.

However, the state seems get set to -1 only in the updateCheck.onError() method.
But I don't see the following line in the log file:
CODE
       log('***************** WDKUPDATE: UPDATE CALLBACK onError start ***************');


Could someone help explain how/where this state is getting set?
BTW: I'm running WDK version1.0.0.0 and Kontx version 1.2.25

by
2 Replies
  • Look up above those logs and you should see

    CODE
           log('***************** WDKUPDATE: UPDATE CALLBACK onError start ***************');


    The actual check is performed when the snippet is loaded, not when you launch the sidebar. The sidebar only checks the state of the initial check started from the snippet.

    This is the updateView method of the snippet:

    CODE
    updateView: function() {
    updateCheck.check(this.updateCallback.bindTo(this));
    }

    This calls the check method in check.js. The check method then calls the following which is in gallery.js

    CODE
    GalleryUpdate.getWidgetUpdates(0, this.checkCallback);

    When the check is performed, any number of exceptions would cause the state to be -1.

    I have an issue with the WDKUpdateCheck widget myself, and found the issue by dumping the exception in the onError method as follow:

    CODE
    onError: function(e) {
    log('***************** WDKUPDATE: UPDATE CALLBACK onError start ***************');
    log($dump(e));
    ...

    I got:

    CODE
    WM 00:00:01:372: [T:645] {
    exceptionStatus => ,
    code => 11,
    message => {
    message => Call to system.network.available failed,
    fileName => Javascript/gallery.js,
    lineNumber => 1370,
    stack => Error("Call to system.network.available failed")@:0
    0
  • Ok, thanks.
    That is what I did not understand, that it is run on load.

    BTW, I have the same problem with "Call to system.network.available failed".
    In a search of the forums I found this:
    http://developer.yahoo.net/forum/index.php...twork.available
    where someone states that the system object really doesn't map to anything.
    Not sure if this is a valid statement, but in the Dev manual they mention to call a KONtx.application.getNetworkDownStatus() function, but this is returning its own error:
    WE 00:03:33:246: [T:4788] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    WE 00:03:33:246: [T:4788] ERROR!ERROR!ERROR!ERROR!ERROR!
    WE 00:03:33:246: [T:4788] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    WE 00:03:33:246: [T:4788] IQ Test Widget [com.ineoquest.widgets.tv.test]
    WE 00:03:33:246: [T:4788] TypeError: KONtx.application.getNetworkDownStatus is not a function (subview1.js: Line 50)
    WE 00:03:33:246: [T:4788] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    I'm calling from the following snippet:
    CODE
            checkNetwork: function() {
    var status = !KONtx.application.getNetworkDownStatus();
    log("Network Status: " + (status ? "Connected":"Disconnected"));
    }
    0

Recent Posts

in Getting Started / Beginners - Yahoo! TV Widgets