Skip to content

Signing QWebEngine for macOS notarization #6612

@hakan-77

Description

@hakan-77

When QT QWebEngine is used, the created .app structure for macOS includes folders under .app/Contents/MacOS/PyQt5/Qt5/lib/* and these do not seem to be properly signed. Trying to sign later with --deep OR signing files individually doesn't work, giving the below error. This prevents macOS notarization.

./dist/simple_web.app: embedded framework contains modified or invalid version
In subcomponent: /Users/hakan/pkgtestweb/dist/simple_web.app/Contents/MacOS/PyQt5/Qt5/lib/QtGui.framework

How to reproduce the issue: Create the below QT app.

from PyQt5.QtCore import QUrl
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEnginePage
from PyQt5.QtWidgets import QApplication

import sys

app = QApplication(sys.argv)

web_view = QWebEngineView()
page = QWebEnginePage(web_view)
web_view.setPage(page)
web_url = "https://github.com"
web_view.setUrl(QUrl(web_url))
web_view.show()

app.exec()

If not signed during .app build, sign later using --deep. And then verify using the below. This will give the error without the need to notarize.

codesign --verify --verbose --strict ./dist/simple_web.app

Thanks for the amazing tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions