modery / PowerDocu

Generate technical documentation from your existing Power Automate Flows and Power Apps canvas apps
MIT License
441 stars 73 forks source link

Security Error: Graphviz layout returned error code -1 #128

Open karolfilipowicz opened 11 months ago

karolfilipowicz commented 11 months ago

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

CyberArcadian commented 11 months ago

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.

modery commented 10 months ago

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

CyberArcadian commented 10 months ago

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.

modery commented 9 months ago

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

CyberArcadian commented 9 months ago

Rene,

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

modery commented 9 months ago

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

karolfilipowicz commented 8 months ago

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

modery commented 8 months ago

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

karolfilipowicz commented 8 months ago

I believe it happens for all flows. image

modery commented 4 months ago

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