I have a simple onclick handler which shows a context menu
var menu = new Windows.UI.Popups.PopupMenu();
menu.commands.append(new Windows.UI.Popups.UICommand("test", function () {
}));
menu.showAsync({ x: e.screenX, y: e.screenY }).then(null);
This works most of the time but from time to time I get a 'A method was called at an unexpected time.' exception (error number -2147483634) when calling showAsync().
Once this exception happens I'm unable to show any PopupMenu from there on.
I can't find any information about this error. Any clues?