Tuesday, September 20, 2016

SharePoint 2013: This form cannot be opened in a web browser.


Problem

This message appears to be associated with several different problems.  The particular problem discussed here involves experiencing this message when trying to run a 2010 workflow.  This posting captures the steps undertaken to resolve this problem.
Created a new 2010 workflow using SharePoint Designer 2013 (SPD), saved it and published it successfully.  No errors were encountered when performed a "Check for Errors" in SPD.  When then tried to execute the workflow, saw the following message:
After clicking the Close button, then saw this message:
This experience was repeatable.

Troubleshooting

  1. Try to repeat problem
    1. Found that problem occurred whenever tried to run the workflow.
  2. Try workflows in other lists and site collections
    1. Found that 2010 workflows created and deployed to lists in other site collections worked fine.  Problem localized to target site collection.
  3. Try other accounts
    1. Found that problem persisted no matter what account used to create and deploy and run workflow.
  4. Check ULS
    1. Found several messages ( among 20 associated with problem correlation ID)  indicating potential access or permissions issue: 
      1. Cannot open file ".../Workflows/SendStatusUpdate/SendStatusUpdate.xsn".
      2. System.Runtime.InteropServices.COMException: Cannot open file "Workflows/SendStatusUpdate/SendStatusUpdate.xsn".,...
      3. The XSN is null and its not a cross server issue. Most likely a permission issue
  5. Check Workflows document library permissions
    1. Found that the Workflows document library had same permissions as website.
    2. Found that versioning was enabled.  Disabled this, tried to run workflow again: still got error.
    3. Found that two workflow files, the .XOML and .XSN files, were listed in the document library's Manage files which have no checked in version listing, when viewed under different accounts (one standard and another an admin).  Using the other admin account, took control over the files in the hope that the other admin account could then check them in.  After performing this operation, experienced error when attempting to navigate back to this page: could not bring page up; in fact, also could no longer navigate to the document library's Settings page.  Since this was root site collection website, and on development, performed restore of site collection database to return to initial state: was able to get back to library's Settings page and also view the no checked in version listing again.
  6. Check Website Permissions
    1. Verified that account used to create the workflow, an admin account, was a member of the site collection administrator group.  
    2. Added the account used to create the workflow, an administrator account, to the Full Control group of the website containing the list.  Afterwards, noted that Limited now appeared next to the Full Control designation in the website's permissions listing (showed Full Control, Limited).  After this, added admin account to website permissions and specifically granted Full Control: the Limited designator no longer appeared.
  7. Explore issue in SharePoint Designer
    1. In SPD, connected to website using an admin account.  Then in the left Navigation panel, expanded All Files > Workflows, and then selected the target workflow.  The right action panel listed the constituents of this workflow (four items).  Two of these items, the .XOML and .XSN, were indicated as being checked out.  Selected the .XSN file and then clicked the Delete button.  This resulted in an error prompt:
      Microsoft SharePoint Designer
      Server error: The file "[website URL]/Workflows/WorkflowName/WorkflowName.XSN" is checked out for editing by [another admin account].
    2. Next, clicked the Check In button.  This resulted in another error prompt:
      Microsoft SharePoint Designer
      We can't do that for you because the file is no longer checked out or has been deleted. 
    3. In SPD, created and published another test workflow attached to same list and attempted to run: experienced same type of error.
  8. Internet Research
    1. Conducted search on "SharePoint 2013 We can't do that for you because the file is no longer checked out".  This didn't seem to apply as it essentially discussed checking files in and this was already proven impossible using SPD capabilities.
    2. Conducted search on "SharePoint 2013 This form cannot be opened in a Web browser. To open this form, use Microsoft InfoPath".  All of the search results involved Infopath issues.  These didn't seem to apply. Reference 3 indicated that the SharePoint Server Enterprise Site Collection features should be activated.  Checked this and found that it was activated. Reference 4 indicated browser configuration and Infopath issues; however, these didn't seem to apply.
    3. Conducted search on "SharePoint 2013 workflow files checkin".  Reference 5 seemed to provide the right clues: it discussed the same error messages but associated with content type configuration.  This seemed to have more likelihood of applying to current situation.  Returned to troubleshooting.
  9. Check Workflows document library content type configurations
    1. Launched SPD, expanded All Files to Workflows document library, right-clicked on Workflows document library and chose Properties...  Reviewed Workflows tab in action panel. Reviewed Content Types section.  Did not find Document content type (as discussed in reference), but found User Workflow Document content type instead. Clicked on User Workflow Document.  User Workflow Document tab appeared. In Customization section, clicked on Edit content type columns.  Found that Title property was set to Required.  
    2. Selected Title property, and then clicked on Administration Web Page button displayed in SPD.  Changed setting to Optional, and then clicked OK.
    3. Created new, simple workflow attached to target list (wrote to log only).  Manual trigger. Completed successfully.  Repeated testing and again completed succesfully.  Problem determined to be resolved.

Solution

  • Check the website's Workflows document library User Workflow Document content type and ensure that its Title property is set to Optional.
  • If making this change still results in the error message, try creating a new workflow to the same list.  The new workflow must have a different name.

References

  • This document folder does not normally appear by default, when viewing a website's Site Contents page.  To make it appear, the document folder's Hide from browser General Setting must be disabled.  To do this:
    1. Launch SPD
    2. Connect to the target website
    3. In the left Navigation panel, scroll down to the Workflows document folder.
    4. Right-click on this folder, and then select Properties...
    5. In the right Action panel, look for the Settings section.
    6. Uncheck the Hide from browser setting.
    7. Save.
  • tbd


No comments: