Skip to content

Magic SDK (@magic-sdk/react-native-expo) fails to open WebView with [email protected] (Expo SDK 53) #920

@melek-hedhili

Description

@melek-hedhili

When integrating @magic-sdk/react-native-expo (v30.4.1) in an Expo SDK 53 project with development build which comes with [email protected], the Magic authentication WebView does not open when using the Magic SDK's login functionality—on Android. There is no crash, but the expected email login (OTP) or WebView screen is never rendered.

Downgrading react-native-webview to v11.26.0 (as mentioned in the documentation) causes the app to crash immediately on startup.
🧩 Steps to Reproduce
Create a new Expo project using SDK 53 with development build (which enforces [email protected]).

Install and configure @magic-sdk/react-native-expo (v30.4.1).

Attempt Magic login on Android using the sample context below.

The authentication WebView never appears (silent fail), and the login cannot proceed.

*Expected behavior
When calling magic.auth.loginWithEmailOTP({...}), a Magic authentication WebView (email input for OTP) should be rendered on Android and iOS.

*Actual behavior
No WebView appears; nothing happens visually. Authentication cannot proceed. This regression affects Android on Expo SDK 53 with [email protected].

import { MagicService } from "@/lib/magic/magic";

const magic = MagicService.magic;

// Called from your UI when user wants to sign in with Magic link
const signIn = async (credentials: { email: string }) => {
  try {
    // This should open the Magic email OTP WebView,
    // but with react-native-webview v13.x on Expo SDK 53, nothing appears on both Android and iOS.
    await magic.auth.loginWithEmailOTP({ email: credentials.email });

    // If the WebView triggered, this would fetch user info (but WebView never opens)
    const magicResponse = await magic.user.getInfo();

    // ...subsequent SIWE or API calls omitted for brevity
  } catch (error) {
    console.error("Magic sign-in error:", error);
  }
};

Updates:

  • On react-native-webview v11.26.0, the Android app crashes with the error shown below, while iOS works perfectly. (See image below)
Image
  • On react-native-webview v13.13.0, the WebView for OTP sign-in fails to trigger on Android only

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions