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
new warning in main: Not implemented reached in virtual bool base::PowerMonitorDeviceSource::IsOnBatteryPower #29614
Comments
Maybe related to #29291? |
Looks like this isn't implemented on Linux - we should probably either return false for Linux and update docs |
So there are at least two things going on here. One is that #26494 added public support for this function in Electron. 👍 on updating the docs to reflect that it's not supported on Linux. (It's already returning Second is that upstream is reaching this codepath on its own as of https://chromium-review.googlesource.com/c/chromium/src/+/2769179 (Merged Mar 25) which now ensures that IsOnBatteryPower() is called from PowerMonitor::Initialize(), which wasn't the case before. I added a tracer
Maybe this part should be reported upstream? If I'm reading this correctly, any debug Linux build of Chromium would also hit this error. |
As an aside, there exists a way to query this that should work on all our supported Linux platforms, even the very old releases.:
(Translated into pseudo-English: "Hello Linux, please ask org.freedesktop.UPower, which is on the system bus, the value of its OnBattery property".) I've confirmed this works on all the Linux platforms Electron supports (Debian 8, Ubuntu 14.04, Fedora 24): In each of these cases, the property returned So, I think we can implement this for at least ourselves. Chromium also supports openSUSE 13.3, which I haven't tried yet but II I'd expect the same results there. If so, maybe upstream would also be interested in a |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue. |
[2212055:0609/095801.855559:ERROR:power_monitor_device_source_stub.cc(11)] Not implemented reached in virtual bool base::PowerMonitorDeviceSource::IsOnBatteryPower()
The text was updated successfully, but these errors were encountered: