Expo Router Splash Screen Freeze Traced to Auth and Notification Navigation Race
A developer discovered that their Expo app appeared frozen on the splash screen during cold starts triggered by tapping a push notification. The root cause was a race condition where two navigation calls — one from an authentication check and another from a notification response handler — fired almost simultaneously before navigation had settled. The fix involved passing an 'authChecked' flag to the push token registration hook, ensuring notification handling only begins after authentication completes. An additional utility function was added to normalize notification URLs, handling both relative paths and absolute URLs before passing them to Expo Router. The developer confirmed the fix worked across five scenarios, including notification taps from terminated, background, and foreground app states.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in