Electron MacOS 15 Sequoia

I am currently having an issue with using @electron/remote module with the MacOS 15 which has not been update since January 2024.

I should really switch to using contextBridge or ipcRenderer.invoke. But if I do which I have tried it presents a problem for the build. You need to set parameters on the BrowserWindow to the following {nodeIntegration: true,contextIsolation : true}.

When you run the app you get an error after the isElectron flag is set to true and the next line throws a undefined reference to ‘require’ function where it loads in the jquery module.

I hope that makes sense, Electron for security obvisously would like developers to use the ipcRenderer or contextBridge to access os modules which is more secure and safer.

Your thoughts would be helpful.

Thank you.

Thanks - we’ll dig in to this to see what we can do.

What do I need to do to reproduce this?

AppStudio currently uses Electron 31.2. I see that Electron 32.1 has been released - we will update that in the next build.

set parameters on the BrowserWindow to the following {nodeIntegration: true,contextIsolation : true}.

 mainWindow = new BrowserWindow({
    width: width,
    height: height,
    title: '{title}',
    webPreferences: {nodeIntegration: true, contextIsolation : true}
  })

Thanks - I see the error here as well. We’ll do some more digging.

I’m running Sequoia here. The old way still works for me - what issues are you running into if you don’t change to @electron/remote?

It hangs at const { app } = require(‘@electron/remote’).app

In the old way, that line should read

const { app, BrowserWindow, Menu } = require('electron');

Thats correct in the electronMain.js…

In the project code in a form you only need the following right?

const { app } = require(‘@electron/remote’).app

I’m not sure where you got that from. It’s not in our docs or samples.

I’m trying to see what problem using @electron/remote solves with Electron apps made with AppStudio. We don’t use that library currently.

Well on all previous versions of MacOS that code works within the project I don’t use the other modules listed, however they are in the electronmain.js

It’s a difficult one to resolve as the anything that’s changed is the OS version.

Thank you for your help I will continue to investigate.

Let me know what happens. If you can, please try it the suggested way.

Hi
Just deleted the electron folder all working again…. Who knows what’s that all about … anyway all working

Thank you for your assistance

Thanks for the good news. Deleting the electron folder never hurts!