Skip to content

fix(instagram): inject inboxActionBarButton after CHECK_CAST to fix VerifyError on 439 - #1602

Closed
Flaxmbot wants to merge 1 commit into
crimera:devfrom
Flaxmbot:fix/inbox-action-bar-verify-error
Closed

fix(instagram): inject inboxActionBarButton after CHECK_CAST to fix VerifyError on 439#1602
Flaxmbot wants to merge 1 commit into
crimera:devfrom
Flaxmbot:fix/inbox-action-bar-verify-error

Conversation

@Flaxmbot

Copy link
Copy Markdown
Contributor

Problem

On Instagram 439.0.0.37.89 (Android 16 / SDK 36), the app crashes immediately when navigating to Direct Inbox:

\
java.lang.VerifyError: Verifier rejected class X.08PF:
android.view.View X.08PF.onCreateView(...) failed to verify:
register v9 has type Reference: android.view.View
but expected Reference: android.view.ViewGroup
\\

Root cause

\InboxActionBarButtonPatch\ injects the \inboxActionBarButton\ call at \it.location.index\ — before the \CHECK_CAST to IgdsActionBar\ executes. At that point the register still holds the raw \�ndroid.view.View\ returned by \LayoutInflater.inflate().

The DEX verifier (ART, SDK 36) sees that register being passed where a \ViewGroup\ is declared, and rejects the entire \X.08PF\ (DirectInboxFragment) class.

Fix

Inject at \index + 1\ (after the cast), so the register is already typed as \IgdsActionBar\ — a \ViewGroup\ subclass — when the verifier inspects it.

This is exactly the same pattern \ChatActionBarButtonPatch\ already uses (with an explicit comment explaining why).

Tested on

  • Instagram \439.0.0.37.89\ / Android 16 / SDK 36 (iQOO device)

…erifyError on 439

InboxActionBarButtonPatch was injecting the inboxActionBarButton call at
it.location.index — before the CHECK_CAST to IgdsActionBar executes.
At that point the register still holds the raw View returned by
LayoutInflater.inflate(). The DEX verifier (ART, SDK 36) sees the
register typed as View being passed where ViewGroup is declared, and
rejects the entire X.08PF (DirectInboxFragment) class with:

  VerifyError: register v9 has type Reference: android.view.View
               but expected Reference: android.view.ViewGroup

Fix: inject at index + 1 (after the cast) so the register is already
typed as IgdsActionBar, which satisfies the ViewGroup parameter.
This is the same pattern ChatActionBarButtonPatch already uses.
@swakwork

Copy link
Copy Markdown
Collaborator

Thanks but it's already addressed #1600

@swakwork swakwork closed this Jul 27, 2026
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.

2 participants