sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Error logging for Site Designs and Site Scripts

Open lworkman opened this issue 8 years ago • 5 comments

Hi there,

I'm finding that a lot of the flow actions in my site designs are failing immediately when provisioning a site. The pop-out displays a generic error message when I load the site which doesn't give any information about what exactly when wrong.

The frustrating part, though, is that the flow itself doesn't have any record of being called. This leads me to believe that the action is failing before it even makes it that far.

However, as I said, this is seemingly random. I can make 10 sites and 8 of them work perfectly, but the other two fail for some other reason. Having some way of seeing the errors generated by a site design would let me better troubleshoot, instead of fumbling around in the dark.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

lworkman avatar Oct 16 '18 15:10 lworkman

Could you please provide the scripts you have run and the error messages after you run the script?

KingKangMSFT avatar Oct 17 '18 07:10 KingKangMSFT

Here's an example of a site script failing for no seeming reason:

image

All of the list creation scripts use the same action, which calls a flow and passes in some list creation parameters. I've included the one that failed below, with the URL removed:

{
  "$schema": "schema.json",
  "actions": [
    {
      "verb": "triggerFlow",
      "url": "",
      "name": "Create Status Report List",
      "parameters": {
        "listTitle": "Status Report",
        "listTemplate": 100,
        "fields": [
          {
            "title": "Accomplishments",
            "type": "Multiline"
          },
          {
            "title": "Budget",
            "type": "Choice",
            "description": "Green - Negative variance under 15%; Yellow - Negative variance 15-20%; Red - Negative variance over 20%.",
            "choices": [
              "Red",
              "Yellow",
              "Green"
            ]
          },
          {
            "title": "Budget Comments",
            "internal": "BudgetComments",
            "type": "Multiline"
          },
          {
            "title": "Due Date",
            "internal": "TaskDueDate",
            "type": "DateTime"
          },
          {
            "title": "Next Milestone",
            "internal": "NextMilestone",
            "type": "DateTime"
          },
          {
            "title": "Next Milestone Description",
            "internal": "NextMilestoneDescription",
            "type": "Multiline"
          },
          {
            "title": "Percent Complete",
            "internal": "PercentComplete1",
            "type": "Number"
          },
          {
            "title": "Project Manager",
            "internal": "ProjectManager",
            "type": "User"
          },
          {
            "title": "Quality",
            "type": "Choice",
            "choices": [
              "Red",
              "Yellow",
              "Green"
            ]
          },
          {
            "title": "Quality Comments",
            "internal": "QualityComments",
            "type": "Multiline"
          },
          {
            "title": "Schedule",
            "type": "Choice",
            "description": "Green - Milestone reached within the quarter (+/- weeks); Yellow - Milestone delayed 1 quarter (+/- 2 weeks); Red - Milestone delayed more than 1 quarter.",
            "choices": [
              "Red",
              "Yellow",
              "Green"
            ]
          },
          {
            "title": "Schedule Comments",
            "internal": "ScheduleComments",
            "type": "Multiline"
          },
          {
            "title": "Scope",
            "type": "Choice",
            "choices": [
              "Red",
              "Yellow",
              "Green"
            ]
          },
          {
            "title": "Scope Comments",
            "internal": "ScopeComments",
            "type": "Multiline"
          },
          {
            "title": "Status",
            "type": "Choice",
            "choices": [
              "(1) Not Started",
              "(2) In Progress",
              "(3) In Distribution",
              "(4) Approved",
              "(5) On Hold",
              "(6) Deferred",
              "(7) Cancelled",
              "(8) Project Closed"
            ]
          }
        ]
      }
    }
  ],
  "version": 1
}

I can understand that there might be something wrong in the site script, but it would be really helpful if SharePoint provided more debugging information somewhere.

lworkman avatar Oct 17 '18 18:10 lworkman

could you provide the information as follows:

  1. The flow run history logs (Create Status Report List)
  2. The flow's trigger and action information (Create Status Report List)
  3. How many triggers flow have you created?

vmiy avatar Nov 01 '18 06:11 vmiy

  1. The flow history logs have no record of that site action being called. What do you want from the logs? The same flow is used by all the list creation actions, so it'll just show the rest of the calls being fulfilled with no indication it was called by "Create Status Report List".
  2. The flow is triggered by an HTTP request and sends an HTTP request to an azure function. It doesn't do anything else.
  3. Probably dozens. I've made lots of flows, and it's only when using site scripts have I run into problems where they aren't called consistently.

lworkman avatar Nov 02 '18 17:11 lworkman

This issue is being closed as part of an issue list cleanup project. Issues with no activity in the past 6 months that aren't tracked by engineering as bugs were closed as part of this inititive. If this is still an issue, please follow the steps outlined to re-open the issue.

msft-github-bot avatar Jan 22 '20 21:01 msft-github-bot