Android 6.x Webview undefined when switching context

I am trying to automate mobile app in android (6.0.1) using appium. i am getting error as

No such context found.

While switching from Native to Webview,I am getting Webview as

WEBVIEW_undefined

Please help.Thanks in advance