openwallet-foundation / didcomm-mediator-service

36 stars 40 forks source link

ERROR Message parsing failed: Message does not contain '@type' parameter, sending problem report #77

Open francardoso93 opened 1 year ago

francardoso93 commented 1 year ago

App is getting timeout when waiting response from mediator. Those are error logs for the mediator:

aries_cloudagent.core.dispatcher ERROR Handler error: PackWireFormat.unpack
Traceback (most recent call last):
File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/wallet/indy.py", line 917, in unpack_message
unpacked_json = await indy.crypto.unpack_message(
File "/usr/local/lib/python3.9/site-packages/indy/crypto.py", line 494, in unpack_message
res = await do_call('indy_unpack_message',
File "/usr/local/lib/python3.9/asyncio/futures.py", line 284, in __await__
yield self # This tells Task to wait for completion.
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup
future.result()
File "/usr/local/lib/python3.9/asyncio/futures.py", line 201, in result
raise self._exception
indy.error.WalletItemNotFound
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/transport/pack_format.py", line 116, in unpack
unpacked = await wallet.unpack_message(message_body)
File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/wallet/indy.py", line 921, in unpack_message
raise WalletError("Exception when unpacking message")
aries_cloudagent.wallet.error.WalletError: Exception when unpacking message
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 258, in __step
result = coro.throw(exc)
File "/home/indy/.local/lib/python3.9/site-packages/aries_cloudagent/transport/pack_format.py", line 124, in unpack
raise WireFormatParseError("Message unpack failed") from e
aries_cloudagent.transport.error.WireFormatParseError: Message unpack failed
2023-05-17 08:46:20,813 aries_cloudagent.core.dispatcher ERROR Message parsing failed: Message does not contain '@type' parameter, sending problem report
davideroffo commented 1 year ago

I would like to provide additional information regarding the issue mentioned by @francardoso93.

Currently, we are utilising our customised instance of the mediator service in conjunction with a React Native App that employs the Aries Framework JavaScript version 0.3.3.

This is how we configured the React Native Agent to work with the mediator:

const config: InitConfig = {
    logger: new ConsoleLogger(LogLevel.trace),
    label: `Agent1`,
    autoAcceptConnections: true,
    autoAcceptCredentials: AutoAcceptCredential.ContentApproved,
    indyLedgers: [
      {
        isProduction: false,
        id: 'bcovrin-test-net',
        indyNamespace: 'test',
        genesisTransactions,
      },
    ],
    walletConfig: {
      id: `some_id`,
      key: `some_id`,
    },
    mediatorConnectionsInvite: MEDIATOR_URL,
    mediatorPickupStrategy: MediatorPickupStrategy.Implicit,
    connectToIndyLedgersOnStartup: true,
  };

const agent = new Agent({config, dependencies: agentDependencies});

agent.registerOutboundTransport(new HttpOutboundTransport());
agent.registerOutboundTransport(new WsOutboundTransport());

await agent.initialize().catch(e => console.error(e));

Note: MEDIATOR_URL is an environment variable with the mediator url.