Skip to main content
Question

How important is "standard" launch mode on Android?

  • December 13, 2024
  • 1 reply
  • 149 views

Forum|alt.badge.img

I’m building an Expo app using Expo Router, Clerk for authentication, and Revenue Cat to manage subscriptions.

I noticed in the docs that I need to switch the Android launch mode to be “standard” as opposed to the default “singleTask” set by Expo, so I built an Expo config plugin to do so.

However, after switching to to “standard,” Clerk’s Google OAuth no longer works after redirecting back to my app (by default, this is scheme://oauth-native-callback), throwing an error:

Error: Attempted to navigate before mounting the Root Layout component. Ensure the Root Layout component is rendering a Slot, or other navigator on the first render.

I’ve verified that switching the launch mode back to “singleTask” resolves the issue. I’m opening support tickets with Clerk and Expo Router as well, but I’m hoping to get some clarification here on whether I may have missed something while setting this up and how important “standard” launch mode is on Android. Is it common for users to background their app during purchases? Would it be mostly fine to launch with “singleTask” mode?

Just in case, it’s helpful, I’m on all the latest versions of these packages:

"@clerk/clerk-expo": "^2.5.0",

"expo": "~52.0.18",

"expo-router": "~4.0.11",

"react-native-purchases": "^8.4.0",

Appreciate the help!

This post has been closed for comments

1 reply

jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 240 replies
  • December 17, 2024

Hi ​@jerry-wang-589bb7 - I’m sorry that you’ve been having issues with RevenueCat and Clerk auth in your Expo app. The issue with singleTask is that Google’s strong customer authentication flow does result in the user backgrounding the app to complete the requirements before the purchase can go through. Also, it’s not totally uncommon for users to close and reopen your app during the flow, even without strong customer auth.

Can you share what Clerk tells you when you hear back from them?

Also, the error message you shared suggests to me that you might be able to get around this by adding a “mount” phase check in your app. Can you wait until mounted is true before navigating?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings