4.19 to 4.21 update, new errors in console

852
3
11-17-2021 02:43 PM
by Anonymous User
Not applicable

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.

SyntaxError screenshotSyntaxError screenshot

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:

FLV_syntaxError_trace.PNG

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?

0 Kudos
3 Replies
ReneRubalcava
Frequent Contributor

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.

0 Kudos
by Anonymous User
Not applicable

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 -

  • SQL Query: "DISTRICT" IS NULL
  • Expression (VBScript): [NAME]
  • Default scale range and placement properties
  • Text halo

Class 2 -

  • SQL Query: "DISTRICT" IS NOT NULL
  • Expression (VBScript): [DISTRICT]
  • Default scale range and placement properties
  • Text halo

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.

0 Kudos
NilsBabel1
Occasional Contributor

Any update on this?  I have the same exact errors coming from the Tiger/web transportation layers:  

 
The service has labels on the layers but my JavaScript 4.20.2 application does not have labels turned on for the layer.  The layers and application seem to be working without issue.  But the errors in the console do not look good.  Any help would be appreciated.  Thanks very much.
0 Kudos