Unable to compile document editing WebForms application

Trying to compile the .net example from github, but getting the following error:

The command “…..\packages\Node-Kit.11.1.0.1\node\win\node.exe …..\packages\Node-Kit.11.1.0.1\npm\bin\npm-cli.js install” exited with code 1.
GroupDocs.Editor.WebForms
C:\code\POC\GroupDocs.Editor-for-.NET-WebForms-master\src\GroupDocs.Editor.WebForms.csproj

I followed this article, but it didn’t make a difference: The command "..\node\win\node.exe ..\npm\bin\npm-cli.js install" exited with code 1. · Issue #61 · groupdocs-viewer/GroupDocs.Viewer-for-.NET-WebForms · GitHub

@sgbrUnisys

We couldn’t reproduce this issue at our end. Have a look at this screenshot.PNG (27.0 KB). Could you please share a screencast/video of this issue (From downloading the project to compiling/running it)? Make sure all the node dependencies/packages are properly downloaded and installed.

Please find screenshot attached.Capture.PNG (8.3 KB)
The compile log from VS is as follows:

1>------ Rebuild All started: Project: GroupDocs.Editor.WebForms, Configuration: Debug Any CPU ------
1> npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
1> npm WARN lifecycle npm is using C:\code\POC\GroupDocs.Editor-for-.NET-WebForms-master\packages\Node-Kit.11.1.0.1\node\win\node.exe but there is no node binary in the current PATH. Use the --scripts-prepend-node-path option to include the path for the node binary npm was executed with.
1>
1> > @fortawesome/fontawesome-common-types@0.2.34 postinstall C:\code\POC\GroupDocs.Editor-for-.NET-WebForms-master\src\client\node_modules@fortawesome\fontawesome-common-types
1> > node attribution.js
1>
1> ‘node’ is not recognized as an internal or external command,
1> operable program or batch file.
1> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules\chokidar\node_modules\fsevents):
1> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
1> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\sass\node_modules\chokidar\node_modules\fsevents):
1> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
1> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\watchpack-chokidar2\node_modules\chokidar\node_modules\fsevents):
1> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
1> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents):
1> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
1> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules@angular\compiler-cli\node_modules\chokidar\node_modules\fsevents):
1> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
1> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\jest-haste-map\node_modules\fsevents):
1> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
1> npm WARN @nrwl/angular@8.12.11 requires a peer of @nrwl/workspace@8.12.11 but none is installed. You must install peer dependencies yourself.
1> npm WARN @nrwl/cypress@8.12.11 requires a peer of @nrwl/workspace@8.12.11 but none is installed. You must install peer dependencies yourself.
1> npm WARN @nrwl/cypress@8.12.11 requires a peer of cypress@^3.8.2 but none is installed. You must install peer dependencies yourself.
1> npm WARN @nrwl/jest@8.12.11 requires a peer of @nrwl/workspace@8.12.11 but none is installed. You must install peer dependencies yourself.
1>
1> npm ERR! code ELIFECYCLE
1> npm ERR! errno 1
1> npm ERR! @fortawesome/fontawesome-common-types@0.2.34 postinstall: node attribution.js
1> npm ERR! Exit status 1
1> npm ERR!
1> npm ERR! Failed at the @fortawesome/fontawesome-common-types@0.2.34 postinstall script.
1> npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
1>
1> npm ERR! A complete log of this run can be found in:
1> npm ERR! C:\Users\SolteszG\AppData\Roaming\npm-cache_logs\2021-02-15T08_55_10_650Z-debug.log
2>------ Skipped Rebuild All: Project: GroupDocs.Editor.WebForms.Test, Configuration: Debug Any CPU ------
2>Project not selected to build for this solution configuration
========== Rebuild All: 0 succeeded, 1 failed, 1 skipped ==========

Steps to reproduce:

  1. download the project from GitHub.
  2. open in VS 2019
  3. restore and update NuGet packages
  4. clean solution
  5. rebuild all solution

Above problem ocures.
Thank you
Kind regards
Gabor

@sgbrUnisys

We still cannot reproduce this issue at our end. Could you please share a video (from downloading to compiling)?

I thank you for your reply, but I am sorry that’s not possible for me to do. I’d expect an example to be as simple as “1) download and 2) compile”. This is not the case with your example.

@sgbrUnisys

There are some dependencies that you have to restore or install the project will be compiled without any issue/error.

Thank you for stating what you think should happen. As a customer, I can tell you that is not what happens.

@sgbrUnisys

We’ll surely help you in fixing the issue. Please share your operating system details (e.g. version).
However, please have a look at this video. We followed these steps:

  • Downloaded the project
  • Restored NuGet packages
  • Build the project
  • Started/ran the project without debugging (ctrl + F5)

I am getting the following error when the editorDomainGenerator.SetEditorLicense() method is called:

“System.IO.FileLoadException: ‘Could not load file or assembly ‘GroupDocs.Editor, Version=21.1.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)’”

I don’t have a license file and just want to try with the trial license.

In
public DomainGenerator(string assemblyName, string className)
{
globalConfiguration = new GlobalConfiguration();
// Get assembly path
string assemblyPath = GetAssemblyPath(assemblyName);
// Initiate GroupDocs license class
CurrentType = this.CreateDomain(assemblyName + “Domain”, assemblyPath, className);
}

The configuration and the assembly path are loaded correctly and showing what they should be.
However, the CurrentType is null as per the above exception the DLL is not being loaded. I have checked that the NuGet package is installed and added. I have even downloaded and installed the msi version (groupdocs.editor_21.1.1-net.msi)

The following might help the technical team to help me solve the problem.

From the exception:

GroupDocs.Editor, Version=21.1.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56

=== Pre-bind state information ===

LOG: DisplayName = GroupDocs.Editor, Version=21.1.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56

(Fully-specified)

LOG: Appbase = file:///C:/code/POC/GroupDocs.Editor/GroupDocs.Editor/

LOG: Initial PrivatePath = C:\code\POC\GroupDocs.Editor\GroupDocs.Editor\bin

Calling assembly : GroupDocs.Editor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.

===

LOG: This bind starts in default load context.

LOG: Using application configuration file: C:\code\POC\GroupDocs.Editor\GroupDocs.Editor\web.config

LOG: Using host configuration file: C:\Users\SolteszG\Documents\IISExpress\config\aspnet.config

LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.

LOG: Post-policy reference: GroupDocs.Editor, Version=21.1.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56

LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/44a3bd28/239e2877/GroupDocs.Editor.DLL.

LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/44a3bd28/239e2877/GroupDocs.Editor/GroupDocs.Editor.DLL.

LOG: Attempting download of new URL file:///C:/code/POC/GroupDocs.Editor/GroupDocs.Editor/bin/GroupDocs.Editor.DLL. ß this is a valid path

WRN: Comparing the assembly name resulted in the mismatch: Major Version

ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Could not load file or assembly ‘GroupDocs.Editor, Version=21.1.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

at GroupDocs.Editor.GroupDocsCore.DomainGenerator.SetEditorLicense() in C:\code\POC\GroupDocs.Editor\GroupDocs.Editor\GroupDocsCore\DomainGenerator.cs:line 72

at GroupDocs.Editor.Global.Application_Start(Object sender, EventArgs e) in C:\code\POC\GroupDocs.Editor\GroupDocs.Editor\Global.asax.cs:line 14

InnerException is null

Solution is .Net Framework 4.8 with runtime 4.8.

Please find the web.config file attached for your reference.

web.config:

<?xml version="1.0" encoding="utf-8"?>

@sgbrUnisys

Were you able to compile/run application using the above mentioned steps (by default application is using 20.8)?
Are you trying to upgrade the API version in same application?

