Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dialog crashes electron when changing accepted extension #13097

Closed
thiagorova opened this issue May 28, 2018 · 7 comments
Closed

dialog crashes electron when changing accepted extension #13097

thiagorova opened this issue May 28, 2018 · 7 comments

Comments

@thiagorova
Copy link

thiagorova commented May 28, 2018

First of all, thanks for this amazing tool. You guys rock!

this might have something to do with #13048
If there is something else, I couldn't find it...
as for the Issue:

  • Electron Version: 2.0.0
  • Operating System (Platform and Version): MacOs Sierra
  • Last known working Electron version: not sure

Expected Behavior
Once I open the Electron dialog, all files, except are grayed except for the selected extension. If I want to change the extension, ill go to the selection box under the files and change it. It should change the selectable files from the file list.

Actual behavior
I'm using a dialog inside the renderer code. I'm limiting the accepted extension in the openFile action and giving the user the choice of changing it. As soon as I change the extension, Electron freezes for a couple seconds and the closes, no error message given.

To Reproduce
It happened to me every single time (I hope I'm not making a mistake...). Just copy the code in the renderer part of electron (I didn't test in the main code) and try to change the accepted extension

Code:

const { remote } = require('electron'),
    dialog = remote.dialog;
dialog.showOpenDialog(remote.getCurrentWindow(), {
      properties: ['openFile',],
      title: "Please select your audio file",
      filters: [
        { name: 'All files', extensions: ['mp3', 'wav', 'flac'] },
      ]}, () => {})

Test: I tried it on a "clean" electron (this one: [electron-quick-start]). You can either just copy this into renderer.js or clone this repo: electron error and follow the same steps as for electron-quick-start:

git clone https://github.com/thiagorova/electron-bug
cd electron-bug
npm i
npm start

if you guys need anything else, please tell me

PS: not sure if this is relevant, but when the dialog opened (before the crash), this was printed in the console:

objc[7922]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fff9cf95c90) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x1146ebcd8). One of the two will be used. Which one is undefined.

@welcome
Copy link

welcome bot commented May 28, 2018

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@kimumetal
Copy link

I tried to reproduce this bug, but I could not.
Do you mean that you change the file's extension by changing the file's name on the dialog?
I tried it on macOS High Sierra(10.13.4) and I could not rename the grey-colored file(with txt extension). The OS' behavior has been changed, I guess.
I think this is OS-side to deal with it, not on the electron side.

@thiagorova
Copy link
Author

thiagorova commented Jun 10, 2018

Hi.
I attached these images to help. After opening the dialog (first image), I changed the accepted extension (second image). After a while, the app closes and an error message appears (3rd image)
I tried it today, and the error persisted in my computer.

bildschirmfoto 2018-06-10 um 12 23 53 pm

with arrow

bildschirmfoto 2018-06-10 um 12 24 30 pm

@kimumetal
Copy link

Thank you for additional explanation. I could not find the format select list on the dialog...
I could reproduce it on my environment too with your extra explanation.
I think #13048 is somewhat different issue, because it is not reproduced on macOS on #13048 case.
Also I could not reproduce this issue in Ubuntu 16.04.

I will check out on the debug build of electron and check out the callstack.

@AdrianoFerrari
Copy link

I had a similar issue, and upgrading to 2.0.1 or later fixed it:
#12737

@thiagorova
Copy link
Author

Hi! thanks for the warning.
I can't test this today, but as soon as I verify this, I'll get back to confirm it!

@thiagorova
Copy link
Author

Hi again!
thanks for the heads up, @AdrianoFerrari. I can indeed confirm that it is working now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants