Errors were found when compiling the workflow. The workflow files were saved but cannot be run.
Unexpected error on server associating the workflow.
I ran into this error message in SharePoint Designer 2013 when trying to publish a modified copy of the Publishing Approval workflow in SharePoint Online (Office 365), and the search results I found did not help. I figured I would post about it in case someone else runs into this.
The main issues that cause this error message is two fold. One is there is a bug with copying and pasting items in SharePoint 2010 workflows. Once I found that out, I went ahead and manually creating my steps.
The other is that the workflow is too large. I ran into this when creating a copy of the Publishing Approval SharePoint 2010 workflow. I went through and manually added additional approval tasks. Once I added the 5th additional approval task the workflow would no longer publish, and I would receive the error message above. Once I deleted the 5th additional workflow it would publish fine. I could not get over a total of 5 approval tasks in a SharePoint 2010 workflow to work.