Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

338
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda