Skip to content

🐞 bug: handleMouseMoveAction crashes Appium server with "Unexpected end of JSON input" on SWT app elements #75

@yael-daum-secupi

Description

@yael-daum-secupi

Is there an existing issue for this?

  • I have searched the existing issues

Appium Version

3.2.2

Appium Host Type

Command Line

Current Behavior

handleMouseMoveAction crashes with "Unexpected end of JSON input" when buildGetElementRectCommand() returns empty for certain UIA elements

Affected: actions().contextClick(element) and actions().sendKeys(element, text) .
For certain SWT/Eclipse-based app elements buildGetElementRectCommand() returns an empty string, causing JSON.parse("") to throw uncaught, killing the Node.js process — it takes down the entire Appium server, not just the session.

Suggested fix: null/empty check on rectJson before JSON.parse

Expected Behavior

No crashes when there's a failure getting element rect

Appium Log

No response

Environment Details

I did not get these errors with NovaWindows driver v. 1.2.0 and Appium v. 3.1.2 or 3.2.0

Minimal Reproducible Example

https://gist.github.com/yael-daum-secupi/bf3707ad9bf919be0d3beb1d7067f0e3

Further Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions