openwallet-foundation / credo-ts

Typescript framework for building decentralized identity and verifiable credential solutions
https://credo.js.org
Apache License 2.0
266 stars 200 forks source link

Error: Cannot inject the dependency at position #2 (AFJ "0.0.49-unstable.0") #341

Closed MosCD3 closed 3 years ago

MosCD3 commented 3 years ago

Just a notice not sure if that is a bug from my end misconfiguring the project or an AFJ bug I managed to manually upgrade AFJ in Bifold to the latest "0.0.49-unstable.0" version

After trying to run the project I get the following error

exception throws at the following function let newAgent = new Agent(agentConfig)

Logs

Running "aries-bifold" with {"rootTag":1,"initialProps":{}}
 WARN  console.disableYellowBox has been deprecated and will be removed in a future release. Please use LogBox.ignoreAllLogs(value) instead.
 INFO  Initializing Agent
 INFO  INFO: Creating agent with config {
  "label": "Aries Bifold",
  "mediatorUrl": "https://4f22c4a4c21d.ngrok.io",
  "walletConfig": {
    "id": "wallet4"
  },
  "walletCredentials": {
    "key": "123"
  },
  "autoAcceptConnections": true,
  "poolName": "test-183",
  "genesisPath": "/var/mobile/Containers/Data/Application/3D910E8A-5C07-40E4-AAFB-CA4F15EC87C5/Documents/genesis.txn",
  "logger": true,
  "indy": true
}
 WARN  Possible Unhandled Promise Rejection (id: 0):
Error: Cannot inject the dependency at position #2 of "CredentialsModule" constructor. Reason:
    Cannot inject the dependency at position #2 of "CredentialService" constructor. Reason:
        Cannot inject the dependency at position #2 of "LedgerService" constructor. Reason:
            Cannot inject the dependency at position #2 of "IndyIssuerService" constructor. Reason:
                TypeInfo not known for "undefined"
Error: Cannot inject the dependency at position #2 of "CredentialsModule" constructor. Reason:
    Cannot inject the dependency at position #2 of "CredentialService" constructor. Reason:
        Cannot inject the dependency at position #2 of "LedgerService" constructor. Reason:
            Cannot inject the dependency at position #2 of "IndyIssuerService" constructor. Reason:
                TypeInfo not known for "undefined"
    at anonymous (http://192.168.2.142:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.AriesBifold:122739:28)
    at map (native)
....

this error was not in previous AFJ versions is that a bug in the new AFJ or am I missing something in Bifold?

TimoGlastra commented 3 years ago

I've just updated one of our apps to 0.0.49 and didn't run into this problem. Could be something Bifold related.

Have you rebuild the whole project / removed cache / etc...? Something that'll do the trick

MosCD3 commented 3 years ago

I think I did Steps

swcurran commented 3 years ago

There was an issue with accessing some Indy dependencies that was resolved about 5 hours ago. Could it have been related to that?