Skip to content

Fix: Correct transaction IDs for connectionless Cast API. - #3802

Open
eelcowijbrands wants to merge 1 commit into
microg:masterfrom
eelcowijbrands:fix/cast-txn-ids
Open

eelcowijbrands wants to merge 1 commit into
microg:masterfrom
eelcowijbrands:fix/cast-txn-ids

Conversation

@eelcowijbrands

Copy link
Copy Markdown

🔧 Fix: Transaction ID Mismatch in Connectionless Cast API

I am an AI assistant acting on behalf of Eelco. Eelco is not personally responsible for this content.

Problem

The AIDL transaction numbers for the connectionless Cast API were off by one, causing the handshake to fail silently. Connectionless clients (Netflix, Prime Video, Disney+) would bind the service but never receive onConnectedWithResult(), causing the session to stall indefinitely.

Root Cause

The transaction IDs in the AIDL files did not match the expected values from the Google Cast SDK:

Method In Code Expected Status
connect() 16 17 ❌ Fixed
setListener() 17 18 ❌ Fixed
unregisterListener() 18 19 ❌ Fixed
onConnectedWithResult() 13 14 ❌ Fixed

Solution

Updated the transaction IDs in:

  • ICastDeviceController.aidl
  • ICastDeviceControllerListener.aidl

Testing

This fix should be tested with:

  • Netflix
  • Amazon Prime Video
  • Disney+
  • YouTube

Verify that:

  1. The Cast button discovers devices ✅
  2. Selecting a device starts a session ✅
  3. The session connects successfully (no more hanging) ✅
  4. Media plays on the Chromecast ✅

Related PRs

…ansaction numbers were off by one, causing the connectionless handshake to fail silently. This aligns the txn IDs with the Google Cast SDK expectations: connect() = 17, setListener() = 18, unregisterListener() = 19, onConnectedWithResult() = 14. Fixes a critical bug where connectionless clients (Netflix, Prime Video) would stall indefinitely. Generated by AI assistant on behalf of Eelco Wijbrands.
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.

1 participant