"No such window: window was already closed error" while automating hybrid app

Firstly, I am trying to test the app which have native and webview so its simply hybrid app. Plus my app also have implemented “react” in it. I used context changing and all those stuffs and tried to click or type text on specific element on the web view. But i get the error like no such window bla bla bla …
I used context changing and logs also print the context names and all but when it goes to the webview from native view it loads and does nothing and gives error.

In addition to it , in my app there is webview at the beginning after i click log in it goes to webview. There everythng works fine and then again it goes native view and there too elements finding is working well but after that when there is another webview and i try to click element it gives no such window error.

Can someone give me any idea dealing with these things ?

Many Thanks