hyperledger-archives / aries-framework-dotnet

Aries Framework .NET for building multiplatform SSI services
https://wiki.hyperledger.org/display/aries
Apache License 2.0
84 stars 74 forks source link

PR 213 broke the build for the Aries .NET Framework in the Aries Agent Test Harness #215

Closed swcurran closed 2 years ago

swcurran commented 2 years ago

Describe the bug The Aries Framework .NET build process within the Aries Agent Test Harness after the merge of PR 214. The build error is because of the missing Events model that was removed in the PR from the src/Hyperledger.Aries.TestHarness/AgentScenarios.cs file -- this can be seen here: https://github.com/hyperledger/aries-framework-dotnet/pull/213/files#, the removal of line 16 from the file.

I'm not sure if the solution is to add the line back into the file or to adjust the build process in AATH. We would appreciate someone from the Aries Framework .NET community investigate -- perhaps @ntsbs ?

The build error is:

 Determining projects to restore...
  All projects are up-to-date for restore.
  Hyperledger.Aries -> /aries-framework-dotnet/src/Hyperledger.Aries/bin/Release/netstandard2.0/Hyperledger.Aries.dll
  Hyperledger.Aries.AspNetCore.Contracts -> /aries-framework-dotnet/src/Hyperledger.Aries.AspNetCore.Contracts/bin/Release/netstandard2.1/Hyperledger.Aries.AspNetCore.Contracts.dll
  Hyperledger.Aries.AspNetCore -> /aries-framework-dotnet/src/Hyperledger.Aries.AspNetCore/bin/Release/netcoreapp3.1/Hyperledger.Aries.AspNetCore.dll
Controllers/ConnectionController.cs(8,32): error CS0234: The type or namespace name 'Events' does not exist in the namespace 'Hyperledger.Aries.Models' (are you missing an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
Controllers/IssueCredentialController.cs(13,32): error CS0234: The type or namespace name 'Events' does not exist in the namespace 'Hyperledger.Aries.Models' (are you missing an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
Controllers/PresentProofController.cs(13,32): error CS0234: The type or namespace name 'Events' does not exist in the namespace 'Hyperledger.Aries.Models' (are you missing an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
Handlers/CredentialHandler.cs(18,32): error CS0234: The type or namespace name 'Events' does not exist in the namespace 'Hyperledger.Aries.Models' (are you missing an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
Controllers/ConnectionController.cs(188,122): error CS0246: The type or namespace name 'ServiceMessageProcessingEvent' could not be found (are you missing a using directive or an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
Controllers/IssueCredentialController.cs(309,155): error CS0246: The type or namespace name 'ServiceMessageProcessingEvent' could not be found (are you missing a using directive or an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
Controllers/PresentProofController.cs(200,152): error CS0246: The type or namespace name 'ServiceMessageProcessingEvent' could not be found (are you missing a using directive or an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
The command '/bin/sh -c dotnet publish "DotNet.Backchannel.Master.csproj" -c Release -o /app/publish' returned a non-zero code: 1
Docker image build failed.

To Reproduce Steps to reproduce the behavior:

  1. Deploy the Aries Agent Test Harness locally per instructions in the readme: https://github.com/hyperledger/aries-agent-test-harness
  2. When doing the ./build instruction, the failure will occur.

Expected behavior The build should complete successfully,.

Screenshots None

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

Additional context By default, AATH pulls the Aries Framework .NET code directly from the GitHub repo. To test a fix, the dockerfile will likely have to change to pull the code from elsewhere, such as a branch from another repo.

ntsbs commented 2 years ago

@swcurran Should be fixed Thanks @Dindexx

swcurran commented 2 years ago

Excellent -- thanks! Will confirm.

swcurran commented 2 years ago

Confirmed. Thanks!

swcurran commented 2 years ago

We now have a new AATH build error, so we are still not running the Aries Framework .NET tests. Something to do with how DIDExchange has been added in some places but missing in others?

@ntsbs -- any ideas?

  Determining projects to restore...
  All projects are up-to-date for restore.
Features/Handshakes/Common/ConnectionRecord.cs(177,61): warning CS0618: 'ConnectionTrigger.InvitationAccept' is obsolete: 'Should use Request instead' [/aries-framework-dotnet/src/Hyperledger.Aries/Hyperledger.Aries.csproj]
  Hyperledger.Aries -> /aries-framework-dotnet/src/Hyperledger.Aries/bin/Release/netstandard2.0/Hyperledger.Aries.dll
  Hyperledger.Aries.AspNetCore.Contracts -> /aries-framework-dotnet/src/Hyperledger.Aries.AspNetCore.Contracts/bin/Release/netstandard2.1/Hyperledger.Aries.AspNetCore.Contracts.dll
  Hyperledger.Aries.AspNetCore -> /aries-framework-dotnet/src/Hyperledger.Aries.AspNetCore/bin/Release/netcoreapp3.1/Hyperledger.Aries.AspNetCore.dll
Controllers/ConnectionController.cs(5,34): error CS0234: The type or namespace name 'DidExchange' does not exist in the namespace 'Hyperledger.Aries.Features' (are you missing an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
Controllers/IssueCredentialController.cs(12,34): error CS0234: The type or namespace name 'DidExchange' does not exist in the namespace 'Hyperledger.Aries.Features' (are you missing an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
Controllers/PresentProofController.cs(9,34): error CS0234: The type or namespace name 'DidExchange' does not exist in the namespace 'Hyperledger.Aries.Features' (are you missing an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
Handlers/CredentialHandler.cs(19,34): error CS0234: The type or namespace name 'DidExchange' does not exist in the namespace 'Hyperledger.Aries.Features' (are you missing an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
Models/TestHarnessConnection.cs(2,34): error CS0234: The type or namespace name 'DidExchange' does not exist in the namespace 'Hyperledger.Aries.Features' (are you missing an assembly reference?) [/src/DotNet.Backchannel.Master.csproj]
Models/TestHarnessConnection.cs(34,16): error 
swcurran commented 2 years ago

To verify a fix with AATH (assuming you have Docker installed):

swcurran commented 2 years ago

Also, the dotnet files in the AATH repo are in /aries-backchannels/dotnet, with some csproj files in the server file below that. Perhaps that's where the problem is?

ntsbs commented 2 years ago

I will look into it

Dindexx commented 2 years ago

Hi @swcurran,

sorry for the late response. I fixed the issue in https://github.com/hyperledger/aries-agent-test-harness/pull/482

The error was caused by moving the DIDExchange namespace. AATH now builds successfully again on my side.

swcurran commented 2 years ago

Awesome -- thanks. Much appreciated.