Test Service Host console missing
Hi,
I have followed the steps shown above. When I press F5, it successfully deploys to my SharePoint host but I do not see the "Test Service Host console". I have added <ContentType ID="0x0100781dd48170b94fdc9706313c82b3d04c" Name="ListFieldsContentType" Hidden="TRUE"></ContentType> to my schema.xml because I am not receiving the email but I suspect the problem is the fact that the "Test Service Host console" is not starting.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 7b8578d8-4703-1ac5-ae2e-f2ebbd85cdbb
- Version Independent ID: 075145ec-e01c-00bf-358d-4604fa25daad
- Content: Add a workflow to a SharePoint-hosted SharePoint Add-in
- Content Source: docs/sp-add-ins/add-a-workflow-to-a-sharepoint-hosted-sharepoint-add-in.md
- Product: sharepoint
- GitHub Login: @spdevdocs
- Microsoft Alias: spdevdocs
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
I added:
<!--Workflow debug-->
<ContentType ID="0x0100781dd48170b94fdc9706313c82b3d04c" Name="ListFieldsContentType" Group="Employee Orientation" Hidden="TRUE">
<FieldRefs>
<FieldRef ID="{6DF9BD52-550E-4a30-BC31-A4366832A87E" DisplayName="$Resources:core,AppendOnlyComments;" Name="V3Comments" Sortable="False"/>
<FieldRef ID="{e532d801-1bb0-44ee-beca-c7b24eebda4e}" DisplayName="Division" Required="False" Description="The division of the company where the employee works" Name="Division"/>
<FieldRef ID="{dd9bb4a5-2129-4cd8-bd95-a0e9b1086c65}" DisplayName="OrientationStage" Required="TRUE" Description="The current orientation stage of the employee." Name="Orientation Stage"/>
<FieldRef Name="LinkTitle" ID="{82642ec8-ef9b-478f-acf9-31f7d45fbc31}" DisplayName="Employee One" />
<FieldRef Name="Title" ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" DisplayName="Employee"/>
</FieldRefs>
</ContentType>
<!--End Workflow debug-->
``` to the schema to try and figure out why I am not getting workflows but it will not compile. Every time I try and build it, it fails with something like:
@"Error 1 CorrelationId: dacf1ff5-65cc-48fe-ab45-1d556296991f ErrorDetail: There was a problem with activating the app web definition. ErrorType: App ErrorTypeName: App Related ExceptionMessage: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). Source: AppWeb SourceName: App Web Deployment Error occurred in deployment step 'Install SharePoint Add-in': Failed to install SharePoint Add-in. Please see the output window for details.
Made some progress, now the console begins to start but it closes with an exception.
@"Error 1
CorrelationId: 6dc6fa5f-eb5a-46ee-9a31-26abdfc7d2b7
ErrorDetail: There was an error during the operation.
ErrorType: Configuration
ErrorTypeName: Configuration
ExceptionMessage: Operation failed with error Microsoft.Workflow.Client.AuthenticationException: A response was returned that did not come from the Workflow Manager. Status code = 401:
<Error><Code>401</Code><Detail>Missing authorization token. TrackingId:15dba733-6770-4e14-ac08-95dec60fa71e_G11, SystemTracker:tqm-service-request.servicebus.windows.net:IqQBMvn/QWCCco2iE0uHUiJ/bj1nlFQ5Rrk/PoeQ0Fg=/viRhn2mIsFqnf5zarEgTY2FxZIZatTdAVQT5TdpWWC4=/obj/5be11755-7f76-4ac8-bc59-d994635eae2c/60A26BC3-1B13-4AAF-806B-38CC8805B2D4/spo/260b0b94-68c7-49ef-8204-5adbe1a7ec46/c8484a0c-9579-4ab2-ae25-0782274bbc88/fd076bdb-9b5c-4d49-884a-01ccbbb5ea87, Timestamp:2019-09-09T19:18:22</Detail></Error> Client ActivityId : 6dc6fa5f-eb5a-46ee-9a31-26abdfc7d2b7. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
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)
--- End of inner exception stack trace ---
at Microsoft.Workflow.Client.ClientHelpers.ValidateServerResponseHeader(HttpWebResponse response, WebException webException, Guid traceActivityId)
at Microsoft.Workflow.Client.ClientHelpers.GetExceptionForErrorResponse(WebException webException, Guid traceActivityId)
at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
at Microsoft.Workflow.Client.WorkflowManagementClient.SendRequest[T](HttpWebRequest request, T content)
at Microsoft.Workflow.Client.ScopeManager.PublishScopeInternal(ScopeDescription description, String[] pathSegments)
at Microsoft.Workflow.Client.ScopeManager.PublishChildScope(String childScopeName, ScopeDescription description)
at Microsoft.SharePoint.WorkflowServices.SPWebWorkflowSecurityContext.CreateServiceGroup(String scopeAddress, ScopeDescription serviceGroup)
at Microsoft.SharePoint.WorkflowServices.SPWebWorkflowSecurityContext.CreateOrUpdateServiceGroup(SPWeb lookupWeb, SPAppPrincipal app)
at Microsoft.SharePoint.WorkflowServices.SPWebWorkflowSecurityContext.<SetupApplicationEcosystem>b__3()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivilegesCore(WaitCallback secureCode, Object param)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
at Microsoft.SharePoint.WorkflowServices.SPWebWorkflowSecurityContext.SetupApplicationEcosystem().
Source: Common
SourceName: Common App Deployment
Where do I set the authorization token?
The more context details you can provide, the easier it is to help assist on issues. Any code you can provide and/or screenshots of the issue also help. The easier you can make it to reproduce the issue, the easier and quicker it is for someone to help you. Things that always help posting with every issue include (1) SharePoint environment(s) (on-prem / SP 2016 / SP 2019 / SharePoint Online), (2) if SharePoint Online, is the tenant configured for standard / targeted release, (3) if SharePoint Framework, list the versions of installed tools (Node.js, NPM, Yeoman, Gulp, SPFx generator, etc... use npm list -g --depth=0), (4) if applicable, browser(s) tested, (5) if applicable, version of Office UI Fabric React & (6) anything else you can provide.
- Visual Studio version, etc...
- I'm running Visual Studio 2019.
- npm list -g --depth=0 returns --empty Working with SharePoint team to answer the other questions.
The NPM question was if you are working with the SharePoint Framework, which you aren't, you're doing workflow.
I am doing workflow. I am concerned because I cannot debug it, see errors posted above. I have also noticed that it does not like my Service Bus. The error I receive is "Error Microsoft.VisualStudio.SharePoint.TestServiceHostProxy: The Service Bus connection string provided is invalid." I copied the Service Bus address from "shared access policies" of the service bus I created two days ago.
What am I missing?
The SharePoint tenant is 2019.
If I visit http://
<Error xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Code>AuthenticationError</Code>
<Message>
Authentication Failed. Valid credentials must be provided for one of the following protocols: Negotiate.
</Message>
</Error>
What am I missing?
I now have the workflow debug console running and I can debug workflows. Two things I've noticed:
- The break point I set on the if condition in the WF is ignored.
- The workflow fails with the following message: Instance 'f5315031-051e-41c3-a8ea-3977b30cb0b9' of workflow 887cd008-71fb-482d-a7ef-d39c05337484 Status: Terminated; Details: RequestorId: 26d34922-ffb2-6d44-0000-000000000000. Details: System.Activities.Statements.WorkflowTerminatedException: Not at HR paperwork stage..
Not sure why it doesn't think I'm at the 'HR paperwork' stage.

I have the workflow working but the Title variable doesn't return anything.
. The subject and body both use Title + " is waiting in the lobby to fill out benefits and employment forms." I set a break point on the WF but it is ignored. What should I replace Title with?
If I set the body field to just title it fails with:
Instance 'd41a49c1-e681-40d4-b816-81eb23c929b3' of workflow 039c3889-ae63-4a9b-b4ce-169081759e4b Status: Started; Details: .
Instance 'd41a49c1-e681-40d4-b816-81eb23c929b3' of workflow 039c3889-ae63-4a9b-b4ce-169081759e4b Status: SystemSuspended; Details: RequestorId: 26d34922-ffb2-6d44-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentNullException: Value cannot be null.
Parameter name: Input
at Microsoft.Activities.Expressions.IndexOfString.Execute(CodeActivityContext context)
at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation).
Apparently, the Title variable is NULL. How do I address that?
This issue has turned into less about the OP and rather walking through debugging & troubleshooting multiple problems with your workflow. As such, I'm going to close it as there are multiple things going on that have been resolved. If you please a NEW issue for each question / issue you are having.
FWIW, from what you've posted, it's not clear what activity you're using (see my above statement... the play-by-play makes it hard to follow). Suggest you look at the docs at the specified activity you are using and see what fields are required / optional as the error indicates you are not setting a required parameter: Exception details: System.ArgumentNullException: Value cannot be null.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues