I updated my application from 4.19 to 4.21 today and changed nothing else. I'm now seeing 20 of the following SyntaxError originating in [esri.views.layers.FeatureLayerView] show up in Chrome Dev Tools.
Here's the full 'message' property content:
Expected "!", "'", "(", "+", "-", "@", "CASE", "DATE", "EXTRACT", "FALSE", "INTERVAL", "N'", "NOT", "NULL", "POSITION", "SUBSTRING", "TIMESTAMP", "TRIM", "TRUE", "`", [ \t\n\r], [0-9], or [A-Za-z_\x80-] but "\"" found.
And here is the stack trace:
The error doesn't appear to impact anything in the application as far as I can tell. All layers are present and popups are working. Widgets that interact with layers and the legend are working. The number of errors doesn't match the number of layers in the application, or the number of GroupLayers the FeatureLayers are within, so the 20 repetitions is a mystery. Does anyone know if this is something to be concerned about?
It's unclear, but if you can provide a sample, might be able to help. Could be in the type of layer, definitionExpression, some query, arcade expression maybe. Not an easy way to see without a demo to test against.
Thanks for the suggestions, Rene.
Thanks to that I've narrowed it down to two layers which have label classes defined in ArcMap. Labels are not displaying in the JSAPI 4x application, but they are in ArcMap 10.8.1 and when the service is viewed directly in ArcGIS Online with both the old and new map viewers. Our ArcGIS Server is also on 10.8.1.
The label classes are defined with these parameters:
Class 1 -
Class 2 -
So, simple configuration as far as I can tell. When I remove the classes and label all features with [DISTRICT] or [NAME] the labels work in the app. The JS4x application never accesses or sets any labelling properties directly. Each FeatureLayer is created using the sublayer URL in the service, and has title, ID, visibility and listMode set on creation, and defaults to ["*"] for outFields.
Now that I've found this I notice the labels also don't work in the live 4.19 application, but the FeatureLayer errors don't show up in the console so I haven't noticed before. The two layers are the Spring Turkey and Fall Turkey Hunting District layers. Here's a link to the application with only the Spring Turkey layer loaded.
Any update on this? I have the same exact errors coming from the Tiger/web transportation layers: