openwallet-foundation / bifold-wallet

Aries Mobile Agent React Native - Part of the Aries Bifold effort to provide SSI capabilities in a production ready app.
Apache License 2.0
143 stars 135 forks source link

Mobile Agent Wallet not created! #674

Open dolly1997 opened 1 year ago

dolly1997 commented 1 year ago

I have configured the Aries bifold App with afj mediator.Able to establish a connection between Mobile agent and Mediator.As Mediator's wallet is being created but dont understand why Mobile agent's wallet is not been created in Mediator. I have also Connected my Mobile agent with another ACA-py Agent (issuer)and able to establish connection between these agents using mediator.after scanning QR code the app just keeps spinning until i send the credential offer from issuer .The cred-offer is being accepted by Mobile Agent and credentials are being issued and visible on Mobile App.but in ACA-py(swagger UI) it is throwing error in issue-credential/records/cred_ex_id "Wallet Item not found".I dont understand where this credential is being stored since Mobile Agent's wallet is not been created. I am attaching the screenshot of Error from Swagger UI.

image

@jleach ,@reflectivedevelopment could you please look into this!

cvarjao commented 1 year ago

@dolly1997 , the current behaviour of bifold is to connect and wait for either a credential offer or proof request therefore the "keeps spinning" is an expected behaviour. I am not clear if you are reporting an issue with bifold or aca-py. In aca-py "wallet" represents the storage part (particularly in a multi-tenant setup). When using a mobile wallet there is no direct relationship with aca-py wallet other than an issuer/verifier agent will have it is own internal wallet. What do you mean by "Mobile Agent's wallet is not been created"? A mobile wallet is a wallet, and since you described as receiving the credential offer, I am assuming the credential is getting to the mobile wallet as expected.

dolly1997 commented 1 year ago

@cvarjao Thanks for your feedback! I would like to ask one question when mediator and Bifold Application establish a connection ,does any default or key files of wallet of Mobile Agent is been created under Mediator's wallet? Similarly as we can see in .Net Mediator as some edge files are been created of Mobile Agent. I am attaching the Screenshot of .Net Mediator 's wallet

image

Other than that If Credential is being stored in mobile wallet then I am not able to retrieve them in Swagger records API.it is throwing error "Wallet item not found".

We are using Wallet type indy in ACA-py(issuer)

This is my ACA-py Agent configuration (issuer/Verifier)

image
cvarjao commented 1 year ago

No wallet is created on the mediator side. The mediator only need need to keep track of registered routing keys from mobile wallets

dolly1997 commented 1 year ago

@cvarjao Thankyou for the response! Aries .net mediator creates inboxes for each mobile agent so similarly is there any inbox created in mediator side of Aries javascript for storing any of these routing keys .

we are using this GitHub repo for running mediator https://github.com/hyperledger/aries-framework-javascript

dolly1997 commented 1 year ago

@cvarjao other than that I am just confused if credentials are being issued to mobile agent then why issued credentials are not showing in issue-credentials/record Api in swagger UI of Issuer agent.It is still throwing same error “wallet item not found”

cvarjao commented 1 year ago

no wallets are created when running aca-py as mediator. There is not a lot to see when aca-py is running as mediator. it does NOT store any credentials, it just forwards DIDComm messages. Think of it as a network router. I am not sure what you are looking for, but from the wallet perspective you mentioned "credentials are being issued and visible on Mobile App". I am not sure what problem you are trying to solve.

dolly1997 commented 1 year ago

@cvarjao credentials are being issued and visible on mobile App. But I am not able to retrieve the issued credentials from Aca-Py issuer web agent (Swagger UI Api call )i.e issued-credentials/records.

I am attaching the error log getting from this Api call. 28A89908-E792-45D2-B69E-96BACDDDC8D8

cvarjao commented 1 year ago

Assuming you are looking from the aca-py running as issuer (not the mediator), you need to connect the dots.

darapich92 commented 1 year ago

Hi @cvarjao , I am sorry to mention you but I tried to over this problem with no result. I have a problem when accepting the new credential from issuer because mobile agent cannot verify the DID of credential issuer.

TRACE: Retrieved 0 responses from ledgers for did 'So9SHrrNXBDDTBrDcRTt1P'

I think it is worked if aries mobile agent can connect to von-network for verifying DID of Issuer. Do you know how to overcome this problem? thank you very much!

cvarjao commented 1 year ago

I am sorry, the description of the problem does not provide any indication that this is a mobile wallet issue. What ledger are you using? can you link to an object from the wallet (DID, Schema, etc)?

cvarjao commented 1 year ago

my best recommendation is to come to one of our Aries Bifold user group meeting and perhaps you can do a very brief (<5min) walkthrough of the problem.

jleach commented 1 year ago

hi @darapich92 Are you able to test with this demo and let us know if you are able to receive a credential. We've tested it quite extensively, and a 3rd party did a presentation on their test results during todays Bifold UG call so I'm quite sure it can accept credentials.

Also, I've made to developer docs which have been tested by the community. Is that the install process you followed. Specifically check the .env and MEDIATOR_URL. Use the mediator from the document, not your own.

I think we need to isolate all three of your components Bifold Wallet, Mediator, and Agent to figure out where the problem exists.

darapich92 commented 1 year ago

@cvarjao thank you very much about that group, I will join in the next meeting and the following meetings. @jleach @cvarjao Actually, I tested the Aries Mobile Agent based on the demos and it worked properly. But my current problem occur when I wanna test Aries Mobile Agent with my local network (Mediator and von-network).

My Aries Mobile can connect with Mediator (running on ACA-Py) that it works as a relay. But when I put the von-network Genesis URL to the .env file, the Aries Mobile does not connect to that Genesis URL and having the error when accepting the new Credential Offer TRACE: Retrieved 0 responses from ledgers for did 'So9SHrrNXBDDTBrDcRTt1P'.

For your info, my local Von-Network runs in my local server and its IP is opened for public accessible.

I am sorry how to solve it. Thank you for your help.

darapich92 commented 1 year ago

Hi @jleach, i just tried to copy the genesis script of my local von-network to ledgers.json in the configs/ledgers/indy. in the ledger.tsx, i can capture the client_ip and its port. but when I type the pin code for login, it pop up Undefined is not a function. After I debug, the code is stuck atawait newAgent.initialize() in the Splash.tsx.

do you know about this problem? thank you very much!

jleach commented 1 year ago

@darapich92 After you paste in your genesis transaction run the JSON through a linter to make sure its formatted correctly. Its probably a format error, either in the JSON or the genesis tx.

Also, try to just test adding one component at a time. Add in the mediator and test with the showcase demo, if that works great, then add in a ledger. Adding in two things makes it hard to figure out where the problem is.

darapich92 commented 1 year ago

Hi @jleach, i deleted some code because I want to have only one genesis that's the reason that it was stuck. I tried to have multiple genesis and it works now. thank you very much for your help!