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

162
Visualizações
Tauri JS API dialog and notification modules not doing anything, returning null

I am familiarizing myself with the tauri framework currently by developing a small desktop app. Most of the tauri JS API modules I have been testing have worked so far, except for the dialog and notification modules. When any of the functions from the dialog module are tested, for example open, the promise immediately resolves with a null value, and nothing on the tauri end noticeably occurs (for example, when the open function is called, a file dialog should appear). I haven't altered the generated Rust files at all, and I am using a VueJS SPA on the frontend, which I have been running in a 64-bit Windows 10 environment. Additionally, the tauri.conf.json file has the correct permissions set for the use of these modules.

This is the code where I call the dialog.open function:

import { Options, Vue } from "vue-class-component";
import { open as openDialog } from "@tauri-apps/api/dialog";

@Options({
  components: {
    ... some vue components ...
  },
})
export default class Freeze extends Vue {
  selectedFilepaths: string[] = [];

  async selectFile(){
    const pathName: string = await openDialog({
      defaultPath: ".",
      multiple: false
    }) as string;
    this.selectedFilepaths.push(pathName);
  }
}

Any help would be much appreciated :)

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Turns out, the culprit was defaultPath field.

You have to provide a valid path there (or not use it at all), otherwise it will fail silently.

about 4 years ago · Juan Pablo Isaza Relatório
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