t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Android image viewer shows a black screen; images only visible as inline thumbnails

Open Haim098 opened this issue 3 weeks ago • 5 comments

Before submitting

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

Area

Mobile app (Android): full-screen image viewer

Steps to reproduce

  1. On Android, open a thread where an agent embedded a host-path image (e.g. C:/Users/.../comic/locations/kuki_room.png).
  2. The inline thumbnail in the chat renders fine.
  3. Tap the image to open the full-screen viewer.

Expected behavior

The viewer opens with the image shown full screen, and it can be pinch-zoomed.

Actual behavior

The viewer opens (header shows kuki_room.png and the full host path, with the close and ... buttons), a loading spinner appears over the dimmed thread for a moment, and then the screen goes fully black. The image never appears, so it can't be enlarged or zoomed. The only way to see the image is the small inline preview in the chat.

Impact

Can't view any image at full size on Android. Thread images (generated art, screenshots) are only visible as small inline thumbnails.

Version or commit

Host: T3 Code (Nightly) 0.1.8 desktop app on Windows. Android app: current release.

Environment

Windows 11 host, Android phone (1440x3200 display).

Logs or stack traces

None collected yet.

Screenshots, recordings, or supporting files

Screen recording (4.7s): tap on the inline image → viewer opens with spinner → black screen. Recording will be attached in a comment.

Not the same as #31772 (iOS, images never load because of a missing filesystem:read scope): here the inline thumbnail loads fine, so the asset URL works; only the full-screen viewer fails. Possibly related to the Android viewer touched in #30815.

Workaround

None, other than viewing the image on desktop.

Haim098 avatar Nov 09 '26 17:11 Haim098

Thanks for the detailed report. I tried to reproduce this on current main (4bfa2c1c80) and couldn't get the black screen yet.

What I ran: a fresh T3 server (Linux host) with an Android dev client of the same commit. An agent reply embedded host-path images, and I tapped each inline thumbnail to open the full-screen viewer:

  • Pixel 9 emulator (1080×2424): PNGs at 512², 1024×1536, 1536×1024, 2048², 4096² and 8192², in both 8-bit and 16-bit, RGB and RGBA. I also tried a JPEG and a WebP that were saved with a .png name.
  • Pixel 7 Pro emulator (1440×3120, the density closest to your 1440×3200 phone): 1536×1024, 1024×1536 RGBA, 4096² and 8192².

Every time, the viewer first showed the spinner over the dimmed thread, as you describe. Then the image appeared fitted to the screen and could be zoomed. It never went black.

A few details would help narrow down the difference:

  1. Android app version. It's in Settings → About. Please also say whether it's the Play Store build.
  2. Phone model and Android version.
  3. The image itself. Does it happen for every image, or only some? For example, does a small screenshot embedded the same way open fine? For an image that fails, the pixel dimensions and real file type would help. If you can share the file (e.g. kuki_room.png), that's even better.
  4. The screen recording you mentioned.

juliusmarminge avatar Nov 09 '26 18:11 juliusmarminge

@Haim098 Could you attach the image that fails (e.g. kuki_room.png) or give its pixel dimensions and real file type, plus your phone model, Android version and the app version from Settings → About? A maintainer tried PNGs up to 8192² in several formats on Android emulators and every one opened, so the specific file or device is what we need to reproduce the black screen.

juliusmarminge avatar Nov 12 '26 06:11 juliusmarminge

Hi @juliusmarminge, thanks so much for jumping on this so quickly and for taking the time to try to reproduce it, and for all the work you and the team are putting into T3 Code. I use it every day and the mobile app has become a core part of my workflow.

Answering your questions:

  1. App version: latest Play Store build
  2. Device: Xiaomi POCO F7 Pro (24117RK2CG), a real device, not an emulator. HyperOS 3.0.304 (WOKMIXM), Android 16, security patch 2026-10-01
  3. Which images: every image, every time. I tested:
    • JPG screenshots I attached to my own message from the phone (e.g. 165 KB)
    • PNGs the agent embeds from the host: kuki_room.png 1672×941, 2.3 MB and fix-breach-near.png 1600×900, 843 KB (both real PNGs, rgb24, attached)
  4. Screen recording: attached.

In all cases the inline preview in the chat renders fine. Tapping it opens the viewer (filename + path shown, a brief spinner over the dimmed thread, exactly like you saw), but then instead of the image it goes to a black screen. Since even a small JPG fails, it doesn't look file-related. Given it works on your emulators, my guess is something specific to real hardware or HyperOS (emulators use a different GPU/rendering path than a physical device).

Host: T3 Code (Nightly) 0.1.8, Windows 11.

Happy to run a debug build, grab adb logcat, or test anything else that would help.

https://github.com/user-attachments/assets/72aa78f7-7cad-45f7-a464-bfd991b4a61f

Haim098 avatar Nov 12 '26 06:11 Haim098

@Haim098 Could you capture adb logcat while reproducing it (open the thread, tap the image, wait for the black screen) and attach the log? It would also help to know whether it still happens with Battery saver / Ultra battery saver off and with Settings > Display > Screen resolution switched between WQHD+ and FHD+.

juliusmarminge avatar Nov 12 '26 06:11 juliusmarminge

@juliusmarminge here's the logcat. I reproduced it twice with adb logcat running (attached: 8-logcat-t3code.txt, filtered to the app's process around each tap).

Setup: T3 Code Android 2.3.0 (versionCode 784, Play Store), POCO F7 Pro (24117RK2CG), HyperOS 3.0.304, Android 16.

Battery saver: it was off for both runs (settings get global low_power → 0), so that's not it.

Resolution: reproduces in both:

  • WQHD+ 1440×3200 (native): tapped p16.png (1700×2550 PNG): spinner, then black.
  • FHD+ 1080×2400 (switched with wm size 1080x2400 + wm density 450, app relaunched): tapped p27.png: same black screen.

What the log shows at the tap (same in both runs, no crash, no exception):

  1. W unknown:WrappingUtils: Don't know how to round that drawable right when the viewer opens
  2. ReactModalHostManager creates the modal window (enableEdgeToEdge)
  3. libimagepipeline.so loads (Fresco), then ~1.3s later W HWUI: Image decoding logging dropped!
  4. Nothing after that: no decode error, no OOM, just a black screen

So the image does seem to get fetched/decoded, but it never gets drawn inside the modal. The WrappingUtils warning (Fresco can't apply rounded corners to that drawable type) is the only app-side warning at that moment, so maybe the viewer's image has a borderRadius/rounding that falls back badly on this device's HWUI (Vulkan) pipeline?

Happy to test a debug build or anything else.

8-logcat-t3code.txt

Haim098 avatar Nov 12 '26 07:11 Haim098