Error {code: 500, message: "Unable to generate legends: - breaking Nianwei Liu's TOC

Discussion created by amarsden on Sep 11, 2013
Latest reply on Apr 10, 2014 by dnalder

I am using Nianwei Liu's TOC - however sometimes the expand tree graphic isn't appearing.

I have several dynamic map services and add them all into the TOC.  Mostly this is fine.

However when it fails I get

"Unable to generate legends: zzzzz?Unable to connect to Host: zzzzz Port: -1?Please verify the Service URL specified is correct :- http://zzzzz/arcgis/services/LIVEinternal/aerials/MapServer?"

This happens about 20% of startups.  The Dynamic Service is there and at other times it is fine.

I can see why it breaks the TOC, as without any legends it can't build up the child nodes in functon
_createRootLayerNode as there is a IF statement that relies on a renderer being present.