Skip to content

[Bug]: Android dialogs stop appearing after the activity is replaced #22127

Closed

Description

@PixPMusic

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. On Android, open the T3 Code app.
  2. Replace the running activity without killing the process, for example: adb shell am start -W -n com.t3tools.t3code.dev/.MainActivity -f 0x10008000 (NEW_TASK | CLEAR_TASK).
  3. Open Settings → Environments → an environment → expand Connection → tap the trash icon.

Expected behavior

"Remove from this device?" appears.

Actual behavior

Nothing happens. No dialog, no error. Every Android Dialog.alert, Dialog.confirm and Dialog.prompt stays silent until the app process restarts.

Dialog.android.tsx keeps one module-level presentRequest. Each Dialog.Host sets it on mount and clears it in its effect cleanup. When Android replaces the activity, the new React root's Host registers before the old root unmounts, so the old Host's cleanup clears the new Host's presenter. Logged on device:

register host 31j2v, root 11, previous true
cleanup host rxca0, root 1, owns false
dialog.alert "Remove from this device?" NO HOST

Impact

Major degradation or frequent failure

Version or commit

main at fd8dd51654; also seen on a #20812 build.

Environment

Pixel 10 Pro Fold, Android 17, release .dev build.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions