Skip to content

No RemoteDescriptor registered for ViewAssertion #680

@andrefrsousa

Description

@andrefrsousa

Describe the bug
When using KScreen and UiScreen in the same test, switching back to KScreen after interacting with a UiScreen triggers an exception:

java.lang.IllegalArgumentException: No RemoteDescriptor registered for ViewAssertion: com.kaspersky.kaspresso.proxy.ViewAssertionProxy@XXXXXXX

This issue arises in multi-process testing environments where UiAutomator or EspressoRemote is involved. The ViewAssertionProxy registration seems to be lost after switching between processes.

To Reproduce
Steps to reproduce the behavior:

  1. Use KScreen to interact with a screen in the main app process.
  2. Switch to a UiScreen (using UiAutomator) in a separate process (e.g., an SDK or service).
  3. Switch back to KScreen to interact with a view in the original app process.
  4. Attempt to interact with views in the original process and observe the No RemoteDescriptor registered exception.

Expected behavior
The test should switch seamlessly between processes, and KScreen should be able to interact with views in the main app process after switching back from UiScreen.

Smartphone (please complete the following information):

  • Device: Android Emulator. Pixel 6 PRO
  • Version: API 35
  • Kaspresso version: 1.5.4
  • Espresso version: 3.6.1
  • UIAutomator version: 2.2.0

Additional context

  • Neither waitForIdleSync() nor IdlingRegistry resolves the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions