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/ 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 Code=8 “Error getting main window -25201” UserInfo={NSLocalizedDescription=Error getting main window -25201}