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

156
Views
Electron window crashing on ubuntu 18, 20 for showOpenDialogSync or showOpenDialog

Electron (version 7.x) window crashing on ubuntu 18, 20 for showOpenDialogSync or showOpenDialog Below is my code

directorySelection = e => {
        const { onCustomPathUpdate } = this.props;
        const remote = window.require('electron').remote;
        const openDialog = remote.dialog.showOpenDialogSync || remote.dialog.showOpenDialog;
        var directory = openDialog({
            properties: ['openDirectory']
        });

        if (directory && directory.length) {
            onCustomPathUpdate(directory[0]);
        }
    };

<button onClick={this.directorySelection} type="button">Browse</button>

I am hosting React(16.8.4) application in Electron(7.x) window. I am using the above code for opening file explorer of ubuntu and it is crashing the application. Can anyone help to get it fixed?

The above code is working fine with Ubuntu version 16.

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!