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!