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

161
Views
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 answers
Answer question

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 Report
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!