Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to accept credential offer as of 0.2.0-alpha.20 #647

Closed
jleach opened this issue Feb 18, 2022 · 6 comments
Closed

Unable to accept credential offer as of 0.2.0-alpha.20 #647

jleach opened this issue Feb 18, 2022 · 6 comments
Labels
Indy Tasks related to Indy DIDs, credentials and ledgers Platform: React Native Tasks related to React Native platform Type: Bug

Comments

@jleach
Copy link
Contributor

jleach commented Feb 18, 2022

As of commit c5febf5d AriesBifold is not able to accept credential offers. This commit is where AFJ was updated to the latest alpha release:

-    "@aries-framework/core": "^0.1.0-alpha.322",
+    "@aries-framework/core": "^0.2.0-alpha.20",
     "@aries-framework/react-hooks": "^0.1.2",
-    "@aries-framework/react-native": "^0.1.0-alpha.322",
+    "@aries-framework/react-native": "^0.2.0-alpha.20",

To reproduce the issue locally I run:

  1. npx ngrok http 8020
  2. git clone https://github.com/hyperledger/aries-cloudagent-python
  3. cd demo
  4. export LEDGER_URL=http://test.bcovrin.vonx.io
  5. export PUBLIC_TAILS_URL=$(curl -s http://localhost:4040/api/tunnels | jq -r '[.tunnels[] | select(.proto == "https")][0].public_url')&& echo $PUBLIC_TAILS_URL && ./run_demo faber --aip 10 --events --revocation
  6. In the Bifold repo npm i && cd ios && pod install && cd - then do a clean and build in Xcode with a release config.
  7. Scan the connection QR that will show up;
  8. Press 1 to issue a credential
  9. Review and accept the offer in AriesBifold
  10. That's it
2022-02-18 11:09:35.050327-0800 AriesBifold[6696:1728891] [javascript] 'TRACE: Error retrieving did \'TG2TSLVkqfJ5X5X53MtY5i\' from ledger \'CandyDev\'', '{\n  "error": {\n    "name": "IndyError",\n    "message": "IndySdk: Error Domain=IndyErrorDomain Code=309 \\"(null)\\" UserInfo={message=Error: Item not found on ledger\\n  Caused by: Nym not found\\n, indy_backtrace=}",\n    "indyCode": 309,\n    "indyName": "LedgerNotFound",\n    "indyCurrentErrorJson": null\n  },\n  "did": "TG2TSLVkqfJ5X5X53MtY5i"\n}'
2022-02-18 11:09:35.050904-0800 AriesBifold[6696:1728891] [javascript] 'TRACE: Retrieved did \'TG2TSLVkqfJ5X5X53MtY5i\' from ledger \'BCovrinTest\'', '{\n  "did": "TG2TSLVkqfJ5X5X53MtY5i",\n  "verkey": "FK6puHKtLXdZfyz1bXtkxnyc1qtJcBeZ6jqVsvMgjxow",\n  "role": "101"\n}'
2022-02-18 11:09:35.071320-0800 AriesBifold[6696:1728891] [javascript] 'TRACE: Error retrieving did \'TG2TSLVkqfJ5X5X53MtY5i\' from ledger \'IndicioTestNet\'', '{\n  "error": {\n    "name": "IndyError",\n    "message": "IndySdk: Error Domain=IndyErrorDomain Code=309 \\"(null)\\" UserInfo={message=Error: Item not found on ledger\\n  Caused by: Nym not found\\n, indy_backtrace=}",\n    "indyCode": 309,\n    "indyName": "LedgerNotFound",\n    "indyCurrentErrorJson": null\n  },\n  "did": "TG2TSLVkqfJ5X5X53MtY5i"\n}'
2022-02-18 11:09:35.473129-0800 AriesBifold[6696:1728891] [javascript] 'TRACE: Error retrieving did \'TG2TSLVkqfJ5X5X53MtY5i\' from ledger \'SovrinBuilderNet\'', '{\n  "error": {\n    "name": "IndyError",\n    "message": "IndySdk: Error Domain=IndyErrorDomain Code=309 \\"(null)\\" UserInfo={message=Error: Item not found on ledger\\n  Caused by: Nym not found\\n, indy_backtrace=}",\n    "indyCode": 309,\n    "indyName": "LedgerNotFound",\n    "indyCurrentErrorJson": null\n  },\n  "did": "TG2TSLVkqfJ5X5X53MtY5i"\n}'

The did above is from the Allies-Faber-ACME demo and DID TG2TSLVkqfJ5X5X53MtY5i is the Faber Agent (which is a Faux university issuing a credential).

@jleach
Copy link
Contributor Author

jleach commented Feb 18, 2022

@JamesKEbert @TimoGlastra FYI.

@berendsliedrecht
Copy link
Contributor

I am not too sure what is going on but the tests seem to work still fine. Which version is mentioned in the package.lock? on alpha.20 revocation for prover and verifier has been added.

Might be some React Native issues as we don't test that environment? Unfortunately I do not know too much to help you out.

@JamesKEbert
Copy link
Contributor

@TheTreek & I were able to recreate the issue--we've determined it's caused by the asynchronous ledger loading addition in AFJ (#580). So, adding connectToIndyLedgersOnStartup: false will work as a quick fix while we do some deeper investigation. I'll open a PR to Bifold until this can be resolved.
The really odd thing here is we've got another application that we've used iOS release builds with that is using the asynchronous ledger loading just fine--so I'm wondering if there's a small config difference between the two somewhere.

@JamesKEbert JamesKEbert added Indy Tasks related to Indy DIDs, credentials and ledgers Platform: React Native Tasks related to React Native platform Type: Bug labels Feb 19, 2022
@TimoGlastra
Copy link
Contributor

Great job on finding the cause @JamesKEbert. That's a really weird issue... Not sure why connecting on startup would have any impact on this

@TimoGlastra
Copy link
Contributor

@JamesKEbert were you able to determine what is causing this issue? connectToIndyLedgersOnStartup is set to true by default, so would be good to have this fixed before we release 0.2.0

@JamesKEbert
Copy link
Contributor

JamesKEbert commented Mar 29, 2022

We unfortunately got pulled to other work so we have not identified the issue here yet--but I can add this as an item to work on here soon. One of the issues we were running into is having difficulty extracting the logs from the device (as the iOS Release makes this challenging). If there's any recommendations on how to do so I'm all ears. :)

We could also change the default setting before release 0.2.0 to not hold the release up if we need to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indy Tasks related to Indy DIDs, credentials and ledgers Platform: React Native Tasks related to React Native platform Type: Bug
Projects
None yet
Development

No branches or pull requests

4 participants