Appium 1.6, ruby, android - error in finding element via xpath

(Created gist to keep issue concise. Please refer to following: https://gist.github.com/sohaib-apadmi/44a59fbb04bac0361563ad3ae152db74)

Since upgrading to appium 1.6, I have faced a number of issues. One such issue is the following: when using android the tests start to run, it sees that it’s on the login screen, manages to find its way to login and then even login. The problem occurs after that when it is looking for elements to check if it is on the homepage but fails. The terminal throws up (1) in the gist above.

The appium log which is relevant from when this occurs is seen at (2) in the gist above.

Finally the code I use to find elements is seen under (3) in the gist above.

To provide some flow: when you open the app you see a splash screen, you click on the sign in, put in your details and then are taken to home screen. The context switches from NATIVE_APP on the splash screen, to WEBVIEW on the login screen, back to NATIVE_APP on the home screen (not sure if this is relevant but providing info anyway) and to clarify, these tests worked perfectly fine on appium 1.5.3. Thanks in advance :slight_smile: