Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

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

Closed
swcurran opened this issue Feb 16, 2022 · 9 comments

Comments

@swcurran
Copy link
Contributor

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):

  • Docker is used for AATH.

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
Copy link
Contributor

ntsbs commented Feb 22, 2022

@swcurran Should be fixed Thanks @Dindexx

@swcurran
Copy link
Contributor Author

Excellent -- thanks! Will confirm.

@swcurran
Copy link
Contributor Author

Confirmed. Thanks!

@swcurran
Copy link
Contributor Author

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 swcurran reopened this Mar 21, 2022
@swcurran
Copy link
Contributor Author

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

  • clone the repo (git clone https://github.com/hyperledger/aries-agent-test-harness)
  • run the command from the root folder: ./manage build -a dotnet-master
  • it is failing now, but should exit happily

@swcurran
Copy link
Contributor Author

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
Copy link
Contributor

ntsbs commented Mar 22, 2022

I will look into it

@Dindexx
Copy link
Contributor

Dindexx commented Apr 21, 2022

Hi @swcurran,

sorry for the late response. I fixed the issue in openwallet-foundation/owl-agent-test-harness#482

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

@swcurran
Copy link
Contributor Author

Awesome -- thanks. Much appreciated.

@ntsbs ntsbs closed this as completed May 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants