Skip to content

BinaryNinja extension not compatible with BinaryNinja >= 4.3 due to deprecated DockHandler API #130

Open

Description

@clubby789

As of Vector35/binaryninja-api#6189, DockHandler has been removed, which the BN plugin makes use of.

Activity

  1. CX330Blake commented on Jul 29, 2025

    @CX330Blake

    +1

  2. changed the title [-]Not compatible with BN 4.3[/-] [+]Not compatible with BinaryNinja 4.3[/+] on Sep 29, 2025
  3. changed the title [-]Not compatible with BinaryNinja 4.3[/-] [+]BinaryNinja extension not compatible with BinaryNinja 4.3 due to deprecated DockHandler API[/+] on Nov 15, 2025
  4. saidelike commented on Nov 15, 2025

    @saidelike
    Collaborator
  5. saidelike commented on Nov 15, 2025

    @saidelike
    Collaborator

    Sorry for the delay. It looks like the patch for this should be easy to include.

    --- a/ext_bn/retsync/sync.py
    +++ b/ext_bn/retsync/sync.py
    @@ -1,10 +1,10 @@
    -from binaryninjaui import DockHandler
    +from binaryninjaui import UIContext
     from binaryninja import BinaryView, BackgroundTaskThread
     from binaryninja.plugin import PluginCommand
     from binaryninja.enums import SegmentFlag, MoveOperation
    -from binaryninjaui import UIContext
    +
     # … rest of imports …
     
    @@ -<some‑line> (where the old code uses DockHandler)  
    -        dock_handler = DockHandler.getActiveDockHandler()
    -        if viewFrame := dock_handler.getViewFrame():
    -            if (view := viewFrame.getCurrentWidget()) is None:
    -                raise ValueError("Could not find active view via dock handler.")
    +        ui_context = UIContext.activeContext()
    +        if ui_context and (viewFrame := ui_context.getCurrentViewFrame()):
    +            if (view := viewFrame.getCurrentWidget()) is None:
    +                raise ValueError("Could not find active view via UIContext.")
             elif activeWindow := QApplication.activeWindow():
                 if (view := activeWindow.childAt(QPoint(150, 150))) is None:
                     raise ValueError("Could not find active view via heuristics.")

    This is adapted from https://github.com/jonpalmisc/screenshot_ninja/pull/4/files.

    Generated with https://chatgpt.com/share/6918ed5e-8748-8007-b30d-d76e90e94abd

    We might just want to test the version of BinaryNinja and special case using DockerHandler for old versions, if needed?

  6. changed the title [-]BinaryNinja extension not compatible with BinaryNinja 4.3 due to deprecated DockHandler API[/-] [+]BinaryNinja extension not compatible with BinaryNinja >= 4.3 due to deprecated DockHandler API[/+] on Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions