Skip to content

bug: Fire TV — remote input stops responding after submitting a search in Discover #29

Description

@benhaddim

Checklist

  • My version of the app is the latest available
  • I have checked open and closed issues
  • I have checked the docs for a fix

Bug Severity

Usability is affected

Bug Area

User Interface

Bug Description / Steps to Reproduce

On a Fire TV Stick 4K running the TV build, remote navigation works normally
everywhere — tabs, the Anime library, the home screen and playback are all fine.
But submitting a search in Discover permanently kills remote input on that
screen.

Steps to reproduce:

  1. Open Discover on a Fire TV Stick and select the search field
  2. Type any query (e.g. kaiji) using the on-screen keyboard
  3. Press Enter / the search key
  4. Results render correctly and are visible on screen
  5. From this point no remote key does anything on that screen — no focus
    indicator appears, and the results cannot be scrolled or selected

Pressing Home and reopening the app recovers it, which is consistent with
useFocusEffect re-firing on screen focus. Everything else in the app continues
to work normally; only this screen is affected.

This is not the same as #27. There, nothing responds anywhere and the mobile
layout is rendered at the wrong scale. Here the TV layout renders correctly and
navigation works throughout the app — the failure is specific to the moment a
search is submitted.

Possible cause

I looked through the repo rather than instrumenting the app, so treat this as a
hypothesis, but three things in src/components/tv/tv-search-screen.tsx line up
with the symptom:

  1. Focus is only requested when the screen gains focus, never when results
    change:

    useFocusEffect(React.useCallback(() => {
        const timer = setTimeout(() => { inputRef.current?.requestTVFocus() }, 100)
        return () => clearTimeout(timer)
    }, []))
  2. submit only writes the atom — it does not move focus anywhere:

    const submit = React.useCallback(() => {
        setParams(current => ({ ...current, type: "anime", title: input.trim() || null }))
    }, [input, setParams])
  3. The grid is emptied while loading, which unmounts whatever view currently
    holds focus:

    <TVMediaGrid media={search.isLoading ? [] : media} ... />

So on submit the focused view is destroyed and nothing re-requests focus. On
tvOS the native focus module would presumably recover this, but on Android
modules/expo-tv-focus/ contains only an ios/ folder — no android/
unlike expo-download-manager, expo-external-player, expo-mpv-player and
expo-offline-logger, which all ship both platforms. Since the module is loaded
with requireOptionalNativeModule and every call is optional-chained
(ExpoTVFocusModule?.setEnabled(...)), it resolves to undefined on Fire OS and
silently no-ops. That would explain why the app degrades on exactly this one
screen rather than failing outright.

If that reading is right, a narrow fix would be to re-request focus once results
settle, and/or to avoid clearing media during isLoading so the focused view
survives the refetch. The broader fix is presumably the missing Android side of
expo-tv-focus, which would likely also cover #27 — I'll leave that call to you.

I don't have an Android NDK toolchain set up to build and verify a patch, so I'm
reporting rather than sending a PR. Happy to test a build or an OTA if that helps.

Expected Behavior

After submitting a search, focus should move to (or remain somewhere that can
reach) the results grid, so the results can be navigated with the D-pad.

Logs

No crash and nothing logged — the app stays running and correctly rendered, it
simply stops responding to remote input on this screen.

Debugging Checklist

  • I have included error messages
  • I have included server logs (if applicable)
  • I have included device / crash logs

App Version

v0.3.0-23-20260725-c8f8db6 (Android TV build)

Operating System

Android

Environment

  • Device: Amazon Fire TV Stick 4K (Fire OS), app sideloaded
  • APK: seanime-tenji-tv-v0.3.0-23-20260725-c8f8db6.apk
  • Server: Seanime 3.10.2 (Saisei) on a Linux VPS, behind a Caddy HTTPS reverse
    proxy, with a server password set
  • Playback source: Real-Debrid streaming — works fine, playback itself is
    unaffected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions