getMetadata errored Timed out in 60000ms

Hi guys , i am creating a social login share and using that to initialize tKey like this .The sdk i am using is this
@tkey/core: 12.0.0

tKey = tKeyObject.getNewTKeyInstance();

const verifier = AXR_WEB3AUTH_VERIFIER;

const verifierId = sub;

customAxrLogger(socialShare, 'info', 'SOCIAL SHAREEE');

tKey.serviceProvider.postboxKey = socialShare;

(tKey.serviceProvider as any).verifierName = verifier;

(tKey.serviceProvider as any).verifierId = verifierId;

try {

  await tKey.initialize();

} catch (e) {

  customAxrLogger('TKEY INIT ERROR', 'error', e);

  throw e;

}

customAxrLogger('Share Details', 'info', tKey.getKeyDetails());

const data = tKey.getMetadata();

Sometimes at this tKey.getMetadata step i get this error

{“name”:“CoreError”,“code”:1102,“message”:“getMetadata errored Timed out in 60000ms”}

How serious is this error and how should we handle it ?

Hey @abhishek.sagu can you share few information before I can help you.

  1. Any specific reason you are using the tKey SDK, and not PnP SDKs? Any usecase that PnP is not able to help you with?
  2. Why are using the getMetaData method?

Also, tkey is an enterprise SDK which will not work on the Mainnet.

hi @Ayush ,

1.) We tried to use pnp and other sdks but were facing some issues with them on react native mobile app. Thats why we are using tKey.

2.) We are just logging the metadata .

3.) What do you mean tKey will not work on mainnet. We have been using it for our staging and mainnet environments for a while.

hi @Ayush , any update on this issue ?

  1. Can you share more details about the issues you are facing, tKey is low level SDK for more customised flow, which requires proper handling, so ideally we don’t suggest that SDK unless it’s more of customized flow which can’t be achieved with PnP SDK.
  2. getMetadata can return timedout if rate limits are hit.
  3. Can you tell which Web3Auth Network are you using?

hi @Ayush , i have already shared the code snippet with you.
We are using an aggregate verifier from web3Auth . We were facing some issues with using this aggregate verifier on the mobile side with react native.

Thats we create a private key using node-sfa sdk at backend. Then use that at the frontend to initialize the tKey and create another private key using that.

tKey.serviceProvider.postboxKey = socialShare;

With this flow we sometimes get this error

getMetadata errored Timed out in 60000ms

is it just because of the timeout or is there anything more serious than that? How do we handle it ? Ask users to try later ?

Also i believe we are using sapphire_mainnet network with web3Auth.

hi @Ayush , any update on this issue ?

Hey @abhishek.sagu I talked to our team, and it could be something wrong with the network or slow network/server. Can you share the region you are based in and testing? We’ll check the logs

Meanwhile, you can definitely ask your users to try later, or have a retry mechanism.

hi @Ayush , our users are located in different regions from Indonesia , Brazil , Poland , Pakistan , Germany , Nigeria , India.