Need help with webview!

I am creating an app that uses a webview for our webapp (built with rails and react). We use freshchat within that application, and im running into two issues. When i render the app within a webview tag i get this console error Uncaught TypeError: Cannot read property 'appendChild' of null. And when I put the url in the loadUrl in my main.js it will immediately open a new window (instead of overlaying on top of the document like it should).

This functionality works in our web app so i thought it would work here. Not sure why its not

Same error happening here with freshchat, running in through electron will make it open a popup instead of the chat, and the chat itself doesn’t even work in the popup.