Exception when updating application tile in simulator RRS feed

  • Question

  • The following error is printed in the debug console when running the app in the simulator:

    0x803e0102 - JavaScript runtime error: The application identifier provided is invalid.

    when this code is called:

    var notification, tile, tileAttributes;
    tile = TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileWideText03);
    tileAttributes = tile.getElementsByTagName("text");
    tileAttributes[0].appendChild(tile.createTextNode("" + count + " items"));
    notification = new TileNotification(tile);
    TileUpdateManager.createTileUpdaterForApplication().update(notification); // Exception

    Since I cannot set the application identifier anywhere, I guess its an error with a faulty installation of my app?

    I also got the feeling that tile updates not always work in the simulator
    • Edited by phil_ke Tuesday, March 27, 2012 3:06 PM
    Tuesday, March 27, 2012 3:05 PM

All replies

  • Hi,

    Did it work in non-simulator environment? If you want to update tile against the calling app, app identifier is not needed. Only when you want to update the tile against another app within the same package, this parameter (app identifier) is needed.

    Please first uninstall your app and then refer to App tiles and badges sample to build up a new app from scratch for test.

    Best wishes,

    Robin [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 28, 2012 7:41 AM
  • Uninstalling the app does not solve the problem in the simulator. Its working fine when I use the local machine as target.

    I know that the app identifier is not needed if I wan to update the tile against the running app. Thats what my code shows. The exception error message just makes no sense. If the installation of the app is corrupted in the simulator the exception should say something "app id does not match installed app" or something. The current error message is missleading for the very fact, that I did not even provide an application identifier.

    Wednesday, March 28, 2012 7:53 AM
  • Hi Phil,

    Did you work around this?  It seems there is an issue with the simulator start.  If you still are having issues, try restarting the machine and see if the problem persists.


    Jeff Sanders (MSFT)

    Wednesday, March 28, 2012 2:36 PM
  • The problem persists through system restarts. Its only happening in the simulator.
    Tuesday, April 3, 2012 1:57 PM
  • I have a similar problem.  Tile update works on local machine but not in simulator...  This is my simple update that doesn't work...

    function sendTileTextNotificationWithXml() {
        var Notifications = Windows.UI.Notifications;
        // get a XML DOM version of a specific template by using getTemplateContent
        var tileXml = Notifications.TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileWideText03);
        // You will need to look at the template documentation to know how many text fields a particular template has
        // get the text attributes for this template and fill them in
        var tileAttributes = tileXml.getElementsByTagName("text");
        tileAttributes[0].appendChild(tileXml.createTextNode("Hello World! My very own tile notification"));
        // create the notification from the XML
        var tileNotification = new Notifications.TileNotification(tileXml);
        // send the notification to the app's application tile


    Wednesday, May 23, 2012 12:24 AM
  • This looks like it is a bug in a simulator.  Is there something preventing you from running this on the machine instead so that you can continue working?


    Jeff Sanders (MSFT)

    Wednesday, May 23, 2012 1:20 PM
  • Hi jpsanders,

    I am facing same issue in my metro app.Is there any fix available?


    Thursday, June 21, 2012 6:12 AM
  • No there is not, you will need to test this outside of the simulator.

    Jeff Sanders (MSFT)

    Thursday, June 21, 2012 11:43 AM
  • Hi Jeff Sanders ,

    Thanks for response.

    I am facing one more issue-when i add user control reference in any page then it's showing error "Xaml parsing failed" but after running the application it's working fine.why?

    Friday, July 6, 2012 10:44 AM
  • I am not sure.  For XAML issues you should post details of your problem in the C#, VB.Net or C++ forum however since this is an HTML/Javascript forum. 

    Jeff Sanders (MSFT)

    Friday, July 6, 2012 12:35 PM
  • I did not receive the error in the simulator. But secondary tiles that I pinned in the simulator caused the "Application Identifier" error when I ran it locally. Removing the secondary tiles I pinned in the simulator stopped the error. Updates to my secondary tiles in the simulator did not error out but they did not work either.

    Everything runs fine locally after removing the secondary tiles that I pinned in the Simulator.

    I hope this saves someone from wasting time errors that are IDE related and not really code related.

    Tuesday, January 14, 2014 9:06 PM