'Electron's dialog has "GtkDialog mapped without a transient parent. This is discouraged." warning on Ubuntu

Research online says I need to pass the parent to the dialog to prevent this message from showing up. But passing my mainWindow (from main.js) doesn't fix this.

This warning interrupts the flow of my app, for reasons I won't get into. Mainly, I am desperately in need of a way to get rid of this message. Alternatively, an other option other thank Electron's dialog to show message windows, as well as open and save dialogs.



Solution 1:[1]

I found the answer here: https://github.com/electron/electron/issues/12423

It looks like there is a way to use <input> instead of dialog. Per BATMAH69's repsonse this should do:

<input type="file" style="display:none" />

I haven't tried it myself yet but at least now we know it's an electron issue. In the same thread above it claims updating electron should also resolve it. Hope it helps!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Emily