Monday, July 20, 2015

SharePoint 2013: Workflow 2013: Sorry, something went wrong


Your users report that, when they launch a 2013 workflow, nothing happens for a minute or two, and then they are presented with the Sorry, something went wrong, page (below).  Workflow foundation is installed to a SharePoint application server.  Your farm is patched through June 2015.

  1. Tested all 2013 workflows available from the web application and found that all 2013 workflows failed.  
  2. Testing 2010 workflows and found that they continued to function as expected. 
  3. Checked that the following services were started on the server hosting Workflow Foundation:
    1. Service Bus Gateway
    2. Service Bus Message Broker
    3. Windows Fabric Host Service
    4. Workflow Manager Backend
  4. Checked the Unified Logging System (ULS) logs and found a block of messages associated with the correlation ID.  Some examples:
    A runtime exception was detected. Details follow. Message: Thread was being aborted. Technical Details: System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext) at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext) at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result) at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content) at Microsoft.Workflow.Client.HttpWorkflowNotificationPublisher.OnPublishNotification(String address, WorkflowNotification notification, ICredentials credentials, String userCulture, Guid traceActivityId, TimeSpan requestTimeout) at Microsoft.Workflow.Client.WorkflowNotificationPublisher.PublishNotification(String address, WorkflowNotification notification, ICredentials credentials, String userCulture, Guid traceActivityId, TimeSpan requestTimeout) at Microsoft.Workflow.Client.WorkflowManagementClient.PublishNotification(WorkflowNotification notification, IDictionary`2 activationMetadata, Int64 expectedScopeRevision) at Microsoft.SharePoint.WorkflowServices.WorkflowProxy.PublishEvent(String eventSource, String eventType, IDictionary`2 payload, SPUserToken userToken)
    Leaving Monitored Scope (Event Receiver (Microsoft.SharePoint.WorkflowServices, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c, Microsoft.SharePoint.WorkflowServices.ContentSubscriptionEventReceiver)). Execution Time=118831.7039
    and others
    This block of messages recurred whenever a 2013 workflow was initiated.
  5. Launched elevated SharePoint Management Shell, and then executed the following to check on Workflow and Service Bus configuration status:
    Get-WFFarm Get-WFFarmStatus Get-SBFarm Get-SBFarmStatus
  6. Opened a browser, and then connected to:
    https://[FQDN]:12290 or http://[FQDN]:12291
    where FQDN is the fully qualified domain name of the server hosting the farm's workflow foundation.
  7. Check installed versions
    1. Workflow Manager 1.0: 2.0.20922.0
    2. Workflow Manager client 1.0: 2.0.40131.0
    3. Service Bus 1.0: 2.0.20922.0
    4. Windows Fabric: 1.0.960.0
After performing these steps, you find that everything checks out as you would expect if everything was running normally; and no immediately obvious issue is found. Yet, the fact remains that when a 2013 workflow is triggered, it eventually returns an error.

  1. Perform upgrade using: Psconfig.exe -cmd upgrade -inplace b2b -wait -force.
  • I discovered this solution accidentally: after installing the July 2015 patches, which requires you to execute psconfig in order to do the upgrade, and then doing the usual regression testing, I found that, as a bonus, the workflow problem was resolved. Later, I was informed by Microsoft Support that psconfig was one of the options they were considering to resolve our workflow problem (I had previously opened a support ticket with them).

No comments: