Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR:permission_manager_qt.cpp(82) Unsupported permission type: 13

I am working on python code (PyQt 5.13) with built-in browser functionality.

import sys
from PyQt5.QtCore    import *
from PyQt5.QtGui     import *
from PyQt5.QtWidgets import *
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineProfile, QWebEnginePage


class MainWindow(QMainWindow):
    def __init__(self, *args, **kwargs):
        super(MainWindow, self).__init__(*args, **kwargs)

        self.webview = QWebEngineView()
        webpage = QWebEnginePage(self.webview)

        self.useragent = QWebEngineProfile(self.webview)

        agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246"
        self.useragent.defaultProfile().setHttpUserAgent(agent)

        self.webview.setPage(webpage)
        self.webview.setUrl(QUrl("http://whoer.net/"))

        self.setCentralWidget(self.webview)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    w = MainWindow()
    w.show()
    sys.exit(app.exec_())   

All works fine but some content are not loading and on the same time, cmd gives error

[10900:16264:0831/013730.858:ERROR:permission_manager_qt.cpp(82)] NOT IMPLEMENTEDUnsupported permission type: 13
[10900:16264:0831/013730.859:ERROR:permission_manager_qt.cpp(82)] NOT IMPLEMENTEDUnsupported permission type: 13
[10900:16264:0831/013733.144:ERROR:permission_manager_qt.cpp(82)] NOT IMPLEMENTEDUnsupported permission type: 13
[10900:16264:0831/013733.144:ERROR:permission_manager_qt.cpp(82)] NOT IMPLEMENTEDUnsupported permission type: 13
[10900:16264:0831/013737.063:ERROR:permission_manager_qt.cpp(82)] NOT IMPLEMENTEDUnsupported permission type: 13
[10900:16264:0831/013737.064:ERROR:permission_manager_qt.cpp(82)] NOT IMPLEMENTEDUnsupported permission type: 13
[10900:16264:0831/013753.618:ERROR:permission_manager_qt.cpp(82)] NOT IMPLEMENTEDUnsupported permission type: 13
[10900:16264:0831/013951.389:ERROR:permission_manager_qt.cpp(82)] NOT IMPLEMENTEDUnsupported permission type: 13

What's the problem ? I try to run cmd as an administrator but the error remais same. How can i assign permission to the code or that file (permission_manager_qt.cpp) to work fine.

like image 874
Asad Seeker Avatar asked Feb 02 '26 09:02

Asad Seeker


1 Answers

TL; DR; There is no way to handle these permissions since QtWebEngine has disabled that possibility.


The problem has nothing to do with program execution permissions.

Qt WebEngine is written on the basis of chromium so the Qt developers do not currently implement all the functionalities but will add more functionalities little by little. In this case, the permissions available by chromium are:

enum class PermissionType {
  MIDI_SYSEX = 1,
  // PUSH_MESSAGING = 2,
  NOTIFICATIONS = 3,
  GEOLOCATION = 4,
  PROTECTED_MEDIA_IDENTIFIER = 5,
  MIDI = 6,
  DURABLE_STORAGE = 7,
  AUDIO_CAPTURE = 8,
  VIDEO_CAPTURE = 9,
  BACKGROUND_SYNC = 10,
  FLASH = 11,
  SENSORS = 12,
  ACCESSIBILITY_EVENTS = 13,
  CLIPBOARD_READ = 14,
  CLIPBOARD_WRITE = 15,
  PAYMENT_HANDLER = 16,
  BACKGROUND_FETCH = 17,
  IDLE_DETECTION = 18,
  PERIODIC_BACKGROUND_SYNC = 19,
  WAKE_LOCK_SCREEN = 20,
  WAKE_LOCK_SYSTEM = 21,

  // Always keep this at the end.
  NUM,
};

But in the case of Qt WebEngine does not handle all cases:

ProfileAdapter::PermissionType toQt(content::PermissionType type)
{
    switch (type) {
    case content::PermissionType::GEOLOCATION:
        return ProfileAdapter::GeolocationPermission;
    case content::PermissionType::AUDIO_CAPTURE:
        return ProfileAdapter::AudioCapturePermission;
    case content::PermissionType::VIDEO_CAPTURE:
        return ProfileAdapter::VideoCapturePermission;
    case content::PermissionType::FLASH:
    case content::PermissionType::NOTIFICATIONS:
    case content::PermissionType::MIDI_SYSEX:
    case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER:
    case content::PermissionType::MIDI:
    case content::PermissionType::DURABLE_STORAGE:
    case content::PermissionType::BACKGROUND_SYNC:
    case content::PermissionType::SENSORS:
    case content::PermissionType::ACCESSIBILITY_EVENTS:
        break;
    case content::PermissionType::CLIPBOARD_READ:
        return ProfileAdapter::ClipboardRead;
    case content::PermissionType::CLIPBOARD_WRITE:
        return ProfileAdapter::ClipboardWrite;
    case content::PermissionType::PAYMENT_HANDLER:
    case content::PermissionType::NUM:
        break;
    }
    return ProfileAdapter::UnsupportedPermission;
}

For example in your case the warning message:

... NOT IMPLEMENTEDUnsupported permission type: 13

It follows that the PermissionType::ACCESSIBILITY_EVENTS permission is required, but according to the QtWebEngine logic return a ProfileAdapter::UnsupportedPermission which is what the warning message indicates.

Conclusion:

  • There is no way to solve from your side since it is a Qt/chromium warning, besides it is not an error it is only indicating that you do not have that permission.
like image 169
eyllanesc Avatar answered Feb 05 '26 01:02

eyllanesc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!