hyperledger-archives / aries-mobile-agent-xamarin

Apache License 2.0
38 stars 31 forks source link

Xamarin App for iOS fails to create Wallet due to System.DllNotFoundException: indy #51

Closed ykare closed 3 years ago

ykare commented 3 years ago
iOS screenshot

Hi,

I'm trying to run the Hyperledger Ariex Xamarin app for iOS that I built myself, but it fails to Create Wallet. In the Visual Studio console, I get the following message.

Thread started: <Thread Pool> #15
Thread started: <Thread Pool> #16
[0:] Osma.Mobile.App.Services.PoolConfigurator: Critical: Couldn't create pool config

System.DllNotFoundException: indy
  at Hyperledger.Indy.PoolApi.Pool.CreatePoolLedgerConfigAsync (System.String configName, System.String config) [0x0001a] in C:\aries-mobile-agent-xamarin\src\indy-sdk-dotnet\PoolApi\Pool.cs:86 
  at Hyperledger.Aries.Ledger.DefaultPoolService.CreatePoolAsync (System.String poolName, System.String genesisFile) [0x00025] in C:\aries-mobile-agent-xamarin\src\Hyperledger.Aries\Ledger\DefaultPoolService.cs:59 
  at Osma.Mobile.App.Services.PoolConfigurator.ConfigurePoolsAsync () [0x0023b] in C:\aries-mobile-agent-xamarin\src\Osma.Mobile.App\Services\PoolConfigurator.cs:55 
[0:] Osma.Mobile.App.Services.PoolConfigurator: Critical: Couldn't create pool config

System.DllNotFoundException: indy
  at Hyperledger.Indy.PoolApi.Pool.CreatePoolLedgerConfigAsync (System.String configName, System.String config) [0x0001a] in C:\aries-mobile-agent-xamarin\src\indy-sdk-dotnet\PoolApi\Pool.cs:86 
  at Hyperledger.Aries.Ledger.DefaultPoolService.CreatePoolAsync (System.String poolName, System.String genesisFile) [0x00025] in C:\aries-mobile-agent-xamarin\src\Hyperledger.Aries\Ledger\DefaultPoolService.cs:59 
  at Osma.Mobile.App.Services.PoolConfigurator.ConfigurePoolsAsync () [0x0023b] in C:\aries-mobile-agent-xamarin\src\Osma.Mobile.App\Services\PoolConfigurator.cs:55 
[0:] Osma.Mobile.App.Services.PoolConfigurator: Critical: Couldn't create pool config

System.DllNotFoundException: indy
  at Hyperledger.Indy.PoolApi.Pool.CreatePoolLedgerConfigAsync (System.String configName, System.String config) [0x0001a] in C:\aries-mobile-agent-xamarin\src\indy-sdk-dotnet\PoolApi\Pool.cs:86 
  at Hyperledger.Aries.Ledger.DefaultPoolService.CreatePoolAsync (System.String poolName, System.String genesisFile) [0x00025] in C:\aries-mobile-agent-xamarin\src\Hyperledger.Aries\Ledger\DefaultPoolService.cs:59 
  at Osma.Mobile.App.Services.PoolConfigurator.ConfigurePoolsAsync () [0x0023b] in C:\aries-mobile-agent-xamarin\src\Osma.Mobile.App\Services\PoolConfigurator.cs:55 
[0:] Osma.Mobile.App.Services.PoolConfigurator: Critical: Couldn't create pool config

System.DllNotFoundException: indy
  at Hyperledger.Indy.PoolApi.Pool.CreatePoolLedgerConfigAsync (System.String configName, System.String config) [0x0001a] in C:\aries-mobile-agent-xamarin\src\indy-sdk-dotnet\PoolApi\Pool.cs:86 
  at Hyperledger.Aries.Ledger.DefaultPoolService.CreatePoolAsync (System.String poolName, System.String genesisFile) [0x00025] in C:\aries-mobile-agent-xamarin\src\Hyperledger.Aries\Ledger\DefaultPoolService.cs:59 
  at Osma.Mobile.App.Services.PoolConfigurator.ConfigurePoolsAsync () [0x0023b] in C:\aries-mobile-agent-xamarin\src\Osma.Mobile.App\Services\PoolConfigurator.cs:55 
[0:] Osma.Mobile.App.Services.PoolConfigurator: Critical: Couldn't create pool config

