responsively-app icon indicating copy to clipboard operation
responsively-app copied to clipboard

Error pop-up is shown while loading this website

Open manojVivek opened this issue 1 year ago • 3 comments

When https://muvu.com.co is loading into responsively, it shows the following error message but loads the preview fine after that.

image

manojVivek avatar Jul 21 '23 05:07 manojVivek

please provide more details

Pankaj-Surya avatar Aug 14 '23 14:08 Pankaj-Surya

@Pankaj-Surya This is a bug report from a user and this is all the information we have, and it is reproduceable. So, we need to find why this is happening for this URL.

manojVivek avatar Aug 15 '23 07:08 manojVivek

I took a quick look at this and it seems like this is a problem with webview. I'm not sure exactly what's causing it though. Maybe the website'siframe tag? Don't know. But If you copy https://muvu.com.co/ and paste it into the src tag of one of the device's <webview> tags, the error pops up.

I cloned this repo, which is just a simpler Electron application for creating webviews. I wanted to test BrowserView vs webview. If you change the src attr of the webview tag in index.html to https://muvu.com.co/, the same error pops.

But then if in main.js, if I comment out option 1, and comment in option 3:

// Option 1: Uses Webtag and load a custom html file with external content
 //mainWindow.loadFile("index.html");
 //mainWindow.loadURL(`file://${__dirname}/index.html`);

 // Option 2: Load directly an URL if you don't need interface customization
 //mainWindow.loadURL("https://github.com");

 // Option 3: Uses BrowserView to load an URL
 const view = require("./src/view");
 view.createBrowserView(mainWindow);

 // Display Dev Tools
 //mainWindow.openDevTools();

Then in view.js, I set it to load the website:

view.webContents.loadURL("https://muvu.com.co/")

and run the app, no error appears.

I'm not very experienced with Electron, but it seems like rewriting this application to use BrowserView would be quite the undertaking.

lyncasterc avatar Sep 17 '23 22:09 lyncasterc