I ran into a strange error today and thought it needed documenting. I have two WFE in a small farm. One server the navigation was fine but on the other server the navigation had an error. The Nodes where missing except for one code that said ERROR. When you mouse over it you got the followed exception and stack trace:
PortalSiteMapProvider was unable to fetch children for node at URL: /, message: Object reference not set to an instance of an object., stack trace: at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren(NodeTypes includedTypes, NodeTypes includedHiddenTypes, OrderingMethod ordering, AutomaticSortingMethod method, Boolean ascending, Int32 lcid) at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren(NodeTypes includedHiddenTypes) at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.GetChildNodes(PortalSiteMapNode node, NodeTypes includedHiddenTypes)
I fixed this by adding the second server to the Alternative Access Mappings (the first one was already in there). I apologize but I don't know the details of why this fixed the error. If I get time I will give into the details of the why.