Mobile Element casted WebDriverException thrown by wait.until(ExpectedConditions.elementToBeClickable(by))

org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {ELEMENT=B85B3F26-5A30-4180-A78A-E6D5D99A7B1B}
[testng] Build info: version: ‘2.48.2’, revision: ‘41bccdd’, time: ‘2015-10-09 19:59:12’
[testng] System info: host: ‘Divya-K.local’, ip: ‘192.168.1.19’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.13.1’, java.version: ‘1.8.0_101’
[testng] Driver info: driver.version: IOSDriver
[testng] at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:360)
[testng] at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:62)
[testng] at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
[testng] at io.appium.java_client.ios.IOSDriver.findElement(IOSDriver.java:1)
[testng] at org.openqa.selenium.remote.RemoteWebDriver.findElementByName(RemoteWebDriver.java:451)
[testng] at io.appium.java_client.DefaultGenericMobileDriver.findElementByName(DefaultGenericMobileDriver.java:110)
[testng] at io.appium.java_client.AppiumDriver.findElementByName(AppiumDriver.java:1)
[testng] at io.appium.java_client.ios.IOSDriver.findElementByName(IOSDriver.java:1)
[testng] at org.openqa.selenium.By$ByName.findElement(By.java:303)
[testng] at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:345)
[testng] at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:58)
[testng] at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
[testng] at io.appium.java_client.ios.IOSDriver.findElement(IOSDriver.java:1)
[testng] at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:911)
[testng] at org.openqa.selenium.support.ui.ExpectedConditions.access$0(ExpectedConditions.java:909)
[testng] at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:205)
[testng] at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:1)
[testng] at org.openqa.selenium.support.ui.ExpectedConditions$22.apply(ExpectedConditions.java:661)
[testng] at org.openqa.selenium.support.ui.ExpectedConditions$22.apply(ExpectedConditions.java:1)
[testng] at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:238)
[testng] at com.zenoti.automation.mobile.ios.core.WaitUntil.waitForMobileElementToBeClickable(WaitUntil.java:115)
[testng] at com.zenoti.automation.core.Actions.tapOnElementBy(Actions.java:130)
[testng] at com.zenoti.automation.mpos.therapist.pages.LoginPage.Configure_Test_Environment(LoginPage.java:104)
[testng] at com.zenoti.automation.mpos.therapist.tests.BaseTest.select_testing_env(BaseTest.java:114)
[testng] at com.zenoti.automation.mpos.therapist.tests.BaseTest.beforeTest(BaseTest.java:78)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[testng] at java.lang.reflect.Method.invoke(Method.java:498)
[testng] at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
[testng] at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:510)
[testng] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:211)
[testng] at org.testng.internal.Invoker.invokeMethod(Invoker.java:585)
[testng] at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
[testng] at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
[testng] at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
[testng] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
[testng] at org.testng.TestRunner.privateRun(TestRunner.java:773)
[testng] at org.testng.TestRunner.run(TestRunner.java:623)
[testng] at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
[testng] at org.testng.SuiteRunner.access$000(SuiteRunner.java:39)
[testng] at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:391)
[testng] at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
[testng] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[testng] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[testng] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[testng] at java.lang.Thread.run(Thread.java:745)
[testng] Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to org.openqa.selenium.WebElement
[testng] at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:358)
[testng] … 46 more

Can someone please help me on this

I’m having same issue. Could you please help me if you find solution.