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

IOException while provisioning Edge #112

Closed naman20sharma closed 4 years ago

naman20sharma commented 4 years ago

I'm using aries-mobileagent-xamarin (Osma mobile app), and using Samsung Galaxy A30s android phone. After tapping "Create Wallet" button, the Function "ProvisionAsync" is called and takes a lot of time and throws the following exception:

Wasn't able to provision the agent: System.Threading.Tasks.TaskCanceledException: The operation was canceled. ---> System.IO.IOException: Unable to read data from the transport connection: Operation aborted. ---> System.Net.Sockets.SocketException: Operation aborted --- End of inner exception stack trace --- at System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.ThrowException (System.Net.Sockets.SocketError error) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs:1088 at System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.GetResult (System.Int16 token) [0x00025] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs:1062 at System.Threading.Tasks.ValueTask1[TResult].get_Result () [0x00028] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs:818 at System.Net.Http.HttpConnection.SendAsyncCore (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00c7a] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs:537 --- End of inner exception stack trace --- at System.Net.Http.HttpConnection.SendAsyncCore (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x012b9] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs:725 at System.Net.Http.HttpConnectionPool.SendWithNtConnectionAuthAsync (System.Net.Http.HttpConnection connection, System.Net.Http.HttpRequestMessage request, System.Boolean doRequestAuth, System.Threading.CancellationToken cancellationToken) [0x000e6] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:316 at System.Net.Http.HttpConnectionPool.SendWithRetryAsync (System.Net.Http.HttpRequestMessage request, System.Boolean doRequestAuth, System.Threading.CancellationToken cancellationToken) [0x00101] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:296 at System.Net.Http.RedirectHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00070] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs:32 at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000a0] in :0 at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000be] in :0 at System.Net.Http.HttpClient.FinishSendAsyncBuffered (System.Threading.Tasks.Task1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) [0x0017e] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpClient.cs:506 at Hyperledger.Aries.Agents.HttpMessageDispatcher.DispatchAsync (System.Uri endpointUri, Hyperledger.Aries.Agents.PackedMessageContext message) [0x0008c] in d:\a\1\s\src\Hyperledger.Aries\Agents\Transport\HttpMessageDispatcher.cs:41 at Hyperledger.Aries.Agents.DefaultMessageService.SendReceiveAsync (Hyperledger.Indy.WalletApi.Wallet wallet, Hyperledger.Aries.Agents.AgentMessage message, System.String recipientKey, System.String endpointUri, System.String[] routingKeys, System.String senderKey) [0x00197] in d:\a\1\s\src\Hyperledger.Aries\Agents\Transport\DefaultMessageService.cs:106 at Hyperledger.Aries.Agents.MessageServiceExtensions.SendReceiveAsync (Hyperledger.Aries.Agents.IMessageService service, Hyperledger.Indy.WalletApi.Wallet wallet, Hyperledger.Aries.Agents.AgentMessage message, Hyperledger.Aries.Features.DidExchange.ConnectionRecord connection) [0x000ce] in d:\a\1\s\src\Hyperledger.Aries\Agents\Transport\MessageServiceExtensions.cs:50 at Hyperledger.Aries.Agents.MessageServiceExtensions.SendReceiveAsync[T] (Hyperledger.Aries.Agents.IMessageService service, Hyperledger.Indy.WalletApi.Wallet wallet, Hyperledger.Aries.Agents.AgentMessage message, Hyperledger.Aries.Features.DidExchange.ConnectionRecord connection) [0x0002d] in d:\a\1\s\src\Hyperledger.Aries\Agents\Transport\MessageServiceExtensions.cs:67 at Hyperledger.Aries.Agents.Edge.EdgeProvisioningService.ProvisionAsync (Hyperledger.Aries.Configuration.AgentOptions options) [0x0034f] in <e06152b8defb4dd696ec9779c44d06a3>:0

Expected behavior The wallet should have been created and new agent should be provisioned. The problem persist in this Phone itself. I'm confused if it has something to do with Samsung Phones as in other android devices I tried including an emulator, it works fine.

Desktop

Smartphone:

The setup is followed from the instructions given here: https://github.com/hyperledger/aries-mobileagent-xamarin/blob/master/README.md

tmarkovski commented 4 years ago

@naman20sharma Looking at the stack trace, this seems like a connectivity issue. Were you able to get past this?

naman20sharma commented 4 years ago

I was using High speed Wifi network (200 mbps) when this Error showed up. Later, I tried by using hotspot of another mobile phone, and it worked just fine. I'm not getting the reason behind this. My mobile data is slower than the Wifi.