Android webview

hi guys, sorry for my bad English

i have problem with switching context to webview on android, i use node.js for automating
my switching context like:
driver.contexts().then(function (contexts){ return driver.context(contexts[1]); });
the log sometime will show Available contexts: ["NATIVE_APP"] or Available contexts: ["NATIVE_APP","WEBVIEW_com.xxxxx.xxxx", ""]

and this is my capabilities:

`'appium-version': '1.6.3',`
`platformName: 'Android',`
`platformVersion: '4.4.4',`
`deviceName: '123456ABCDEF',`
`appPackage: 'com.xxxxx.xxxx',`
`appActivity: '',`
`app: '/Users/xxxx/Desktop/xx.apk'`

why the WEBVIEW_com.xxxxx.xxxx context sometime disappear ? is there something wrong on my capabilities ?
or there is an issue if i use XPath to find elements ?

also sometimes appium can run on webview and sometimes not, what’s wrong?

thanks, Firman