Appium Enqueue Failure: Error getting main window

error is seen in appium console: When the app tries to access particular page, or else it works fine for other pages and able to launch the app. Every other single thing is working fine.

Its just for the page which interacts with mostly with server i get this error.

2019-06-24 10:32:27.637330+0800 WebDriverAgentRunner-Runner[30130:1069846] Enqueue Failure: Error getting main window -25216 /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 37 1

[Xcode] 2019-06-24 10:32:27.641059+0800 WebDriverAgentRunner-Runner[30130:1069846] Getting the snapshot timed out after 15 seconds

[Xcode] 2019-06-24 10:32:27.641266+0800 WebDriverAgentRunner-Runner[30130:1069846] Internal error: Error Domain=com.apple.dt.xctest.automation-support.error Code=8 “Error getting main window -25201” UserInfo={NSLocalizedDescription=Error getting main window -25201}

@Puttaparthi_Thejdeep You can use set “commandTimeouts” desired capability to increase the command response timeout. I was facing the same issue and resolved it by setting aforementioned desired capability.