Skip to main content

Does anyone have an idea why a workflow would start throwing this error after an upgrade to 4.5.0?

Comments

25 comments

  • Stefan Schweigert

    Hello Sean,

    Can you provide me with your workflow so that I can take a look? (sschweigert@latitudegeo.com)

    I don't recall anything specifically changing in the release related to those activities and token handling.

    Thanks, Stefan

    0
  • Kevin Penner
    I got this one the other day...

     

    I found that some of the geometries being passed to the client from the server in workflow had geometty points with x: NaN and y: NaN. The source if the issue is likely where you serialize a FeatureSet or IEnumerable<Graphic> to the client. Something happens upon deserialization and it fails at the 'N'.

     

    I can spin up a reproduction WF for QA here as I know exactly where it was failing, so don't worry about that.

     

    -Kevin
    0
  • Kevin Penner
    Quick update: I've reproduced this in a small workflow, filed it and the products team is now verfifying it. I've added you as a stakeholder to GVH-10362.

     

    Cheers,

     

    Kevin
    0
  • Kevin Penner
    Update: As a workaround, Latitude recommends checking and nulling out the invalid geometries before sending them to the client. I can spin up a sample if needed.
    0
  • Sean McClurkan
    Is the issue data content related?  If so, why does the same source data work in other viewers at a different version?  If you could provide a sample of the workaround, I'd appreciate it!
    0
  • Permanently deleted user
    I'm having the exact same issue. A sample of how to workaround this would be greately appreciated. Thank You!
    0
  • Sean McClurkan
    My workflow is failing when I launch a Display Form using a DataItemList created from the address candidates returned from the geocoding activity.  I'm not clear on where I can null out invalid geometries between the address candidate list conversion and the execution of the Display Form.  Why are the same address candidate geometries valid in other workflows where I don't convert them to a DataItemList?  

     

    The sample workaround you offered would definitely be welcome.
    0
  • Kevin Penner
    Sean, the issue is in the way that GVH parses all JSON. This is unfortunately a negative side effect which we are condifering as a defect.

     

    -Kevin
    0
  • Sean McClurkan
    Thanks for the quick response, Kevin.  I was wondering, though, for the IF activity in your sample, when would mapPoint.X ever not equal itself?

     

    IF

     

    not mapPoint.X = mapPoint.X OrElse not mapPoint.Y = mapPoint.Y

     

    THEN

     

    geometry="Nothing"

     

    Sean
    0
  • Kevin Penner
    Double.IsNaN(mapPoint.x) OrElse Double.IsNaN(mapPoint.y) will yield the same result.
    0
  • Permanently deleted user
    I'm not sure how to implement the fix provided because im receiving this error within my Geocode Address workflow and there isn't a feature class to cleanup.
    0
  • Kevin Penner
    Hi Laura,

     

    Please see this example for AddressCandidates. The main change is that we have a AddressCandidates instead of Graphics.

     

      <Activity mc:Ignorable="sap sap2010 sads" x:Class="ActivityBuilder" mva:VisualBasic.Settings="{x:Null}" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client" xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" xmlns:gce="clr-namespace:Geocortex.Core.Extensions;assembly=Geocortex.Core" xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi" xmlns:gfci="clr-namespace:Geocortex.Forms.Client.Items;assembly=Geocortex.EssentialsWpfApi" xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting" xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow" xmlns:gwa1="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow.Activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=System.Core" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=mscorlib" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <TextExpression.NamespacesForImplementation> <sco:Collection x:TypeArguments="x:String"> <x:String>System.Activities.XamlIntegration</x:String> <x:String>System.Activities.Validation</x:String> <x:String>System.Activities</x:String> <x:String>System.Activities.Statements</x:String> <x:String>System.Activities.Expressions</x:String> <x:String>ESRI.ArcGIS.Client</x:String> <x:String>ESRI.ArcGIS.Client.Geometry</x:String> <x:String>ESRI.ArcGIS.Client.Tasks</x:String> <x:String>Geocortex.Core.Extensions</x:String> <x:String>Geocortex.Workflow.Activities</x:String> <x:String>Geocortex.Forms.Client</x:String> <x:String>Geocortex.Forms.Client.Items</x:String> <x:String>Geocortex.Reporting</x:String> <x:String>System</x:String> <x:String>Microsoft.VisualBasic.Activities</x:String> <x:String>System.Collections.Generic</x:String> <x:String>System.Linq</x:String> <x:String>System.Windows.Markup</x:String> </sco:Collection> </TextExpression.NamespacesForImplementation> <TextExpression.ReferencesForImplementation> <sco:Collection x:TypeArguments="AssemblyReference"> <AssemblyReference>System.Activities</AssemblyReference> <AssemblyReference>ESRI.ArcGIS.Client</AssemblyReference> <AssemblyReference>Geocortex.Core</AssemblyReference> <AssemblyReference>Geocortex.Workflow</AssemblyReference> <AssemblyReference>Geocortex.EssentialsWpfApi</AssemblyReference> <AssemblyReference>Geocortex.Reporting</AssemblyReference> <AssemblyReference>System.Core</AssemblyReference> <AssemblyReference>System</AssemblyReference> <AssemblyReference>mscorlib</AssemblyReference> <AssemblyReference>PresentationFramework</AssemblyReference> <AssemblyReference>WindowsBase</AssemblyReference> <AssemblyReference>PresentationCore</AssemblyReference> <AssemblyReference>System.Xaml</AssemblyReference> </sco:Collection> </TextExpression.ReferencesForImplementation> <Sequence mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces"> <Sequence.Variables> <Variable x:TypeArguments="scg:IEnumerable(esri:AddressCandidate)" Name="addressResults" /> </Sequence.Variables> <gwa1:Geocode GeocodeServiceUrl="&quot;&quot;" Results="[addressResults]" sap2010:WorkflowViewState.IdRef="Geocode_1" /> <ForEach x:TypeArguments="esri:AddressCandidate" DisplayName="ForEach&lt;AddressCandidate&gt;" Values="[addressResults]"> <ActivityAction x:TypeArguments="esri:AddressCandidate"> <ActivityAction.Argument> <DelegateInArgument x:TypeArguments="esri:AddressCandidate" Name="result" /> </ActivityAction.Argument> <Sequence DisplayName="Check Geo"> <Sequence.Variables> <Variable x:TypeArguments="esri:MapPoint" Name="mapPoint" /> </Sequence.Variables> <If sap2010:Annotation.AnnotationText="Alternatively you can create a new featureset with only valid geometries" Condition="[not result.Location.X = result.Location.X OrElse not result.Location.Y = result.Location.Y]" DisplayName="This seems to work for checking NaN"> <If.Then> <Assign DisplayName="Null out geometry for this one"> <Assign.To> <OutArgument x:TypeArguments="esri:MapPoint">[result.Location]</OutArgument> </Assign.To> <Assign.Value> <InArgument x:TypeArguments="esri:MapPoint">[Nothing]</InArgument> </Assign.Value> <sap2010:WorkflowViewState.IdRef>Assign_1</sap2010:WorkflowViewState.IdRef> </Assign> </If.Then> <sap2010:WorkflowViewState.IdRef>If_1</sap2010:WorkflowViewState.IdRef> </If> <sap2010:WorkflowViewState.IdRef>Sequence_1</sap2010:WorkflowViewState.IdRef> </Sequence> </ActivityAction> <sap2010:WorkflowViewState.IdRef>ForEach`1_1</sap2010:WorkflowViewState.IdRef> </ForEach> <sap2010:WorkflowViewState.IdRef>Sequence_2</sap2010:WorkflowViewState.IdRef> <sads:DebugSymbol.Symbol>dyZDOlxVc2Vyc1xrcGVubmVyXERlc2t0b3BcV29ya2Zsb3cueGFtbAtBA2QOAgEBRQVFfQIBC0YFYQ8CAQJFPEVOAgEMRmtGfQIBCksJXhQCAQNPC1wQAgEET4YBT+QBAgEFUQ9ZGAIBBlY/VkgCAQlTQFNRAgEH</sads:DebugSymbol.Symbol> </Sequence> <sap2010:WorkflowViewState.IdRef>ActivityBuilder_1</sap2010:WorkflowViewState.IdRef> <sap2010:WorkflowViewState.ViewStateManager> <sap2010:ViewStateManager> <sap2010:ViewStateData Id="Geocode_1" sap:VirtualizedContainerService.HintSize="516,86" /> <sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="242,60" /> <sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="464,231"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="486,355"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="ForEach`1_1" sap:VirtualizedContainerService.HintSize="516,503" /> <sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="538,753"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="ActivityBuilder_1" sap:VirtualizedContainerService.HintSize="578,833" /> </sap2010:ViewStateManager> </sap2010:WorkflowViewState.ViewStateManager> </Activity>

     

     
    0
  • Permanently deleted user
    I modified my Workflow but now im getting the error message: Unhandled exception: 'Value cannot be null." Parameter name: source in activity: '1.86: VisualBasicValue<Int32>'.
    0
  • Kevin Penner
    Hi Laura,

     

    You may need to check that result.Location.x and result.Location.y is not nothing depending on how the data is returned.

     

    -Kevin
    0
  • Permanently deleted user
    I have not been able to figure out the fix for this. Everything was working before the upgrade so im not sure how the result would be nothing now. Is there a new geocoder workflow I could download to look at? Will there be a service pack to fix this bug in the future? Thank You!

     

     
    0
  • Sean McClurkan
    In added twist, I implemented the workaround above, but now I'm getting this interestng error:

     

    There was a workflow error running activity: Unexpected token N in JSON at position 899

     

    Thoughts?
    0
  • Kevin Penner
    It would seem like a NaN is still coming across. You can output the suspected FeatureSet to an Alert or Log activity by writing FeatureSet.ToJson() and then inspect the JSON for a NaN value. If present, the workaround did not work as expected.
    0
  • Sean McClurkan
    Where does the External Log activity write to?  I've converted my geocode results to a featureset and then I use an External Log activity to write it to JSON, but were did it wind up?
    0
  • Sean McClurkan
    Through the featureset.JSON to an alert.  Could not find NaN in the result.  What else could be mangling the JSON result to cause the error?
    0
  • Kevin Penner
    Hi Sean,

     

    External Log writes to the client log. 'Log' writes to the Essentials server REST log.

     

    Make sure that all FeatureSets/Data you could be using in client activities does not contain the NaN values. Be sure to set out of use objects to Nothing, or manage scope so they stay off the client.

     

    If it's still not apparent where the issue is, please open up a ticket with support and we'll get you up and running ASAP.

     

    Cheers,

     

    Kevin
    0
  • Permanently deleted user
    I might have a similar problem.  I have a geocoding workflow as well. It was working in 4.3/2.4, but when I copied the site over to 4.5/2.6 I get an error after it geocodes.  If it is a bad address and there are no results, it correctly gives that message.  But if there should be results it says: There was a workflow error running activity: Invalid character. 

     

    Thanks for your help,

     

    Mike
    0
  • Chris Dunlop
    I'm having the same issue as Mike. If there are results that should be returned it says "There was a workflow error running activity: Invalid character".  I've verified that there are no null geometries, both by looping through the address candidates and checking their Location.x and Location.Y properties, and by examining the REST call (http://webmaps.orcity.org/arcgis/rest/services/Geocoder_DualRanges/GeocodeServer/findAddressCandidates?Street=&City=&Single+Line+Input=16565+Nobel%2C+ORC&category=&outFields=Match_addr&maxLocations=&outSR=&searchExtent=&location=&distance=&magicKey=&f=pjson)

     

    Any ideas of a workaround for this scenario?

     

    Thanks

     

    Chris
    0
  • Malcolm Walker
    • Community-Manager

    Hi Mike and Chris,

     

    When you get an error, does it reference which activity had an error?

     

    There is a known issue with the Display Form activity, when the form elements are complex types.  Those don't serialize well when we send them out to be displayed.

     

    The workaround is to use a simple type (like a string) for display in your form, and then look up the complex value server-side using the string key.

     

    However, if you're not displaying a form then this won't be your issue!

     

    Regards,

     

    -Malcolm
    0
  • Permanently deleted user
    Today I upgraded my test server to the latest release (for Essentials & HTML5), and I am still having this issue. All of my workflows that use a Geocoding activity throw errors similiar to: 

     

    "There was a workflow error running activity: Unexpected token N in JSON at position 3619"

     

    Does anyone have a fix or work around? We can't move forward until all of our tools work, and I was told to keep waiting for the next release, and then the next and the next. Still nothing.

     

    Kevin, you stated 6 months ago in April that this was a known issue and would be fixed. Any status update on that?
    0
  • Amanda Frech
    Hi Laura,

     

    It looks like the issue that Kevin mentioned in April is GE-7933, which was fixed in Essentials 4.5.1. The issue that you have been experiencing looks like GE-8630 (sometimes listed as GVH-10564).  It is similar but specific to the use case of DataItems used by the Display Form activity.  This use case was unfortunatley not fixed previously, but it will be resolved in Essentials 4.7.

     

    Check out this post (https://support.geocortex.com/essentialsGSCForum?id=90660000000PDx4AAG)  for a similar case.

     

    Hope that helps,

     

    Amanda
    0

Please sign in to leave a comment.