Giter VIP home page Giter VIP logo

Comments (9)

jjeff avatar jjeff commented on June 2, 2024 1

FWIW, I think enableRemoteModule: true is not needed.

It doesn't look like electron-progressbar uses electron.remote functionality (which is deprecated anyway).

from electron-progressbar.

kzimny avatar kzimny commented on June 2, 2024

I have the same issue. @lalanankit : do you build your app with webpack v4 or v5?

from electron-progressbar.

lalanankit avatar lalanankit commented on June 2, 2024

from electron-progressbar.

kzimny avatar kzimny commented on June 2, 2024

How do you compile your solution for production? With webpack? The issue on my side is since I changed the version of webpack from v4 to v5. Thx.

from electron-progressbar.

lalanankit avatar lalanankit commented on June 2, 2024

from electron-progressbar.

gnudeep avatar gnudeep commented on June 2, 2024

I also face the same issue.

npm: '7.9.0'
node: '15.12.0'
[email protected]

from electron-progressbar.

kzimny avatar kzimny commented on June 2, 2024

For Electron version 12 and above when creating BrowserWindow additional settings are required:

contextIsolation: false, 
enableRemoteModule: true,
new BrowserWindow({
	width: 500, 
	height: 170,
	webPreferences: {
		nodeIntegration: true,
		contextIsolation: false,
		enableRemoteModule: true,
	}
});

from electron-progressbar.

lalanankit avatar lalanankit commented on June 2, 2024

Adding the additional lines has solved the issue. Thank you @kzimny
The snipped of full code for the object-

progressBar = new ProgressBar({
        text: 'Preparing data...',
        detail: 'Wait...',
        text: 'Fetching your details',
        browserWindow: {
            parent: window,
            modal: true,
            resizable: false,
            closable: false,
            minimizable: false,
            maximizable: false,
            width: 500,
            icon: path.join(__dirname, 'public/icon/favicon.ico'),
            height: 170,
            webPreferences: {
                nodeIntegration: true,
                contextIsolation: false,
                enableRemoteModule: true
            },
        },
    });

image

from electron-progressbar.

AndersonMamede avatar AndersonMamede commented on June 2, 2024

Hey guys, electron-progressbar v2.0.1 has just been released with a patch to fix this issue (contextIsolation now defaults to false). Thanks a lot! :)

from electron-progressbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.