Skip to content

fix(mobile/navigation): fix conference join hang when SDK launched in background#17180

Open
iospro wants to merge 1 commit intojitsi:masterfrom
iospro:feat/skip-navigation-ready-wait-on-backgroud
Open

fix(mobile/navigation): fix conference join hang when SDK launched in background#17180
iospro wants to merge 1 commit intojitsi:masterfrom
iospro:feat/skip-navigation-ready-wait-on-backgroud

Conversation

@iospro
Copy link
Contributor

@iospro iospro commented Mar 21, 2026

Problem

When the Jitsi Meet SDK is embedded in a host app and the host app launches the SDK
programmatically in response to an incoming call notification — while the device is
locked and the screen is off — joining the conference room hangs indefinitely.

Root cause: App.native._extraInit() awaits a rootNavigationReady promise that
resolves only when NavigationContainer fires its onReady callback. When the app
runs in the background (device locked, no UI on screen), React Navigation never renders
or fires onReady, so the polling loop spins forever and the conference join never
proceeds.

A secondary issue: without Welcome Page (embedded SDK mode), initialRouteName was
screen.connecting, but when a room URL is already known at launch the navigator
should start at screen.conference.root to avoid an unnecessary intermediate screen.

Solution

App.native.tsx — detect background SDK launch using AppState.currentState !== 'active'
combined with the presence of a url prop. Skip await rootNavigationReady in this case
so the join flow proceeds immediately without waiting for UI to become visible.

RootNavigationContainer.tsx — derive initialRouteName from Redux state:
if a room is already set at mount time (meaning the SDK was started with a conference
URL), navigate directly to screen.conference.root; otherwise use screen.connecting
as before.

Behaviour

Scenario AppState url prop await skipped initialRoute
User opens app normally active connecting
User opens app via deep link active connecting → navigate
Host app starts SDK in background background conference.root

@jitsi-jenkins
Copy link

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants