Unable to determine element locating strategy for -android uiautomator

I have a method which works perfectly locally, but when I launch it on server I’ve got an error:

org.openqa.selenium.InvalidArgumentException: Unable to determine element locating strategy for -android uiautomator

Method is scrolling view till element with text I need:

public void tapOnElementByIdAndText(String resourceId, String visibleText) {
        driver.findElementByAndroidUIAutomator(
                "new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().resourceId(\"" + resourceId + "\").text(\"" + visibleText + "\").instance(0))").click();
        hideKeyboard();
    }

How can I make it work or any other smooth solution for scrolling screen?

Maybe try to replace with:
findElement(MobileBy.AndroidUIAutomator ?

Tried, the result is same

And both have same appium server version?
Remote and your machine.

Yes both are the same

@Aleksei sorry for misinformation, local appium version is 1.21, servers 1.22