# \[Archive\] Something went wrong error randomly happens

**URL:** <https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [March 4, 2024, 10:45am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414 "2024-03-04T10:45:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonino.abbate](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@antonino.abbate](https://builder.metamask.io/u/antonino.abbate)\
**Post date:** [March 4, 2024, 10:45am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/1 "2024-03-04T10:45:38Z")

</div>

> **🏛 Archived Content from Web3Auth Community**
> 
> This topic was originally posted by **antonino.abbate** on 3/4/2024.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

When logging in with apple i randomly get the error attached. There is no deterministic way to reproduce it, it happens randomly.

- SDK Version: 3.1.6

- Platform: iOS 17.3.1

[![File](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/1X/99a7287576f9f8d33b545eeacf86993538b20dc7.jpeg)
File1125×2436 116 KB
](https://web3auth.io/community/uploads/default/original/2X/b/b9351c6ced16952a34edec4733e4dc9a207114a6.jpeg "File")

---

<div class="post-metadata">

**Author:** ![TomTom](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@TomTom](https://builder.metamask.io/u/TomTom)\
**Post date:** [March 4, 2024, 1:11pm UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/2 "2024-03-04T13:11:41Z")

</div>

hi @antonino.abbate,

Your issue has been forwarded to our Dev team and we will get back with further updates.

---

<div class="post-metadata">

**Author:** ![Ayush](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/ayush/32/1540_2.png) [@Ayush](https://builder.metamask.io/u/Ayush)\
**Post date:** [March 7, 2024, 6:14am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/3 "2024-03-07T06:14:56Z")

</div>

@antonino.abbate I tried at my end, and I can’t happen to reproduce it. Can you please share the snippet for login function along with screen recording?

---

<div class="post-metadata">

**Author:** ![antonino.abbate](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@antonino.abbate](https://builder.metamask.io/u/antonino.abbate)\
**Post date:** [March 8, 2024, 9:32am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/4 "2024-03-08T09:32:26Z")

</div>

Hello,  
the code to login is very simple. Video of the failing procedure is here: [WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free](https://we.tl/t-AtJ6adpiMz)

```auto
  Future<Web3AuthResponse> _withGoogle() {
    return Web3AuthFlutter.login(LoginParams(
      loginProvider: Provider.google,
      mfaLevel: MFALevel.DEFAULT,
    ));
  }
Future<Web3AuthResponse> _withFacebook() {
return Web3AuthFlutter.login(LoginParams(loginProvider: Provider.facebook));
}
Future<Web3AuthResponse> _withApple() {
return Web3AuthFlutter.login(LoginParams(loginProvider: Provider.apple));
}
Future<Map<String, String>?> login(LoginType type) async {
Future<Web3AuthResponse> Function()? method;
switch (type) {
  case LoginType.withGoogle:
    method = _withGoogle;
    break;
  case LoginType.withApple:
    method = _withApple;
    break;
  case LoginType.withFacebook:
    method = _withFacebook;
    break;
}

try {
  final Web3AuthResponse response = await method();
  GetStorage box = GetStorage();
  box.write('privateKey', response.privKey.toString());

  privateKey = EthPrivateKey.fromHex(response.privKey.toString());

  return {
    'address': privateKey!.address.toString(),
    'email': response.userInfo!.email!,
    'nickname': response.userInfo!.name!,
  };
} on UserCancelledException {
  print("User cancelled.");
  return null;
} on UnKnownException {
  print("Unknown exception occurred");
  return null;
}

```

---

<div class="post-metadata">

**Author:** ![antonino.abbate](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@antonino.abbate](https://builder.metamask.io/u/antonino.abbate)\
**Post date:** [March 12, 2024, 8:44am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/5 "2024-03-12T08:44:38Z")

</div>

Hello, any news?  
This is blocking for us.

Thanks.

---

<div class="post-metadata">

**Author:** ![Ayush](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/ayush/32/1540_2.png) [@Ayush](https://builder.metamask.io/u/Ayush)\
**Post date:** [March 12, 2024, 9:05am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/6 "2024-03-12T09:05:15Z")

</div>

Hey @antonino.abbate, sorry for delays. I checked the video you shared. It’s issue of pricing plan. You currently are on free tier and hence, you won’t be able to use white label features. It’s available from growth plan. Please try removing the whitelabel parameter and try again. If you want to try whitelabel, you can create a project on Saphire Devnet instead of Mainnet. If you need to schedule a call to talk about pricing, let us know.

---

<div class="post-metadata">

**Author:** ![onlytechindustries](https://avatars.discourse-cdn.com/v4/letter/o/e9c0ed/32.png) [@onlytechindustries](https://builder.metamask.io/u/onlytechindustries)\
**Post date:** [April 3, 2024, 9:06am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/7 "2024-04-03T09:06:10Z")

</div>

Hello. The problem is partly fixed getting rid of whitelabel features. Now, it just happens the FIRST TIME a user try to register/login. After cancellation and retry it works just fine. What could be the reason? The code on our side is - obviously - the same for every retry.

---

<div class="post-metadata">

**Author:** ![onlytechindustries](https://avatars.discourse-cdn.com/v4/letter/o/e9c0ed/32.png) [@onlytechindustries](https://builder.metamask.io/u/onlytechindustries)\
**Post date:** [April 8, 2024, 3:31pm UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/8 "2024-04-08T15:31:15Z")

</div>

Hello, any update on this? It is blocking us.

---

<div class="post-metadata">

**Author:** ![Ayush](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/ayush/32/1540_2.png) [@Ayush](https://builder.metamask.io/u/Ayush)\
**Post date:** [April 9, 2024, 12:56pm UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/9 "2024-04-09T12:56:43Z")

</div>

Hey, sorry for the delays. It would be helpful if you can share the Web3AuthFlutter initialisation code, and some details on login provider you are using?

Can you also add a screen-recording? It will help us know what exactly is not working, along with at what step.

---

<div class="post-metadata">

**Author:** ![onlytechindustries](https://avatars.discourse-cdn.com/v4/letter/o/e9c0ed/32.png) [@onlytechindustries](https://builder.metamask.io/u/onlytechindustries)\
**Post date:** [April 9, 2024, 3:00pm UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/10 "2024-04-09T15:00:04Z")

</div>

Hello, all the init code is posted in this thread.

Video of what is happening: [Video](https://drive.google.com/file/d/1Oqfc_qXGo1zd2hlWyjLgZXYD1U0YyUd6/view?usp=drive_link)

---

<div class="post-metadata">

**Author:** ![Ayush](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/ayush/32/1540_2.png) [@Ayush](https://builder.metamask.io/u/Ayush)\
**Post date:** [April 11, 2024, 9:33am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/11 "2024-04-11T09:33:25Z")

</div>

Hey, I tried but I’m not able to reproduce it. Can you confirm if GetStorage is working properly, and it’s not breaking? Are you doing `await GetStorage.init()`?

---

<div class="post-metadata">

**Author:** ![onlytechindustries](https://avatars.discourse-cdn.com/v4/letter/o/e9c0ed/32.png) [@onlytechindustries](https://builder.metamask.io/u/onlytechindustries)\
**Post date:** [April 11, 2024, 11:52am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/12 "2024-04-11T11:52:36Z")

</div>

Of course we do. Code is:

```auto
void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await GetStorage.init();
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);

```

---

<div class="post-metadata">

**Author:** ![onlytechindustries](https://avatars.discourse-cdn.com/v4/letter/o/e9c0ed/32.png) [@onlytechindustries](https://builder.metamask.io/u/onlytechindustries)\
**Post date:** [April 15, 2024, 10:28am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/13 "2024-04-15T10:28:08Z")

</div>

Hello,  
any update on this?

---

<div class="post-metadata">

**Author:** ![Ayush](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/ayush/32/1540_2.png) [@Ayush](https://builder.metamask.io/u/Ayush)\
**Post date:** [April 15, 2024, 10:44am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/14 "2024-04-15T10:44:44Z")

</div>

Hey, I tried reproducing still no luck. Can you please schedule a call with me so I can have a look at your code? I’ll DM you the Calendly link.

---

<div class="post-metadata">

**Author:** ![onlytechindustries](https://avatars.discourse-cdn.com/v4/letter/o/e9c0ed/32.png) [@onlytechindustries](https://builder.metamask.io/u/onlytechindustries)\
**Post date:** [April 17, 2024, 10:30am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/15 "2024-04-17T10:30:15Z")

</div>

Hello,  
we changed the URI from com.onlytechindustries.popup-events://openlogin to com.onlytechindustries.popup-events://auth but the problem still persist.

Any advice?

---

<div class="post-metadata">

**Author:** ![antonino.abbate](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@antonino.abbate](https://builder.metamask.io/u/antonino.abbate)\
**Post date:** [April 17, 2024, 1:19pm UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/16 "2024-04-17T13:19:44Z")

</div>

@Ayush can you help please, we are blocked by this issue

---

<div class="post-metadata">

**Author:** ![Ayush](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/ayush/32/1540_2.png) [@Ayush](https://builder.metamask.io/u/Ayush)\
**Post date:** [April 17, 2024, 1:35pm UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/17 "2024-04-17T13:35:58Z")

</div>

Hey, as I mentioned yesterday on the call, can you please share the API request being sent and parameters from Safari. You can get the details by debugging the simulator web JSContexts from Debug option in Safari.

[![Screenshot 2024-04-17 at 7.04.14 PM](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/1X/28744161993367fe33450d6bc56a5c7dc37adaca.png)
Screenshot 2024-04-17 at 7.04.14 PM1492×200 115 KB
](https://web3auth.io/community/uploads/default/original/2X/9/99502541f64818bfba02eaca5431ea7dd7d09912.png "Screenshot 2024-04-17 at 7.04.14 PM")

---

<div class="post-metadata">

**Author:** ![onlytechindustries](https://avatars.discourse-cdn.com/v4/letter/o/e9c0ed/32.png) [@onlytechindustries](https://builder.metamask.io/u/onlytechindustries)\
**Post date:** [April 18, 2024, 12:50pm UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/18 "2024-04-18T12:50:12Z")

</div>

Hello. Parameters and debug here: [https://pastebin.com/2pttkRy4](https://pastebin.com/2pttkRy4)

Thanks.

---

<div class="post-metadata">

**Author:** ![antonino.abbate](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@antonino.abbate](https://builder.metamask.io/u/antonino.abbate)\
**Post date:** [April 19, 2024, 9:37am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/19 "2024-04-19T09:37:46Z")

</div>

@Ayush any suggestion or update?

---

<div class="post-metadata">

**Author:** ![Ayush](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/ayush/32/1540_2.png) [@Ayush](https://builder.metamask.io/u/Ayush)\
**Post date:** [April 22, 2024, 12:54am UTC](https://builder.metamask.io/t/archive-something-went-wrong-error-randomly-happens/1414/20 "2024-04-22T00:54:43Z")

</div>

Hey @antonino.abbate, thanks for sharing the details. Can you please also add the response of the APIs? I’ll meanwhile pass the details to the team.
