PowerDocu icon indicating copy to clipboard operation
PowerDocu copied to clipboard

Security Error: Graphviz layout returned error code -1

Open karolfilipowicz opened this issue 1 year ago • 10 comments

Describe the bug When attempting to generate documentation for my solution I get the Graphviz layout returned error code -1 error and noting except the folder get created

To Reproduce Steps to reproduce the behavior:

  1. Run the .exe file from the 1.2.4 self-contained version
  2. Select any solution
  3. Error occurs

Expected behavior Solution documentation is created

Screenshots image image

karolfilipowicz avatar Dec 29 '23 09:12 karolfilipowicz

I have the same problem.

Since the target framework ".NET Core 3.1" is out of support, I upgraded the projects to .Net 8 and all the NuGet packages to the latest versions.

The upgrade processes are easy. There are some small fixes but there is no too much trouble. The only exception is "Rubjerg.Graphviz" NuGet package. When using V1.1.0 of the package the projects are compiled and working fine. However, if upgrading the package to V2.0.0, I got the "Security Error" very similar to the karolfilipowicz described.

I hope someone can help to figure out this mystery and (maybe) upgrade the projects to .Net 8.

CyberArcadian avatar Jan 02 '24 23:01 CyberArcadian

Think I have identified the problem (reported it on the Rubjerg.Graphviz github repo) and have a workaround to make it work. Also updated my solution to .Net 8, had a few successful tests. Will continue testing, and if no further issues are found I'll release an updated version in the coming days

modery avatar Jan 18 '24 13:01 modery

Rene, Thanks to get back to me for this issue. While you are working on the code. I have a suggestion as following: In our environment, the PowerDocu.GUI is required to "Run as Administrator" when click on the button, "Update your existing set of connector icons". The problem is the cached icons are written to the Resources\ConnectorIcons folder under the program installation location. I have a quick fix to change the line (ConnectorHelpers.cs, line 18) to private static readonly string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"" + AssemblyHelper.GetApplicationName() + @"\ConnectorIcons";

Where the new function AssemblyHelper.GetApplicationName() is implemented in AssemblyHelper.cs as: public static string GetApplicationName() { return Assembly.GetEntryAssembly().GetName().Name; }

This will create the icon cache in the folder under C:\Users(UserName)\AppData\Roaming and users won't need "Run As Administrator" to perform the function.

CyberArcadian avatar Jan 18 '24 17:01 CyberArcadian

The Graphviz issue should be fixed as part of today's 2.0.0 release. Can you confirm this?

Will test the recommendation for the connectors next

modery avatar Feb 13 '24 14:02 modery

Rene,

I Confirmed the Rubjerg,Graphviz version 2.0.2 works correctly with PowerDocu v2.0.0 without exception or errors. Thanks a lot.

CyberArcadian avatar Feb 15 '24 21:02 CyberArcadian

Replaced the location for the connector icons as recommended by you (https://github.com/modery/PowerDocu.Common/commit/ab7646e3af9ebebc215b878dd109fa1a4d938aaa), will be part of the next release

modery avatar Feb 16 '24 03:02 modery

Hi @modery! So sorry to get back to you so late. Unfortunately I get another error now but still related to Graphviz image

karolfilipowicz avatar Apr 01 '24 08:04 karolfilipowicz

Does this happen for a single Flow only or for all?

modery avatar Apr 01 '24 15:04 modery

I believe it happens for all flows. image

karolfilipowicz avatar Apr 02 '24 07:04 karolfilipowicz

Replaced the location for the connector icons as recommended by you (modery/PowerDocu.Common@ab7646e), will be part of the next release

This is now live in 2.0.1

modery avatar Jul 13 '24 06:07 modery