StaleElementReferenceException in iOS real device


#1

Hi,
I am using Appium to automate test pages on iOS real device. I am clicking “Add address” button in my workflow which opens a pop-up window and asks the users to fill address related info. But on this page, I am not able to access any element. I went through the similar issues on google and put wait of more than 100 seconds but still elements are not accessible and throwing the same StaleElementReferenceException error.
I tried to refresh the page but then also I am getting the same error.
Appium logs:
[RemoteDebugger] Received WebKit data: ‘{“result”:{“result”:{“type”:“object”,“objectId”:"{“injectedScriptId”:1,“id”:1}",“className”:“k”,“description”:“StaleElementReferenceError: Element does not exist in cache”},“wasThrown”:true},"i…’
[MJSONWP] Encountered internal error running command: Error: StaleElementReferenceError: Element does not exist in cache
[MJSONWP] at WebKitRpcClient.receive (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-remote-debugger/lib/webkit-rpc-client.js:139:25)
[MJSONWP] at WebSocket.emit (events.js:182:13)
[MJSONWP] at Receiver.receiverOnMessage (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/ws/lib/websocket.js:719:20)
[MJSONWP] at Receiver.emit (events.js:182:13)
[MJSONWP] at Receiver.dataMessage (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/ws/lib/receiver.js:414:14)
[MJSONWP] at Receiver.getData (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/ws/lib/receiver.js:346:17)
[MJSONWP] at Receiver.startLoop (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/ws/lib/receiver.js:133:22)
[MJSONWP] at Receiver._write (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/ws/lib/receiver.js:69:10)
[MJSONWP] at doWrite (_stream_writable.js:410:12)
[MJSONWP] at writeOrBuffer (_stream_writable.js:394:5)
[MJSONWP] at Receiver.Writable.write (_stream_writable.js:294:11)
[MJSONWP] at Socket.socketOnData (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/ws/lib/websocket.js:794:35)
[MJSONWP] at Socket.emit (events.js:182:13)
[MJSONWP] at addChunk (_stream_readable.js:279:12)
[MJSONWP] at readableAddChunk (_stream_readable.js:264:11)
[MJSONWP] at Socket.Readable.push (_stream_readable.js:219:10)
[MJSONWP] at TCP.onread (net.js:636:20)

I have same automation running on desktop browsers(Chrome, firefox and IE) and android browsers (chrome) and not facing any such exception.
When I am doing driver.getPageSource then also test is failing with same error.