Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

339
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda