Coder Social home page Coder Social logo

aries-mobile-agent-xamarin's Introduction

Aries MobileAgent Xamarin

This repository is the home of Aries MobileAgent Xamarin, an open source mobile agent for achieving self sovereign identity (SSI).

The primary goals of this project is to provide a common project to progress emerging community standards around mobile agents. In addition, a basic mediator agent in ASP.NET Core is included in this repo. This mediator agent can be run separately and can be configured as public access point for the mobile application. Please check the instructions below or watch the introduction demo video.

This repository contains a cross platform mobile app (iOS/Android) built using the Xamarin framework in C#. More specifically the two platform specific projects share a common UI through the use of Xamarin.Forms.

Getting started

  1. Make sure you have indy-sdk installed
  2. Clone this repo
  3. Download and extract static libraries required for iOS and Android projects in the libs folder
  4. Run the mediator agent inside mediator folder by running dotnet run in terminal
  5. Open aries-max-app.sln and build

For more information on the development practices featured in this repository please refer to here

Working with public endpoint

To work with public endpoints, use Ngrok and start it to listen on port 5000. Copy the assigned URL to the following locations

  • In mediator/Startup.cs replace the EndpointUri to instruct the mediator to use this address in configuration.
  • In src/Hyperledger.Aries.Max/App.xaml.cs replace the EndpointUri to configure the mobile app to use this public endpoint as mediator service

You may have to clear previously created wallets in ~/.indy_client/wallet for the changes to the mediator to work. Check if the mediator is configured with this address by opening it in a browser

Demo

Watch this Getting started with AMA-X video to learn how to run and configure the mobile agent with a publicly acessible mediator service

Background

SSI

SSI is a term coined by Christoper Allen in 2016 with this article, it describes a new paradigm of digital identity. Its premise rests on 10 principles described in the article. In short SSI is about giving a user digital self sovereignty by inverting current approaches to digital identity. Under SSI users are given access and control of their own data and a means in which to use it in a capacity that enables and protects their digital selves.

Agents

Agents are essentially software processes that act on behalf of a user and facilitate the usage of their digital identity.

Standards

There are several key standards in the SSI space but arguably the most important are that of the DID (as well as other associated specs) and the Verifiable Credentials specs.

Project Affiliation

AgentFramework

This mobile apps primary dependency is upon the open source project Aries Framework for .NET. This framework provides the baseline components for realizing agents, AMA-X extends this framework in the context of a mobile app to realize a mobile agent.

Indy

Much of the emerging standards AMA-X and Aries Framework implement are born out of the Indy-Agent community.

Credits

This original commit in this repository contains all contributions from the original repo, including contributions from @tplooker, @Liam-Tait, @burdettadam, @tmarkovski, @sukalpomitra, and @TelegramSam. This project was formerly known as Osma (Open Source Mobile Agent). Commits previous can be found in the archived original repository.

aries-mobile-agent-xamarin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aries-mobile-agent-xamarin's Issues

Not able to run the mediator on mac

Tried to follow the instructions can ran it on mac (10.14.6 Mojave)

It gives this exception:

Lals MB: dotnet run
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'indy' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libindy, 1): image not found
   at Hyperledger.Indy.WalletApi.NativeMethods.indy_create_wallet(Int32 command_handle, String config, String credentials, IndyMethodCompletedDelegate cb)
   at Hyperledger.Indy.WalletApi.Wallet.CreateWalletAsync(String config, String credentials)
   at Hyperledger.Aries.Storage.DefaultWalletService.CreateWalletAsync(WalletConfiguration configuration, WalletCredentials credentials)
   at Hyperledger.Aries.Configuration.DefaultProvisioningService.ProvisionAgentAsync(AgentOptions agentOptions)
   at Hyperledger.Aries.Agents.Edge.MediatorProvisioningService.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at mediator.Program.Main(String[] args) in /Users/[email protected]/iGrant/hyperledgerIndy/aries-mobileagent-xamarin/mediator/Program.cs:line 16

dotnet environment is as given:

Lals MB: dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.401
 Commit:    39d17847db

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.14
 OS Platform: Darwin
 RID:         osx.10.14-x64
 Base Path:   /usr/local/share/dotnet/sdk/3.1.401/

Host (useful for support):
  Version: 3.1.7
  Commit:  fcfdef8d6b

.NET Core SDKs installed:
  3.1.401 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.21 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Release Xamarin app for iOS

