Weird File Permissions Access Error on Ubuntu with Electron

Viewed 15

I am developing an Electron App for my company that I would like to run cross-platform. I am developing it primarily on the Mac, but I am spot checking building it on Windows and Linux from time to time. I am getting this weird error on Ubuntu where it can't access my HTML file when on Mac it can access it just fine.

Here's the Error I'm Getting.

npm start

> Wave@0.0.1 start
> electron-forge start

✔ Checking your system
✔ Locating Application
✔ Preparing native dependencies
✔ Launching Application
Node Version: 16.15.0
Electron Version: undefined
[6440:0913/095706.998672:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
There are 0 curves already loaded.
[6459:0913/095707.252762:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
(node:6406) electron: Failed to load URL: file:///home/xkenneth/Work/wave2/wave/WaveWindow/waveWindow.html with error: ERR_FILE_NOT_FOUND
(Use `electron --trace-warnings ...` to show where the warning was created)

I am referencing the file the same way and it works on Mac and Windows, but not Ubuntu. This used to work when my renderer HTML file was in the root of the project, but now it's a couple sub-levels down, maybe that has something to do with it?

Here's the code that creates the window and loads the HTML.

const win = new BrowserWindow({
        width: 800,
        height: 600,
        webPreferences: {
            preload: path.join(__dirname, './wave/preload.js'),
            nodeIntegration: true,
            contextIsolation: true,
        },
        //title: "Wave",
    })

    win.loadFile(path.join(__dirname,'./wave/WaveWindow/waveWindow.html'))
0 Answers
Related