electron / electron/electron

[Bug]: 2nd call to showMessageBox() fails if it's immediately after 1st call

Open
#33,796 12 comments 0 reactions 0 assignees View on GitHub
25-x-y 27-x-y bug :beetle: has-repro-gist platform/windows status/confirmed
Dominant language
C++
Stars
123k
Forks
17.5k
Avg merge
14h 28m
Merged PRs (30d)
870

Description

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

18.0.4

### What operating system are you using?

Windows

### Operating System Version

Windows 10 version 21H2

### What arch are you using?

x64

### Last Known Working Electron version

Unknown

### Expected Behavior

Calling `showMessageBox()` twice should generate 2 dialog boxes.

### Actual Behavior

If you call `showMessageBox()` twice (essentially at the same time; I think the calls have to be in the same moment of the main process event loop) the 2nd call fails to work.

Note this only happens the first time you do it. Subsequent calls work correctly.

### Testcase Gist URL

https://github.com/rooklift/electron_dialog_test

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.