Expo Linking - Fails on Development Only on Android

I use Expo Linking for the oAuth flow of my project. The redirect urls (deep links) which the server triggers (and I listen for) towards my app are the ones described in Expo docs:

  • Published app in Expo client: exp://exp.host/@community/with-webbrowser-redirect
  • Published app in standalone: myapp://
  • Development: exp://wg-qka.community.app.exp.direct:80

They all work on iOS (both standalone app, simulator and during dev).

However, on Android, the Development linking fails. I tried to connect my device via a cable and run my project or scan the QR code… the same. Just when a redirection is triggered by my server, every time it fails with the following error:

The published app in Expo client and the standalone app deep links on Android work just fine. Only the Development one fails. Any ideas why?

Edit: I just tried installing Android Studio emulator. Same problem.

Expo SDK 33.0.0, expo-cli v3.0.6 (I tried with an older version, v2.20.0, same issue).

Is the device you’re using on the same wifi network?

Do you have any device logs that could give a better idea of what’s going on behind the scenes?

Sharing a minimal repro of this would be awesome, if you have the time

@charliecruzan, thanks for stepping in.

Yes, same wifi network. Logged in with the same Expo account. Device logs -> no. Please let me know how I can find and send you those and I will?

Here’s basically what I’m doing:

const loginURL = "https://blabla.com";

Linking.addEventListener(loginURL, () => {
    // Redirect triggered!

const oAuthSession = await WebBrowser.openAuthSessionAsync(
    // I don't pass redirect url, my backend redirects me

Unfortunately, I can’t share a complete example.

Ahhh, okay I think I know what’s causing this

In the Expo client for Android, you need to manually close the browser by tapping the X button, but in a standalone app it closes as expected. You can take a look at this issue for more info, but it’s something we’re currently working on

Okay, I see. However, the Expo client for Android crashes as soon as my backend sends a redirect.

I can’t close the browser by tapping the X button, because as soon as I enter my user and pass - server redirects and Expo client crashes. Are you sure it’s the same issue?

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