Skip to content

[Android] Video.compress rejects with an empty message on MediaCodec.CodecException #428

Closed

Description

@oeddyo

Current behavior

On Android, when MediaCodec throws a CodecException during Video.compress, the promise rejects with the exception's message, which is usually empty. The JS side gets CodecException: or start failed and nothing else, so one codec error can't be told from another.

We saw this in production on Samsung Exynos phones before #424: every failure arrived empty, and the actual cause (NO_MEMORY in STARTING) only showed up in logcat on a test device.

Expected behavior

The rejection names the codec error. CodecException.getDiagnosticInfo() already carries it, e.g. android.media.MediaCodec.error_neg_12 for NO_MEMORY.

Platform

  • Android
  • iOS

React Native Version

0.86

React Native Compressor Version

2.0.4

Reproducible Steps And Demo

Any input that makes the encoder or decoder throw a CodecException. For example, 1080p manual compression on an Exynos device before #424. The rejection's message is empty.

Activity

  1. github-actions commented on Oct 26, 2026

    @github-actions

    👋 @oeddyo
    Thanks for opening your issue here! If you find this package useful hit the star🌟!

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions