-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
37.3.0
What operating system(s) are you using?
macOS
Operating System Version
Sequoia 15.6
What arch are you using?
x64
Last Known Working Electron version
No response
Does the issue also appear in Chromium / Google Chrome?
I don't know how to test
Expected Behavior
Using Electron's net
module, calling net.isOnline()
or net.online
within a module that's running as a utility process should reflect the actual state of the host device.
Actual Behavior
When I've disconnected wifi on the device and call net.isOnline()
from within the utility process module, the result is true
.
Testcase Gist URL
https://gist.github.com/achou11/159165d915505372f1450177757e9aa8
Additional Information
The gist shows the disparity between what can be determined within different processes i.e. renderer vs main vs utility. The renderer uses the NetworkInformation API while the main and utility processes use Electron's net
module
When running the reproduction while disconnect from wifi, you'll noticed that the renderer and main log the expected results, whereas the utility process logs an unexpected result.