isDisplayed() sometimes returns false after explicit wait

Hi

I came across a weird issue and wanted to understand why it would happened. Basically, isDisplayed() here will return false sometimes and true sometimes

WebDriverWait wait = new WebDriverWait(driver, 20);
wait.until(ExpectedCondition.visibilityOfElementLocated(By.id(“someID”))).isDisplayed();

TMK, visibilityOfElementLocated uses element.isDisplayed() and will only return an element if visible; so, I’m not sure why calling isDisplayed() on the returned element again will return false sometimes.

Log below.

Any insights will be greatly appreciated! Thank you ~

debug] [35m[WD Proxy][39m Proxying [POST /element] to [POST http://127.0.0.1:8100/session/3236157A-6D14-4629-9ABC-CEF08F7DDABB/element] with body: {“using”:“name”,“value”:“testview-testnumber”}[debug] [35m[WD Proxy][39m Got response with status 200: {“value”:{“ELEMENT”:“C8000000-0000-0000-EE28-000000000000”,“element-6066-11e4-a52e-4f735466cecf”:“C8000000-0000-0000-EE28-000000000000”},“sessionId”:“3236157A-6D14-4629-9ABC-CEF08F7DDABB”}

[debug] [35m[W3C (3d2ceadb)][39m Responding to client with driver.findElement() result: {“element-6066-11e4-a52e-4f735466cecf”:“C8000000-0000-0000-EE28-000000000000”,“ELEMENT”:“C8000000-0000-0000-EE28-000000000000”}

[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session/3d2ceadb-21eb-467f-bdad-448419181c1e/element [39m[32m200[39m [90m818 ms - 137[39m

[info] [35m[HTTP][39m [90m[39m

[info] [35m[HTTP][39m [37m–>[39m [37mGET[39m [37m/wd/hub/session/3d2ceadb-21eb-467f-bdad-448419181c1e/element/C8000000-0000-0000-EE28-000000000000/displayed[39m

[info] [35m[HTTP][39m [90m{}[39m

[info] [35m[W3C (3d2ceadb)][39m Driver proxy active, passing request on via HTTP proxy

[debug] [35m[XCUITest][39m Executing command ‘proxyReqRes’

[debug] [35m[WD Proxy][39m Matched ‘/wd/hub/session/3d2ceadb-21eb-467f-bdad-448419181c1e/element/C8000000-0000-0000-EE28-000000000000/displayed’ to command name ‘elementDisplayed’

[debug] [35m[WD Proxy][39m Proxying [GET /wd/hub/session/3d2ceadb-21eb-467f-bdad-448419181c1e/element/C8000000-0000-0000-EE28-000000000000/displayed] to [GET http://127.0.0.1:8100/session/3236157A-6D14-4629-9ABC-CEF08F7DDABB/element/C8000000-0000-0000-EE28-000000000000/displayed] with body: {}[debug] [35m[WD Proxy][39m Got response with status 200: {

[debug] [35m[WD Proxy][39m “value” : true,

[debug] [35m[WD Proxy][39m “sessionId” : “3236157A-6D14-4629-9ABC-CEF08F7DDABB”

[debug] [35m[WD Proxy][39m }

[info] [35m[WD Proxy][39m Replacing sessionId 3236157A-6D14-4629-9ABC-CEF08F7DDABB with 3d2ceadb-21eb-467f-bdad-448419181c1e

[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/3d2ceadb-21eb-467f-bdad-448419181c1e/element/C8000000-0000-0000-EE28-000000000000/displayed [39m[32m200[39m [90m492 ms - 65[39m

[info] [35m[HTTP][39m [90m[39m

[info] [35m[HTTP][39m [37m–>[39m [37mGET[39m [37m/wd/hub/session/3d2ceadb-21eb-467f-bdad-448419181c1e/element/C8000000-0000-0000-EE28-000000000000/displayed[39m

[info] [35m[HTTP][39m [90m{}[39m

[info] [35m[W3C (3d2ceadb)][39m Driver proxy active, passing request on via HTTP proxy

[debug] [35m[XCUITest][39m Executing command ‘proxyReqRes’

[debug] [35m[WD Proxy][39m Matched ‘/wd/hub/session/3d2ceadb-21eb-467f-bdad-448419181c1e/element/C8000000-0000-0000-EE28-000000000000/displayed’ to command name ‘elementDisplayed’

[debug] [35m[WD Proxy][39m Proxying [GET /wd/hub/session/3d2ceadb-21eb-467f-bdad-448419181c1e/element/C8000000-0000-0000-EE28-000000000000/displayed] to [GET http://127.0.0.1:8100/session/3236157A-6D14-4629-9ABC-CEF08F7DDABB/element/C8000000-0000-0000-EE28-000000000000/displayed] with body: {}[debug] [35m[WD Proxy][39m Got response with status 200: {

[debug] [35m[WD Proxy][39m “value” : false,

[debug] [35m[WD Proxy][39m “sessionId” : “3236157A-6D14-4629-9ABC-CEF08F7DDABB”

[debug] [35m[WD Proxy][39m }​

Build info:
iOS
Java-client 7.3.0
Appium Desktop 1.17.1