Can anyone suggest what build settings should I use to generate an iOS app for the Hyperledger Aries Xamarin project? I am able to run the app on a simulator, but get errors while release-build for a device.

Error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -L../libs/ios -lcrypto -L../libs/ios -lindy -L../libs/ios -lsodium -L../libs/ios -lssl -L../libs/ios -lzmq (MT5201) (SSI.iOS)

Predicate and Restrictions related functionality

Hi,
I am trying to implement Predicate and Restrictions related functionality in CreatePresentation method from ProofRequestViewModel, but I have some missunderstandings:
First of all, should we select the credential for the predicate same way we select credential for attribute ? If yes, how to get list of predicate credentials, because ListCredentialsForProofRequestAsync method from proofService is returning an empty list (for both cases when the predicate has restrictions and has no restrictions).
In case we should not select the credential for predicate, can someone give a hint on how this should be implemented.
Thanks

Mediator Stuck and isn't Updating (sending/receiving messages to mobile agent)

2 Months ago, updated the Hyperledger.Aries.Routing.Edge to 1.6.1 from 1.4.0 and last week I noticed that we were getting an error in Presentation Proof, used the older version of agents and were still getting that same error. Noticed, that mediator got stuck and wasn't updating (after every 10 seconds, it route messages to mobile agent from issuer/verifier agent).

Now, using 1.4.0 again and Connections are most of time stuck in Negotiating, Credentials in Requested state e.t.c, and all these issues because of the reason that Mediator stuck and isn't routing messages.

I only noticed this error in mediator logs few times.

fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Unexpected end of request content.
   at Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException.Throw(RequestRejectionReason reason)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1ContentLengthMessageBody.ReadAsyncInternal(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.ReadAsyncInternal(Memory`1 buffer, CancellationToken cancellationToken)
   at System.IO.StreamReader.ReadBufferAsync(CancellationToken cancellationToken)
   at System.IO.StreamReader.ReadToEndAsyncInternal()
   at Hyperledger.Aries.AspNetCore.AgentMiddleware.Invoke(HttpContext aHttpContext, IAgentProvider aAgentProvider)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

dlopen failed: library libgnustl_shared.so not found for Android 11

it also shows:

Java.Lang.UnsatisfiedLinkError: 'dlopen failed: library "libgnustl_shared.so" not found: needed by /data/app/~~cvtxMH6cSw3smwlA-_x3hA==/com.ariesmax-T27tV2X3FiZ4wXbuCQegNA==/lib/x86/libindy.so in namespace classloader-namespace'

image

although i do have the libraries installed :
image

Static files size

Static files( libindy.so and libc++_shared.so ) for each ABI is above 30 MB , but i don't need all functionality except wallet from libindy.so .
Is there any way to reduce static file size to have thinner final APK package size ?

Connection Refused exception occur

Hi,

When i am trying to click the "Create Wallet" button, "failed create wallet" popup message occur. so that i trying to debug and find the reason, in that i am getting "Connection refused" exception in "RegisterViewModel-> CreateWalletCommant->await _provisioningService.ProvisionAsync();" method. Line number 46 i am getting "Connection Refused" exception and i cannot able to move the next page. Can you give the solution for this?

Application Crashes after issuing Credentials from the cloud agent

Established Connection with both Streetcred web agent (using Developer's portal) and aries-framework-dotnet web agent

After establishing the connection successfully with the web agents, I tried to issue credentials (eg. College Transcript) and App was running in release mode. The Application crashed and stopped responding.

Reproduce:

  1. After the connection is established successfully, issue credentials from the web-agent(of a specific template) respectively.
  2. Move to Credentials tab in the mobile app and refresh (by pulling down), and the app would stop working.

I followed the instructions provided in this video: https://www.loom.com/share/5c52c185673046b688bdd1ef7d280185
@tmarkovski mentioned another video for further instructions related to credentials and aries-framework-dotnet agent, just looking forward to it.
While running in Debug mode, I received the following exception:

Hyperledger.Aries.AriesFrameworkException Message=Failed to send A2A message with an HTTP status code of NotFound and content Tunnel 17617bfc.ngrok.io not found Source=mscorlib StackTrace: at Hyperledger.Aries.Agents.HttpMessageDispatcher.DispatchAsync (System.Uri endpointUri, Hyperledger.Aries.Agents.PackedMessageContext message) [0x00161] in D:\a\1\s\src\Hyperledger.Aries\Agents\Transport\HttpMessageDispatcher.cs:46 at Hyperledger.Aries.Agents.DefaultMessageService.SendAsync (Hyperledger.Indy.WalletApi.Wallet wallet, Hyperledger.Aries.Agents.AgentMessage message, System.String recipientKey, System.String endpointUri, System.String[] routingKeys, System.String senderKey) [0x00184] in D:\a\1\s\src\Hyperledger.Aries\Agents\Transport\DefaultMessageService.cs:77 at Hyperledger.Aries.Agents.MessageServiceExtensions.SendAsync (Hyperledger.Aries.Agents.IMessageService service, Hyperledger.Indy.WalletApi.Wallet wallet, Hyperledger.Aries.Agents.AgentMessage message, Hyperledger.Aries.Features.DidExchange.ConnectionRecord connection) [0x000cd] in D:\a\1\s\src\Hyperledger.Aries\Agents\Transport\MessageServiceExtensions.cs:30 at Hyperledger.Aries.Routing.Edge.EdgeClientService.AddRouteAsync (Hyperledger.Aries.Agents.IAgentContext agentContext, System.String routeDestination) [0x000fa] in <e70e7c09ddcf4014bb73db13b3df5144>:0 at Hyperledger.Aries.Routing.EdgeConnectionService.CreateRequestAsync (Hyperledger.Aries.Agents.IAgentContext agentContext, Hyperledger.Aries.Features.DidExchange.ConnectionInvitationMessage invitation) [0x00108] in <e70e7c09ddcf4014bb73db13b3df5144>:0 at Osma.Mobile.App.ViewModels.Connections.AcceptInviteViewModel.<get_AcceptInviteCommand>b__9_0 () [0x00125] in D:\Git\aries-mobileagent-xamarin\src\Osma.Mobile.App\ViewModels\Connections\AcceptInviteViewModel.cs:65 at Osma.Mobile.App.ViewModels.Connections.AcceptInviteViewModel.<get_AcceptInviteCommand>b__9_0 () [0x00300] in D:\Git\aries-mobileagent-xamarin\src\Osma.Mobile.App\ViewModels\Connections\AcceptInviteViewModel.cs:74 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2019-10/android/release/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021 at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <4ccdb3137d974856b786e1aeebbfbab6>:0 at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <4ccdb3137d974856b786e1aeebbfbab6>:0 at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <4ccdb3137d974856b786e1aeebbfbab6>:0 at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.29(intptr,intptr)

Adding Support for Scoped Storage

Google Play Store will start taking action against app that rely on the requestLegacyExternalStorage flag to enable execution on Android 11+. I'm creating this issue to highlight how this will affect the ability to publish updates.

Example of Play Store communications:

Starting May 5th, you must let us know why your app requires broad storage access
Protocol Wallet
Protocol Wallet
Apr 14, 2021 13:26
We've detected that your app contains the requestLegacyExternalStorage flag in the manifest file of 1 or more of your app bundles or APKs.

Developers with apps on devices running Android 11+ must use Scoped Storage to give users better access control over their device storage. To release your app on Android 11 or newer after May 5th, you must either:

Update your app to use more privacy friendly best practices, such as the Storage Access Framework or Media Store API
Update your app to declare the All files access (MANAGE_EXTERNAL_STORAGE) permission in the manifest file, and complete the All files access permission declaration in Play Console from May 5th
Remove the All files access permission from your app entirely
For apps targeting Android 11, the requestLegacyExternalStorage flag will be ignored. You must use the All files access permission to retain broad access.

Apps requesting access to the All files access permission without a permitted use will be removed from Google Play, and you won't be able to publish updates.

Provision Problem

Hi, when I try to create wallet it is stacked and I debugged it seems it is awaiting provision but failing. I use ngrok and run mediator.

what is this repository?

hi
AMA-X extends Aries Framework for .NET , in the context of a mobile app to realize a mobile agent. , it's mean that we should use this project as guideline for our xamarin project or there is a nugget to use , such as Aries .
also Aries is agent on its own , and Indy have agent similar to Aries ,

Please specify which one should I use for xamarin , why so many agent , I'm sure there is conflict in naming

12 word recovery

Hello,

I am trying to implement 12 phrase recovery on this app. Can you please give some high level description on what does wallet id and wallet key do in App.xaml.cs. Can I use them for this?

Thank you

Static library not found

Bintray has been deprecated, therefore i am unable to download the static libraries for ios and android. Is there an alternate source for this?

Send Credential Proposal

Is it not possible to send a credential proposal to an ACA-Py agent?
I have managed to get a connection to the ACA-Py agent and i can issue credentials from the ACA-Py agent.
But for our process we need to initiate the credential issue from the mobile agent.
I can send a proposal from an ACA-Py agent API (/issue-credential/send-proposal)
How can i achieve this with the mobile agent?

Exception on accept an offered credential (code 309)

When i try to accept an offered credential, i get an exception with code 309.

The exception occours at creating the request:
var (request, _) = await credentialService.CreateRequestAsync(context, _credential.Id);

The offer was sent from the ACA-Py Cloud-agent.
Any suggestions to solve this issue?

Error 309 when presenting proof

Hello, after sending create-request on the framework dotnet and trying to present proof on the xamarin mobile I received this error. I can't seem to figure out why as this error was fixed when I first got it during issuing credential. The revocation has been enabled on the framework dotnet side but I'm not sure how this error occured.

This is the JSON file used to create the request and the revocation detail already showed up on the ledger.

{
"connectionId": "39bb1a02-e40d-4a6b-9948-f2ac92b024f6",
"comment": "string",
"trace": true,
"proofRequest": {
"name": "Proof of Request",
"version": "1.0",
"requested_attributes": {
"name": {

        "name": "age"
        }
    },"non_revoked":{ "from": 0,"to": 1634169600 }

}

}

image

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

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.

Connections stuck in negotiation

Hi,

I tried to connect OSMA with other agents. The first one was a dev-agent from trinsic, the other one a Toolbox demo agent.

Both connections remain in state "Negotiating". Is that because of an incomplete implementation in OSMA, a bug or some kind of configuration failure on my side?

Network subsystem is down

Hi team, I tried to run this in the anroid simulator on Windows 10 OS, I followed the instruction that after clone the code, run the mediator with dotnet run without any error, and also download the libs and place them into the libs folder, and at last I run the mobile app in the andraoid simulator and tried to create a wallet, but it returned "Failed to create wallet: Network subsystem is down", there is no any log generated in the mediator command window. Seems the mobile simulator could not connect to the mediator. One more information about this issue is, when I tried to run the android app from Visual Studio, I selected "Osma.Mobile.App.Android" then selected my created Android simulator.Any suggestion on this issue? Thanks.

Android app rejected: Issue: Need to use Media Store API or No Access to Files

I was trying to upload my app to Google Play Store, but they weren't allowing me to publish it.

Your app currently targets API level 29 and must target at least API level 30 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 30. 

Changes in Manifest File

I then removed these permissions from Manifest File.

<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

GetExternalFilesDirs()

And also used to GetExternalFilesDirs() to create folder, as per android documentation

Starting in Android 11, apps cannot create their own app-specific directory on external storage. To access the directory that the system provides for your app, call getExternalFilesDirs().

So, I changed in code:

Path.Combine(FileSystem.CacheDirectory, config.Value); to Path.Combine(Android.App.Application.Context.GetExternalFilesDir(FileSystem.CacheDirectory).AbsolutePath, config.Value);

Run time Permissions to Read & Write

When I removed Read & Write Permissions from Manifest file, I couldn't create folder, I enabled the run time permissions, without adding Read & Write permissions in manifest file, now I'm able to create folder.

await CrossPermissions.Current.CheckPermissionStatusAsync(Permission.Camera);
await CrossPermissions.Current.CheckPermissionStatusAsync(Permission.Storage);

Changes in MainActivity.cs

I also used GetExternalFilesDir in MainActivity.cs.

var host = App.BuildHost(typeof(PlatformModule).Assembly)
.UseContentRoot(Android.App.Application.Context.GetExternalFilesDir(System.Environment.GetFolderPath(
System.Environment.SpecialFolder.Personal)).AbsolutePath).Build();  // Android requires that we set content root.

And according to this comment:

var version = CrossDeviceInfo.Current.Version;

if (int.Parse(version) >= 11)
{
	Android.Systems.Os.Setenv("EXTERNAL_STORAGE", GetExternalFilesDir(null).AbsolutePath, true);
}

Action Required: Your app is not compliant with Google Play Policies

After all these changes, I'm unable to publish app on Play store. Received an email:

Issue: Need to use Media Store API or No Access to Files

You have requested access to All Files Access permission but it appears that your app's core feature requires access to only Media Files or does not need access to any Files. In case your app needs access to Media Files, with the MediaStore API, apps can contribute and access media that's available on an external storage volume without the need for the access all files permission.

Please update your app so that the feature uses Media Store APIs and remove All Files Access (MANAGE_EXTERNAL_STORAGE) permission.

I got this error while building aries max android project

As Instructed in Readme's step 5.Open aries-max-app.sln and build then got this error

Error System.InvalidOperationException: Duplicate attribute.
at System.Xml.Linq.XElement.AddAttributeSkipNotify(XAttribute a)
at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content)
at System.Xml.Linq.XContainer.Add(Object content)
at Xamarin.Android.Tasks.ManifestDocument.AddLauncherIntentElements(XElement activity)
at Xamarin.Android.Tasks.ManifestDocument.<>c__DisplayClass99_0.b__1(ActivityAttribute aa, XElement element)
at Xamarin.Android.Tasks.ManifestDocument.ToElement[TAttribute](TypeDefinition type, String name, Func2 parser, Func2 toElement, Action2 update) at Xamarin.Android.Tasks.ManifestDocument.ActivityFromTypeDefinition(TypeDefinition type, String name, Int32 targetSdkVersion) at Xamarin.Android.Tasks.ManifestDocument.Merge(TaskLoggingHelper log, TypeDefinitionCache cache, List1 subclasses, String applicationClass, Boolean embed, String bundledWearApplicationName, IEnumerable`1 mergedManifestDocuments)
at Xamarin.Android.Tasks.GenerateJavaStubs.Run(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.GenerateJavaStubs.RunTask()
at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/builder/azdo/_work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 17 Hyperledger.Aries.Max.Android

Issue credential

I am unable to issue credential. I used faber demo from arise cloud agent and connection goes through. Basic message also works fine but when I try issue credential, on mediator i can see it comes through but FetchInboxAsync call on mobile agent says processedCount 0. How can I debug this further?

I went line by line in FetchInboxAsync and I am facing this issue:

Hyperledger.Aries.AriesFrameworkException: Couldn't locate a message handler for type did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/issue-credential/2.0/offer-credential

Does this mean this is not implemented in this demo?

Aries Xamarin isn't compatible with Android API 30

Hi,

I'm trying to upload my app to Google Play Store, but it isn't allowing me to publish it.

Your app currently targets API level 29 and must target at least API level 30 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 30. 

When I tried to upgrade the API level to 30, I'm keep getting an IO error while trying to create a pool. On Android 30 can't create a pool, however with Android 29, it works fine.

AndroidManifest.xml

<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="30" />

<application android:requestLegacyExternalStorage="true" android:allowBackup="false" android:fullBackupOnly="false"></application>

<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Error Logs

9/28/2021 5:59:16 PM - Couldn't create pool config: Hyperledger.Indy.IOException: An IO error occurred. at Hyperledger.Aries.Ledger.DefaultPoolService.Crea tePoolAsync (System.String poolName, System.String genesisFile) [0x00072] in :0 at Osma.Mobile.App. Services.PoolConfigurator.ConfigurePoolsAsync() [0x0023c] in :0

9/28/2021 5:59:16 PM - Couldn't create pool config: Hyperledger.Indy.IOException: An IO error occurred. at Hyperledger.Aries.Ledger.DefaultPoolService.Crea tePoolAsync (System.String poolName, System.String genesis File) [0x00072] in :0 at Osma.Mobile.App.

Services.PoolConfigurator.Configure PoolsAsync()

[0x0023c] in :0

9/28/2021 5:59:16 PM - Couldn't create pool config: Hyperledger.Indy.IOException: An IO error occurred. at Hyperledger.Aries.Ledger.Default PoolService.Crea tePoolAsync (System.String poolName, System.String genesisFile) [0x00072] in :0 at Osma.Mobile.App. Services.PoolConfigurator.Configure PoolsAsync()

Cannot create Pool using the CreatePoolAsync() function

Hi,

Hoping somebody could help me out with an issue I am facing.
I am trying to create pool using the code mentioned in
aries-mobileagent xamarin/src/Osma.Mobile.App/Services/PoolConfigurator.cs.

The code fails on this line :
await poolService.CreatePoolAsync(config.Key, filename).ConfigureAwait(false);

I keep getting an IO error while trying to create a pool.
Hyperledger.Indy.IOException: An IO error occurred. at Hyperledger.Aries.Ledger.DefaultPoolService.CreatePoolAsync

I am following the same pattern in as in this project to write./read genesis.txn file.

I have also verified that the android device has the correct permissions to read write files

Credential - Send Offer state not changing

Describe the bug

I have the following setup

  • Xamarin Forms app for iOS
  • DotNet mediator
  • ACA-Py Agent

The connection between the mobile app and the ACA-Py agent is established and active. The ACA-Py agent wants to issue a credential to the Mobile agent. Below are the steps being followed.

  1. ACA-Py sends a credential offer to the Mobile agent
  2. The state of the credential in ACA-Py is offer_sent
  3. The mobile agent gets the offer with the state Offered
  4. The Mobile agent invokes the below method
    credentialService.CreateRequestAsync
  5. The state of the credential in the Mobile agent is changed from Offered to Requested
  6. The state of the credential in the ACA-Py agent remains offer_sent

Issue

The state of the credential in the ACA-Py agent should change from offer_sent to request_received (after step 5), however, it doesn't change.

This seems to work fine when two ACA-Py agents exchange credentials with each other

Steps To Reproduce

Given in the description

Screenshots

NA

Desktop (please complete the following information):

  • OS: iOS, Mac
  • .NET Core SDK 5.0.100-rc.2.20479.15
  • Smartphone (please complete the following information):
    • Device: iOS Simulator
    • OS: iOS 14.1

Additional context

NA

Wallet data Storage in Mobile's internal storage

The mediator and Edge agent wallet's data is stored in system's directory : ~/.indy_client/wallet

Is this Wallet's data being stored anywhere in the Mobile phone's internal storage ? If yes, then how to access those files or view them in storage of phones ?

Cannot create proof

Hi,

I have implemented a new screen to manage proofs. When i send my proof presentation, i received this error

Hyperledger.Indy.InvalidStructureException Message=A value being processed is not valid.

The error is thrown by this method "indy_prover_create_proof" in libindy. Any idea?

Handling received requests and messages

I have a mobile and mediator agent set up and connected. I can connect different mobile agents as well. However, I can't find where to handle received requests (and messages) to the mobile agent. I haven't found anything regarding this issue in the docs as well.

When a message arrives at the mobile agent 'message received' is prompted in the debug console however nothing else happens. The message is not handled. How to handle the received messages and requests in the mobile agent? Any help is appreciated.

Android - The requested pool cannot be opened because it does not have an existing configuration

Problem Statement
When accepting a Credential offer, the error The requested pool cannot be opened because it does not have an existing configuration is thrown on executing the below code

(CredentialRequestMessage credentialRequestMessage, CredentialRecord newCredentialRecord) = await credentialService.CreateRequestAsync(agentContext, Credential.Record.Id);

On investigating, I found that the PoolConfigurator gets an exception (An IO error occurred). Below is the stack trace

at Hyperledger.Aries.Ledger.DefaultPoolService.CreatePoolAsync (System.String poolName, System.String genesisFile) [0x0002d] in D:\a\1\s\src\Hyperledger.Aries\Ledger\DefaultPoolService.cs:59 at SSI.Services.PoolConfigurator.ConfigurePoolsAsync () [0x0023b] in /Users/sahil.khanna/Documents/VisualStudio_Workspace/ssi-mobile-app/SSI/Services/PoolConfigurator.cs:54

Note

  • The above scenario works fine on iOS. The problem is on an Android emulator and a device.
  • The READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions are granted

QR Code Scanner Crashes in Android

Pulled from "Aries-Update" #3 branch

Hi, Considering this branch I launched the application in an android device and followed from https://www.loom.com/share/5c52c185673046b688bdd1ef7d280185 video. After successful connection with the mediator agent, I tapped on "Connect" button on top to open the scanner, but the application crashed immediately , I tried multiple times. The Exception message :

04-23 16:00:53.033 D/Mono (27193): DllImport attempting to load: '/system/lib/liblog.so'. 04-23 16:00:53.034 D/Mono (27193): DllImport loaded library '/system/lib/liblog.so'. 04-23 16:00:53.034 D/Mono (27193): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so'). 04-23 16:00:53.034 D/Mono (27193): Searching for '__android_log_print'. 04-23 16:00:53.034 D/Mono (27193): Probing '__android_log_print'. 04-23 16:00:53.034 D/Mono (27193): Found as '__android_log_print'. 04-23 16:00:53.037 I/MonoDroid(27193): UNHANDLED EXCEPTION: 04-23 16:00:53.038 I/MonoDroid(27193): System.NullReferenceException: Object reference not set to an instance of an object. 04-23 16:00:53.038 I/MonoDroid(27193): at ZXing.Mobile.MobileBarcodeScanner.GetContext (Android.Content.Context context) [0x0001f] in <819b29aa6d91462699e19a679be55a44>:0 04-23 16:00:53.038 I/MonoDroid(27193): at ZXing.Mobile.MobileBarcodeScanner.Scan (Android.Content.Context context, ZXing.Mobile.MobileBarcodeScanningOptions options) [0x00015] in <819b29aa6d91462699e19a679be55a44>:0 04-23 16:00:53.038 I/MonoDroid(27193): at ZXing.Mobile.MobileBarcodeScanner.Scan (ZXing.Mobile.MobileBarcodeScanningOptions options) [0x00001] in <819b29aa6d91462699e19a679be55a44>:0 04-23 16:00:53.038 I/MonoDroid(27193): at Osma.Mobile.App.ViewModels.Connections.ConnectionsViewModel.ScanInvite () [0x00073] in D:\github\aries-mobileagent-xamarin\src\Osma.Mobile.App\ViewModels\Connections\ConnectionsViewModel.cs:88 04-23 16:00:53.038 I/MonoDroid(27193): at Osma.Mobile.App.ViewModels.Connections.ConnectionsViewModel.<get_ScanInviteCommand>b__12_0 () [0x0001f] in D:\github\aries-mobileagent-xamarin\src\Osma.Mobile.App\ViewModels\Connections\ConnectionsViewModel.cs:115 04-23 16:00:53.038 I/MonoDroid(27193): at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2019-10/android/release/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021 04-23 16:00:53.038 I/MonoDroid(27193): at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <4ccdb3137d974856b786e1aeebbfbab6>:0 04-23 16:00:53.038 I/MonoDroid(27193): at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <4ccdb3137d974856b786e1aeebbfbab6>:0 04-23 16:00:53.038 I/MonoDroid(27193): at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <4ccdb3137d974856b786e1aeebbfbab6>:0 04-23 16:00:53.038 I/MonoDroid(27193): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.43(intptr,intptr) 04-23 16:00:53.043 W/com.osma(27193): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable 04-23 16:00:53.044 D/Mono (27193): DllImport searching in: '__Internal' ('(null)'). 04-23 16:00:53.044 D/Mono (27193): Searching for 'java_interop_jnienv_throw'. 04-23 16:00:53.044 D/Mono (27193): Probing 'java_interop_jnienv_throw'. 04-23 16:00:53.044 D/Mono (27193): Found as 'java_interop_jnienv_throw'. **System.NullReferenceException:** 'Object reference not set to an instance of an object.'

I used the older code for "ScanInvite" function, The scanner is working fine but still an exception message : "Invalid invitation" is displayed on the output (I created Faber College Organization using Streetcred's Developer portal).

PS : Adding ZXing.Mobile.MobileBarcodeScanner.Initialize(Application);
Android Project in MainActivity.cs in OnCreate, might work

SSL connection could not be established

Ran the mediator agent using ngrok url and configured the xamarin's endoint to ngork url and on clicking create wallet getting error 'Failed to create wallet.The SSL connection could not be established see inner exception'

SDK Error at creating credential request when accepting credential offer

I encountered SDK error at creating credential request when accepting offer. I have attached the screenshot below for the error popup and the stack trace. Basically the exception occurs at GetPoolAsync in DefaultPoolService. Can you advise on a workaround or a quick fix on this? Thanks a lot.

image
image

Build failed

App does not build for me. Is this updated for new arise agent version?

I get this error:
`Severity Code Description Project File Line Suppression State
Error Could not find 2 Android X assemblies, make sure to install the following NuGet packages:

  • Xamarin.AndroidX.MediaRouter
    You can also copy-and-paste the following snippet into your .csproj file:
    Osma.Mobile.App.Android
    `

Documentation!

Hi,

Any documentation for the sdk!
Tried to get this to work with AgentBook with no hope.

Didn't find any documentation out there to be able to debug the code and know how to improve the app

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.