Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

337
Views
Electron .loadURL ERROR RR_FILE_NOT_FOUND (-6) Trying to open a local file or directory in new browserwindow

I'm trying to open a local file or directory in a new electron window as chrome does. the new window open with nothing to show:

PDT I'm using Linux and VSCode new window open

and show this error: error

the code from the script who launch the window:

    function shell(path){
    console.log(path);
    createWindow = () => {
        nombre=tittle(path);
       const fileWin = new remote.BrowserWindow({
            width: 800,
            height: 600,
            title: nombre,
            resizable: true,
            show: true,
            webPreferences: {
                plugins: true, 
                contextIsolation: false,
                nodeIntegration: true,
                enableRemoteModule: true,
                webSecurity: false 
            }
        });  
       
        remote.require("@electron/remote/main").enable(fileWin.webContents);
        fileWin.setMenu(null);
        fileWin.setIcon('src/assets/img/logo-FC.png');
        fileWin.loadURL('file://'+path); 
        fileWin.show(); 

    }
    
    createWindow();

  }

the variable path is for diferent locations of files or directorys the case of the error examples is:

/home/aromero/Documentos/3225 DOSSIER Julio/0. GENERAL/0.1 Calibración de equipos/HMV

if I put the link with the 'file://' in front in the chrome browser, that display what i want. chrome explorer

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!