System.DllNotFoundException: indy
  at Hyperledger.Indy.PoolApi.Pool.CreatePoolLedgerConfigAsync (System.String configName, System.String config) [0x0001a] in C:\aries-mobile-agent-xamarin\src\indy-sdk-dotnet\PoolApi\Pool.cs:86 
  at Hyperledger.Aries.Ledger.DefaultPoolService.CreatePoolAsync (System.String poolName, System.String genesisFile) [0x00025] in C:\aries-mobile-agent-xamarin\src\Hyperledger.Aries\Ledger\DefaultPoolService.cs:59 
  at Osma.Mobile.App.Services.PoolConfigurator.ConfigurePoolsAsync () [0x0023b] in C:\aries-mobile-agent-xamarin\src\Osma.Mobile.App\Services\PoolConfigurator.cs:55 
[0:] Osma.Mobile.App.Services.PoolConfigurator: Critical: Couldn't create pool config

System.DllNotFoundException: indy
  at Hyperledger.Indy.PoolApi.Pool.CreatePoolLedgerConfigAsync (System.String configName, System.String config) [0x0001a] in C:\aries-mobile-agent-xamarin\src\indy-sdk-dotnet\PoolApi\Pool.cs:86 
  at Hyperledger.Aries.Ledger.DefaultPoolService.CreatePoolAsync (System.String poolName, System.String genesisFile) [0x00025] in C:\aries-mobile-agent-xamarin\src\Hyperledger.Aries\Ledger\DefaultPoolService.cs:59 
  at Osma.Mobile.App.Services.PoolConfigurator.ConfigurePoolsAsync () [0x0023b] in C:\aries-mobile-agent-xamarin\src\Osma.Mobile.App\Services\PoolConfigurator.cs:55 
[0:] System.Net.Http.HttpClient.Default.LogicalHandler: Information: Start processing HTTP request GET http://XXXXXXX.ngrok.io/.well-known/agent-configuration
[0:] System.Net.Http.HttpClient.Default.ClientHandler: Information: Sending HTTP request GET http://XXXXXXX.ngrok.io/.well-known/agent-configuration
[0:] System.Net.Http.HttpClient.Default.ClientHandler: Information: Received HTTP response after 666.358ms - OK
[0:] System.Net.Http.HttpClient.Default.LogicalHandler: Information: End processing HTTP request after 679.8177ms - OK
[0:] System.DllNotFoundException: indy
  at Hyperledger.Indy.WalletApi.Wallet.CreateWalletAsync (System.String config, System.String credentials) [0x00026] in C:\aries-mobile-agent-xamarin\src\indy-sdk-dotnet\WalletApi\Wallet.cs:94 
  at Hyperledger.Aries.Storage.DefaultWalletService.CreateWalletAsync (Hyperledger.Aries.Storage.WalletConfiguration configuration, Hyperledger.Aries.Storage.WalletCredentials credentials) [0x0000f] in C:\aries-mobile-agent-xamarin\src\Hyperledger.Aries\Storage\DefaultWalletService.cs:74 
  at Hyperledger.Aries.Configuration.DefaultProvisioningService.ProvisionAgentAsync (Hyperledger.Aries.Configuration.AgentOptions agentOptions) [0x00094] in C:\aries-mobile-agent-xamarin\src\Hyperledger.Aries\Configuration\DefaultProvisioningService.cs:104 
  at Hyperledger.Aries.Agents.Edge.EdgeProvisioningService.ProvisionAsync (Hyperledger.Aries.Configuration.AgentOptions options, System.Threading.CancellationToken cancellationToken) [0x00154] in C:\aries-mobile-agent-xamarin\src\Hyperledger.Aries.Routing.Edge\EdgeProvisioningService.cs:57 
  at Osma.Mobile.App.ViewModels.RegisterViewModel.<get_CreateWalletCommand>b__5_0 () [0x000de] in C:\aries-mobile-agent-xamarin\src\Osma.Mobile.App\ViewModels\RegisterViewModel.cs:44 

My environment is as follows:

aries-mobile-agent-xamarin 0.1.0 Visual Studio 2019 Version 16.11.5 on Windows 10 Pairing macOS Big Sur 11.6 + Xcode 13.1 iPhone 12 Pro + iOS 14.8.1 libs: https://drive.google.com/drive/folders/1AmFMnC_agNhs5ZFgFBVJf0Ndhz0OEiIF?usp=sharing

Is there any special configuration required?

Thank you very much for your help.

ykare commented 3 years ago

I'm sorry. There was a problem with my environment.

I had added the Hyperledger Indy SDK in the solution for debugging purposes, and added it as a . NET Standard library project when it should have been a shared project. This caused the IOS directive to not be enabled when compiling the Hyperledger Indy SDK, which resulted in an error at runtime.

I apologize for the inconvenience.