atul-g / plasma-power-monitor

A KDE Plasma widget to monitor the power consumption of your battery.
GNU General Public License v2.0
28 stars 12 forks source link

Widget floods the journalctl every <poll interval> with 'plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.' #7

Open Ulugbeg opened 1 year ago

Ulugbeg commented 1 year ago

Relevant system info:

Operating System: Arch Linux KDE Plasma Version: 5.27.1 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8

Every time the widget polls (as specified by the polling interval), I get the above error message added to my journalctl:

Feb 22 20:21:01 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:01 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:02 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:02 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:03 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:03 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:04 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:04 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:05 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:05 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:06 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:06 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:07 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:07 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:08 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:08 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:09 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.
Feb 22 20:21:09 archlaptop plasmashell[2882]: XMLHttpRequest: Using GET on a local file is dangerous and will be disabled by default in a future Qt version.Set QML_XHR_ALLOW_FILE_READ to 1 if you wish to continue using this feature.

This is probably not great for my NVME drive :)

I have disabled the widget for the time being, although I really REALLY like it :)

Steps to reproduce:

  1. Add the widget to, I assume a recent version of, KDE
  2. Take note of the interval
  3. Run journalctl
  4. scroll to the bottom
  5. Observe the many entries

My journal goes back to Jan 17th, and then it already had those entries. So I don't know with which KDE version this started.

Of the 1428804 lines present in my journalctl output, a huge majority of them is this message.

mirenradia commented 1 year ago

I also have this problem. From a quick search, it looks like QML on its own doesn't support accessing local files except using XMLHttpRequests so for the moment, I've just added

QML_XHR_ALLOW_FILE_READ=1

to my /etc/environment file to stop these warnings flooding the systemd journal.