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

Flash Failed reported on successful flash due to screensaver error #4161

Open
phillipremaker opened this issue Jan 8, 2024 · 8 comments
Open

Comments

@phillipremaker
Copy link

  • Etcher version: 1.8.11
  • Operating system and architecture: Windows 11 x64
  • Image flashed: raspbx-04-04-2018.img (and other raspbx images)
  • What do you think should have happened: No error report on successful flash
  • What happened: Error reported on successful flash
  • Do you see any meaningful error information in the DevTools?

Flash reported as failed despite success on two different Windows 11 machines

Error

gui.js:37 Error: Error invoking remote method 'enable-screensaver': No handler registered for 'enable-screensaver'
at o.invoke (node:electron/js2c/renderer_init:57:526)

@lurch
Copy link
Contributor

lurch commented Jan 9, 2024

@phillipremaker
Copy link
Author

Thanks, @lurch! Should I mark as duplicate? Is there a master case for this? Is it recognized as an issue?

@lurch
Copy link
Contributor

lurch commented Jan 9, 2024

@phillipremaker I don't know, I don't work on Etcher.

@aethernet
Copy link
Contributor

The enable-screensaver error is unrelated to what you describe.

Your problem might come from not being able to unmount the disks at the end of the process, hard to tell.

@phillipremaker
Copy link
Author

Thanks @aethernet! Any suggestions of how to do a diagnostic around that? I can't tell why the code has decided the flash process had failed.

@aethernet
Copy link
Contributor

I got the same issue yesterday on one of my test flash, but I don't have a solid reproduction yet

I'm suspecting it has to do with the OS mounting the drive before the checks are done, but idk yet how to confirm.

@phillipremaker
Copy link
Author

phillipremaker commented Jan 29, 2024

@zvin Can I ask you to look at this? This problem seems to correspond to the electron.ipcRenderer.send changing to electron.ipcRenderer.invoke for the enable-screensave and disable-screensaver calls in #3882.

Windows 11 does not handle these calls correctly, and it seems that the error from these calls mistakenly triggers a Flash Failed for ALL Flash attempts with Windows 11 and Etcher.

I'm not sure what the best fix is.

  1. Roll back Fixing call to electron block screensaver methods invocation #3882
  2. Have ipcRenderer apporpriately disable Windows 11 screensaver.
  3. Have ipcRendered recognize that it can't control Windows 11 screensaver and suppress the error
  4. Have the error process recognize that an error from the screensaver is not a flash failure.

Not knowing the architecture of the system, I don't know what the fix is. But as it stands now, a lot of people using Etcher on Windows 11 get a flash failed error even when it is successful.

Cc: @builder555 who approved the original patch. Can't seem to tag the original patch author.

@phillipremaker
Copy link
Author

More details: Fails on the PCI flash on the motherboard, works on a USB-C reader. So the issue seems to be related to the flash hardware, possibly the unmount. The screensaver error is superfluous, as @aethernet noted. Will do some more tests.

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

No branches or pull requests

3 participants