Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1769

QWebEngineCertificateError of PySide6 cannot work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 6.2.0, 6.2.1, 6.2.2
    • PySide
    • None
    • Windows
    • ec07828d77 (pyside/pyside-setup/dev) 31139d5acc (pyside/pyside-setup/6.2) ec07828d77 (pyside/tqtc-pyside-setup/tqtc/dev) 31139d5acc (pyside/pyside-setup/6.2.3)

    Description

      When visiting a site which certificate is invalid, QWebEnginePage will send a signal certificateError. The receiver function (self.certerror in the following example) can take a QWebEngineCertificateError instance, but when it tries to handle the instance with a command "defer()", "acceptCertificate()" or "rejectCertificate()" given in PySide6's class QWebEngineCertificateError, the program will crash and exit, and there is no error information in the terminal.

      You may reproduce the bug through Simple Browser Example with the following code.

      # The line of sending a signal is added to the end of the function.
      def __init__(self):
          ...
          self.webEngineView.page().certificateError.connect(self.certerror)
      
      # You may replace "error.acceptCertificate()" with another command "error.rejectCertificate()" or "error.defer()".
      def certerror(self, error):
          error.acceptCertificate()
      

      I tested PySide6's versions 6.2.2.1, 6.2.2, 6.2.1 and 6.2.0 on Windows and all of them have this bug. I didn't test earlier versions or Linux. However, the code works normally on PyQt6. Therefore, it seems that the bug is related to PySide6. Because a crash of the program occurs after running a command included in PySide6's class QWebEngineCertificateError, I report it as a bug related to QWebEngineCertificateError.

      Thanks for your reading and attention!

      Attachments

        For Gerrit Dashboard: PYSIDE-1769
        # Subject Branch Project Status CR V

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            old_beginner Y. Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes