Could not get results from torus nodes Unable to resolve enough promises

We’re using web3auth with ZeroDev through their SDK to provide social login with Google.
Most of the times login works well, but randomly different users get this error. Refreshing page and trying to login again resolves this, but it still seems strange.

We’re using:

"@zerodev/sdk": "^4.0.30",
"@zerodev/wagmi": "^4.1.19",
"@web3auth/base": "^7.0.1",
"@web3auth/modal": "7.0.3"

with React/Next.js

I’ll try to provide more technical details later when we reproduce this error :slight_smile:

@alexander Welcome Aboard!

Can you share your Dapp URL (if possible) to check this behavior and please provide your implementation code as well?

You can check our dapp at app.rivo.xyz
But this error is so random that i’m not even sure how to reproduce it :confused:

Sharing code:

import {
  mainnet,
  bsc,
  polygon,
  arbitrum,
  optimism,
  avalanche,
  type Chain,
} from "@wagmi/core/chains";
import { createStorage, type Connector } from "@wagmi/core";
import { createConfig, configureChains } from "wagmi";
import { publicProvider } from "wagmi/providers/public";
import { MetaMaskConnector } from "wagmi/connectors/metaMask";
import { WalletConnectConnector } from "wagmi/connectors/walletConnect";
import {
  GoogleSocialWalletConnector,
  TwitterSocialWalletConnector,
  DiscordSocialWalletConnector,
} from "@zerodev/wagmi";
import type { AbstractWeb3AuthWalletConnectorOptions } from "@zerodev/wagmi/dist/types/connectors/AbstractWeb3AuthWalletConnector";

export const chains: Chain[] = [
  mainnet,
  bsc,
  polygon,
  arbitrum,
  optimism,
  avalanche,
];

const projectIds: string[] = [
  "8001.........",
  "114805..........",
  "e6827..............",
  "b2fbf................",
  "2132a..............",
  "229e35............",
];

const { publicClient, webSocketPublicClient } = configureChains(chains, [
  publicProvider(),
]);

const abstractConnectorOptions: AbstractWeb3AuthWalletConnectorOptions = {
  projectIds,
  bundlerProvider: "STACKUP",
  web3authOptions: {
    web3AuthNetwork: "sapphire_mainnet",
    clientId: "BEdj7U63xH...................",
  },
};

const connectors: (() => Connector<any, any>[]) | Connector<any, any>[] = [
  new MetaMaskConnector({ chains }),
  new WalletConnectConnector({
    chains,
    options: {
      projectId: "a76d31bd.................",
      qrModalOptions: {
        themeMode: "light",
      },
    },
  }),
];

if (typeof window !== "undefined") {
  connectors.push(
    new GoogleSocialWalletConnector({
      chains,
      options: {
        ...abstractConnectorOptions,
        adapterSettings: {
          network: "sapphire_mainnet",
          loginConfig: {
            google: {
              verifier: "google",
              typeOfLogin: "google",
              clientId:
                "38637.....................apps.googleusercontent.com",
            },
          },
        },
      },
    }),
    new TwitterSocialWalletConnector({
      chains,
      options: {
        ...abstractConnectorOptions,
        adapterSettings: {
          network: "sapphire_mainnet",
          loginConfig: {
            twitter: {
              verifier: "twitter",
              typeOfLogin: "twitter",
              clientId: "fCZok3pK...........",
            },
          },
        },
      },
    }),
    new DiscordSocialWalletConnector({
      chains,
      options: {
        ...abstractConnectorOptions,
        adapterSettings: {
          network: "sapphire_mainnet",
          loginConfig: {
            discord: {
              verifier: "discord-verifier",
              typeOfLogin: "discord",
              clientId: "115844........",
            },
          },
        },
      },
    })
  );
}

export const wagmiConfig = createConfig({
  autoConnect: true,
  connectors,
  publicClient,
  webSocketPublicClient,
  storage:
    typeof window !== "undefined"
      ? createStorage({ storage: window?.localStorage })
      : undefined,
});

export const getChain = (id: number): Chain | undefined => {
  return chains.find((chain) => chain.id === id);
};

export const getChainNameByChainId = (chainId: number): string => {
  switch (chainId) {
    case 1:
      return "eth-mainnet";
    case 56:
      return "bsc-mainnet";
    case 137:
      return "matic-mainnet";
    case 80001:
      return "polygon-mumbai";
    case 43114:
      return "avalanche-mainnet";
    case 42161:
      return "arbitrum-mainnet";
    case 10:
      return "optimism-mainnet";
    default:
      return "eth-mainnet";
  }
};

export const getChainById = (chainId: number): Chain | null => {
  switch (chainId) {
    case 1:
      return mainnet;
    case 56:
      return bsc;
    case 137:
      return polygon;
    case 43114:
      return avalanche;
    case 42161:
      return arbitrum;
    case 10:
      return optimism;
    default:
      return null;
  }
};

Thanks for sharing the details.

I was unable to replicate the issue as you mentioned.

Do the users who experience the Something Went Wrong error based out of a specific physical location? Can you share the console logs as well when you encounter the error again?

Hey @vjgee !
Sorry for delay.
Finally got some more details on error. We couldn’t establish any connection to physical location. Is it possible to encounter troubles connection with web3auth through VPN?

Sharing console log:

[{"errorMsg":"Could not get result from torus nodes \n Unable to resolve enough promises.","errorStack":"Error: Could not get result from torus nodes \n Unable to resolve enough promises.\n at et (https://auth.web3auth.io/v6/assets/index-9f4f35bc.js:1:1551)\n at https://auth.web3auth.io/v6/assets/index-9f4f35bc.js:1:9772","title":"Mount Error","createdAt":"02.11.2023, 11:28:22","info":{"customAuthState":{"client":"BEdj7U63xHVU5MReu7tqXGOi8rfeDNpieP27_9B70ia45Gcdu9LkyqI2ysdAhXUkdoK60uWSgVOTh_AexEpshCM","currentLoginProvider":"google","popupWindow":"true","whiteLabel":"{\"appName\":\"ZeroDev\"}","keyMode":"v1","isCustomVerifier":"true","socialFactorFlow":"","loginId":"99c69b7ca68543c89cb05bfde94a27498527fa7e5917d0b503b7dcf5c1100b11","sessionNamespace":"","version":"","instanceId":"uw2o0swk7l8","verifier":"google","typeOfLogin":"google","redirectToOpener":false},"customAuthArgs":{"typeOfLogin":"google","verifier":"google","clientId":"386375196039-pi85foce8shsf6kh3g0bm5d5usfeq3j4.apps.googleusercontent.com","jwtParams":{},"customState":{"client":"BEdj7U63xHVU5MReu7tqXGOi8rfeDNpieP27_9B70ia45Gcdu9LkyqI2ysdAhXUkdoK60uWSgVOTh_AexEpshCM","currentLoginProvider":"google","popupWindow":"true","whiteLabel":"{\"appName\":\"ZeroDev\"}","keyMode":"v1","isCustomVerifier":"true","socialFactorFlow":"","loginId":"99c69b7ca68543c89cb05bfde94a27498527fa7e5917d0b503b7dcf5c1100b11","sessionNamespace":"","version":""},"hash":"state=eyJjbGllbnQiOiJCRWRqN1U2M3hIVlU1TVJldTd0cVhHT2k4cmZlRE5waWVQMjdfOUI3MGlhNDVHY2R1OUxreXFJMnlzZEFoWFVrZG9LNjB1V1NnVk9UaF9BZXhFcHNoQ00iLCJjdXJyZW50TG9naW5Qcm92aWRlciI6Imdvb2dsZSIsInBvcHVwV2luZG93IjoidHJ1ZSIsIndoaXRlTGFiZWwiOiJ7XCJhcHBOYW1lXCI6XCJaZXJvRGV2XCJ9Iiwia2V5TW9kZSI6InYxIiwiaXNDdXN0b21WZXJpZmllciI6InRydWUiLCJzb2NpYWxGYWN0b3JGbG93IjoiIiwibG9naW5JZCI6Ijk5YzY5YjdjYTY4NTQzYzg5Y2IwNWJmZGU5NGEyNzQ5ODUyN2ZhN2U1OTE3ZDBiNTAzYjdkY2Y1YzExMDBiMTEiLCJzZXNzaW9uTmFtZXNwYWNlIjoiIiwidmVyc2lvbiI6IiIsImluc3RhbmNlSWQiOiJ1dzJvMHN3azdsOCIsInZlcmlmaWVyIjoiZ29vZ2xlIiwidHlwZU9mTG9naW4iOiJnb29nbGUiLCJyZWRpcmVjdFRvT3BlbmVyIjpmYWxzZX0&access_token=ya29.a0AfB_byBoOIg6KhpMHWC3WBgg8e54oHB-ESD9io19RguAzGQ4IeFDp6xBSOwuXCYvrA2s5acUkAiCrRWRyMSia-C5No0fEHugiY_3shfW8u9ysz6ZCP7riZKQJ68TOZuzRjFEkgvi2BlJfuVIqdCH0BYGrz-_e4RbzQaCgYKAXgSARESFQGOcNnCjXlR-YhkK-VeoOcvxEKdNQ0169&token_type=Bearer&expires_in=3599&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20openid&id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImY1ZjRiZjQ2ZTUyYjMxZDliNjI0OWY3MzA5YWQwMzM4NDAwNjgwY2QiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiIzODYzNzUxOTYwMzktcGk4NWZvY2U4c2hzZjZraDNnMGJtNWQ1dXNmZXEzajQuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiIzODYzNzUxOTYwMzktcGk4NWZvY2U4c2hzZjZraDNnMGJtNWQ1dXNmZXEzajQ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MFpSYTNsdGRuRlhUbmhNYWpsaWJXZFhVV3Q2TFdseVVrTTJid18","queryParameters":{}},"customAuthError":"Could not get result from torus nodes \n Unable to resolve enough promises.","customAuthHashParams":{"state":"eyJjbGllbnQiOiJCRWRqN1U2M3hIVlU1TVJldTd0cVhHT2k4cmZlRE5waWVQMjdfOUI3MGlhNDVHY2R1OUxreXFJMnlzZEFoWFVrZG9LNjB1V1NnVk9UaF9BZXhFcHNoQ00iLCJjdXJyZW50TG9naW5Qcm92aWRlciI6Imdvb2dsZSIsInBvcHVwV2luZG93IjoidHJ1ZSIsIndoaXRlTGFiZWwiOiJ7XCJhcHBOYW1lXCI6XCJaZXJvRGV2XCJ9Iiwia2V5TW9kZSI6InYxIiwiaXNDdXN0b21WZXJpZmllciI6InRydWUiLCJzb2NpYWxGYWN0b3JGbG93IjoiIiwibG9naW5JZCI6Ijk5YzY5YjdjYTY4NTQzYzg5Y2IwNWJmZGU5NGEyNzQ5ODUyN2ZhN2U1OTE3ZDBiNTAzYjdkY2Y1YzExMDBiMTEiLCJzZXNzaW9uTmFtZXNwYWNlIjoiIiwidmVyc2lvbiI6IiIsImluc3RhbmNlSWQiOiJ1dzJvMHN3azdsOCIsInZlcmlmaWVyIjoiZ29vZ2xlIiwidHlwZU9mTG9naW4iOiJnb29nbGUiLCJyZWRpcmVjdFRvT3BlbmVyIjpmYWxzZX0","access_token":"ya29.a0AfB_byBoOIg6KhpMHWC3WBgg8e54oHB-ESD9io19RguAzGQ4IeFDp6xBSOwuXCYvrA2s5acUkAiCrRWRyMSia-C5No0fEHugiY_3shfW8u9ysz6ZCP7riZKQJ68TOZuzRjFEkgvi2BlJfuVIqdCH0BYGrz-_e4RbzQaCgYKAXgSARESFQGOcNnCjXlR-YhkK-VeoOcvxEKdNQ0169","token_type":"Bearer","expires_in":"3599","scope":"email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20openid","id_token":"eyJhbGciOiJSUzI1NiIsImtpZ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ED42_HHcN8PWhZgwgKlSDurf6yidGneZeQ4PmWHkFOuWCM1rHNLXZ0UsBh4XHqvVJyLo0hBqcUQDNQWRMMJdLbSoAhdgzuUarfilpLjkHso_lI93UO6F4fl-eetoZb8mBsRAM5oE-elRhaoGuzJMsiAlaMl4nVDrH7M8-Octcivwg-fms0wg","authuser":"0","hd":"rivo.xyz","prompt":"consent","version_info":"CmxfU1ZJX0VMR3VrZDN5cElJREdBa2lQMDFCUlVSSVpsOXhSRk50ZFVKZldIQTBRbEp6Um5WSVptZFVlRTVtTWxsMlNVMHlUMFpSYTNsdGRuRlhUbmhNYWpsaWJXZFhVV3Q2TFdseVVrTTJid18"}}}]

ping @vjgee

Please take a look :pray:

Hi @alexander, may i know if you are facing this issue consistently or is it very random, how often does it happen for you? and it would be helpful to know the country from where you are trying to login.

One of the users getting this error is from Russia, using a German VPN.

Might this be a problem? Maybe you have some ban list on countries or VPN protocols?

@himanshu appreciate any feedback :pray:

Sorry for the delay @alexander, so we havent blocked any country so it very unlikely that it might be failing because of vpm , also we have deployed some fixes last weekend for similar errors and i think your issue should have been solved with last week release. Can you check again with the user if he is still getting issues?

@himanshu nope, he’s still getting this error randomly, with VPN turned on.

Sorry but i am not sure wht could be wrong here, is it possible to schedule a debugging call with the user since none of us are able to replicate this?

1 Like

@himanshu yeah, I think its possible, but will it be productive if we couldn’t replicate this on call?
Maybe we can ask for some user device data that might be relevant?

For the call, it would be convenient if you could provide a link to calendly or some other service so we can choose time.

Hello @himanshu !

I think we finally found the cause - our current theory is that this error occurs when a user is using a shared VPN.
In our case it was a corporate VPN, and several users were logging in with web3auth using the same VPN, and some of them were randomly getting this error.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.