Thank you for the video. The steps show in the video of downloading the code, opening the solution in visual studio and then simply compiling isn’t the same as what I experienced. Opening the solution an clicking on build gives numerous errors.

My use case and steps to reproduce:

  1. open visual studio 2019
  2. create a new ASP.Net Web Application (.Net Framework 4.8)
  3. add GroupDocs.Editor from NuGet
  4. write example code in default.aspx as follows:

using (Editor editor = new Editor(documentPath))
{
// Obtain editable document from original DOCX document
WordProcessingEditOptions editOptions = new WordProcessingEditOptions();
EditableDocument editableDocument = editor.Edit(editOptions);

            // Pass EditableDocument object to WYSIWYG editor and edit there...
  1. Add the following to the global.ascx.cs Application_Start:
    // Set GroupDocs products assemblies names
    string editorAssemblyName = “GroupDocs.Editor.dll”;
    // set GroupDocs.Editor license
    DomainGenerator editorDomainGenerator = new DomainGenerator(editorAssemblyName, “GroupDocs.Editor.License”);
    editorDomainGenerator.SetEditorLicense();

  2. Ensure the types are copied over from your example solution and I’ve corrected the configuration to use web.config instead of the yaml resolver (which is not standard for WebForms application configuration).

  3. Compile: success

  4. run: exception as above. The DLL does not load correctly. It needs a reference library that is not part of the standard .net framework or your NuGet installation, otherwise it would resolve.

Can you give me a list of components the DLL needs?

I’ve tried a few recordings, I’ll share the link with you privately via George. Thanks for your continued efforts in trying to resolve these POC issues.

1 Like

@sgbrUnisys

We’ll appreciate that.

Hi Tahir

I hope you received the video recordings from George.

I had a look at your library using Resharper over the weekend and the Assembly Explorer shows a number of Aspose component references:

image001.png

Inspecting the NuGet packages folder as well as the bin folder of the solution, these Aspose components are not present in the solution folder / packages folder.

Do I need to have a version of Aspose installed for your DLL (GroupDocs.Editor.DLL) to load correctly?

I don’t have Aspose installed, and assumed that if I add the GroupDocs.Editor NuGet package, then it will add all the necessary dependencies as well.

Could you please let me know what you think?

Thank you

Kind regards

Gabor

image002.jpg (2.48 KB)

image003.jpg (393 Bytes)

Hello Gabor,

Sorry for not updating you on this.

Yes, the video was shared with Atir. He logged the issue with GitHub, and it is currently being investigated. Please see the link below for the latest on this.

https://github.com/groupdocs-editor/GroupDocs.Editor-for-.NET-WebForms/issues/15

@atir tahir via GroupDocs please respond to Gabor following her below email with further information.

Best Regards,

George Wright

Regional Sales Manager

image005.png

World-leading Digital Transformation Solutions and Components

Greatstone International Ltd | Parley Brook Farm | Woking | GU21 4XR

T**:** +44 (0) 1276 855 580 M: +44 (0) 7788 261 189

george@greatstone.co.uk | @Greatstone_Int

A giving partner to The Cure Parkinson’s Trust

www.greatstone.co.uk

The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by any other person is not permitted. If you have received this message by mistake, please notify us immediately by reply email and then delete this message from your system. If you are not the intended recipient any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful.

image001.png (10.2 KB)

image002.jpg (2.48 KB)

image003.jpg (393 Bytes)

You are right. GroupDocs.Editor adds the necessary Aspose dependencies on it’s own. Secondly, we are still investigating the issue (logged on GitHub). You’ll be notified in case of any update.

Hi All, do you have any updates please on this? I’d like to progress my proof of concept this week, however, I can’t do that until all the references are properly resolved via the NuGet package of GroupDocs.Editor.

Thank you
Kind regards
Gabor

@sgbrUnisys

This issue is now fixed. Please pull the latest release here and have a look at this thread.