Unable to login with social credentials: “Error occurred while getting current epoch”

Error using login with social accounts, just with Iphones:

[{“errorMsg”:“Error occurred while getting current epoch”,“errorStack”:“@Web3Auth Error”,“createdAt”:“09/06/2025, 19:09:20”,“info”:{“customAuthState”:{“client”:“BO-XXXXXXXXXXXX”,“currentLoginProvider”:“google”,“popupWindow”:“true”,“whiteLabel”:"

my configuration:
web3auth = new window.Modal.Web3Auth({
clientId,
chainConfig,
web3AuthNetwork: “sapphire_devnet”,
privateKeyProvider,
uiConfig: {
appName: “Selaris -auto-custodial”,
appUrl: “https://app.selaris.ts4.io/”,
theme: {
primary: “#BAFD02”,
onPrimary: “#000000”,
},
mode: “dark”,
useLogoLoader: true,
defaultLanguage: “pt”,
modalZIndex: “99999”,
displayErrorsOnModal: true,
appLogo: “https://everblock.ts4.io/icon.png”,
primaryButton: “socialLogin”,
loginMethodsOrder: [ “google”, “facebook”, “twitter”,“linkedin”, “github”, “discord”, “email_passwordless” ],
web3AuthNetwork: “sapphire_devnet”,
cardBgColor: “#1f2937”,
cardTextColor: “#d1d5db”,
modalBackgroundColor: “#000000”,
modalTextColor: “#f3f4f6”,
signInText: “Entrar no Selaris”,
signInBtnText: “Conectar carteira”,
logoLight: “https://selaris.ts4.io/wp-content/uploads/2024/11/Logo_Horizontal_Selaris.png”,
logoDark: “https://selaris.ts4.io/wp-content/uploads/2024/11/Logo_Horizontal_Selaris.png”,

        }
    });

Hi Andrews, thanks for reaching out and providing detailed information!

Summary of Your Issue:

  • SDK: Web3Auth Plug and Play (PnP)
  • Platform: iOS (issue only on iPhones)
  • Login Method: Social (Google)
  • Error: “Error occurred while getting current epoch”
  • Error Context: Occurs during login with social accounts, only on iPhones.
  • Stack Trace: Provided from index-DTyerrT2.js (Web3Auth assets)
  • Initialization: Using Plug n Play iOS SDK, standard login flow.

Next Steps & Required Info

To help the support team investigate further, could you please provide:

  1. Web3Auth Initialization & Login Code Snippets:
    The code you use to initialize and trigger the login (especially the redirectUrl and network parameters).
  2. iOS Version(s) Affected:
    Are all iOS versions affected or just specific ones?
  3. Browser Console Logs/Screenshots (if available):
    Since this is on iOS, any error logs from Safari’s Web Inspector or Xcode console would be helpful.

Initial Troubleshooting & Suggestions

  • Check Redirect URL:
    Ensure your redirectUrl is correctly set as per Web3Auth iOS PnP SDK docs. For iOS, it should be in the format:
    "bundleId://auth"
    
  • Network Issues:
    This error can sometimes be caused by network timeouts or restrictions on iOS browsers (especially in-app browsers). Try testing in Safari directly.
  • SDK Version:
    Make sure you’re using the latest version of the Web3Auth iOS SDK.

Reference Links


Once you provide the code snippets and any additional logs, the support team will be able to assist you further. Thank you for your patience!

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours

My **Web3Auth Initialization & Login Code Snippets:

web3auth = new window.Modal.Web3Auth({
clientId,
chainConfig,
web3AuthNetwork: “sapphire_devnet”,
privateKeyProvider,
uiConfig: {
appName: “Selaris -auto-custodial”,
appUrl: “https://app.selaris.ts4.io/”,
theme: {
primary: “#BAFD02”,
onPrimary: “#000000”,
},
mode: “dark”,
useLogoLoader: true,
defaultLanguage: “pt”,
modalZIndex: “99999”,
displayErrorsOnModal: true,
appLogo: “https://everblock.ts4.io/icon.png”,
primaryButton: “socialLogin”,
loginMethodsOrder: [ “google”, “facebook”, “twitter”,“linkedin”, “github”, “discord”, “email_passwordless” ],
web3AuthNetwork: “sapphire_devnet”,
cardBgColor: “#1f2937”,
cardTextColor: “#d1d5db”,
modalBackgroundColor: “#000000”,
modalTextColor: “#f3f4f6”,
signInText: “Entrar no Selaris”,
signInBtnText: “Conectar carteira”,
logoLight: “https://selaris.ts4.io/wp-content/uploads/2024/11/Logo_Horizontal_Selaris.png”,
logoDark: “https://selaris.ts4.io/wp-content/uploads/2024/11/Logo_Horizontal_Selaris.png”,

        }
    });

This was a minor disruption on our sapphire_devnet environment only, the sapphire_mainnet network advised to be used in prod env was stable.
We looked into it and now even the sapphire_devnet is stable. Apologies for the disruption.

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