WebDriverWait not waiting


I seem to be facing issues in the fact that WebDriverWait doesn’t seem to be waiting for the specified time. On a PC the wait works fine and correctly throws a NoSuchElement exception, on Android via Appium it gets to the particular line of code and immediately throws ‘org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {message=no such element: Unable to locate element: {“method”:“id selector”,“selector”:“someID”}’

Here is how I have set things up …

From BaseClass
protected static WebDriver driver;
driver = new AndroidDriver<>(builder, caps);

From Tests
WebDriverWait wait2 = new WebDriverWait(driver, 30);

Element in pageObject
@FindBy(id = “someID”)
public WebElement madeUpElement;

Thanks in advance.

can you try adding implicity wait

ImplicitWait works in the sense that it is waiting for the specified time, still throws the same error though.

Though I would prefer to use ExpectedConditions.

Did you manage get ExpectedConditions to work?
I currently workaround using ExpectedConditions.visibilityOfElementLocated
but converting WebElement to By… locator seems very hacky solution.