在Mac OS X控制台中,“代码签名:cs_invalid_page”是什么意思?

问题描述

环境:

Python 3.7 Mac OSX Catalina 10.15

我正在尝试使用PyInstaller在MyApp.app捆绑包中编译我的python程序。 Qfter在“首选项/实用工具/ ...”中创建了我的证书。 我使用以下命令对位于dist / MyApp.app文件夹中的所有文件进行代码签名:

sudo codesign -s --force --verify --verbose --sign "MyApp" <filename>

当我验证MyApp的签名时,没有看到任何错误消息:

gauthierbtz@MacBook-de-Gauthier PhoneBot_0002_FINAL % codesign -dv --verbose=4 dist/MyApp.app 


Executable=/Users/gauthierbtz/DropBox/cff/Python/MyApp_0002_FINAL/dist/MyApp.app/Contents/MacOS/MyApp
Identifier=com.cff.MyApp
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20100 size=66145 flags=0x2(adhoc) hashes=2062+3 location=embedded
VersionPlatform=1
VersionMin=657152
VersionSDK=658176
Hash type=sha256 size=32
CandidateCDHash sha1=c0a9293479828446ca8fb13ace98b53ce08e8b424
CandidateCDHashFull sha1=c0a92738230446ca8fb13ace98b53ce08e8b424
CandidateCDHash sha256=a3820c8978939cd214c9e88d3b5bfee5c864f9
CandidateCDHashFull sha256=a3820c84f0f1d4fcd214c9e88d3b5b69689698689570e06f085f07e4f858e04
Hash choices=sha1,sha256
CMSDigest=70027c444a2378876611fe0f689689689102906da8bcfb2bb619f21eeda01c
CMSDigestType=2
Page size=4096
CDHash=a3820c84f0f1d4fcd21hjkhsdkshkdbfee5c864f9
Signature=adhoc
Info.plist entries=8
TeamIdentifier=not set
Sealed Resources version=2 rules=13 files=1754
Internal requirements count=0 size=12
gauthierbtz@MacBook-de-Gauthier MyApp_0002_FINAL % codesign -dv dist/MyApp.app 
Executable=/Users/gauthierbtz/DropBox/cff/Python/MyApp_0002_FINAL/dist/MyApp.app/Contents/MacOS/MyApp
Identifier=com.cff.MyApp
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20100 size=66145 flags=0x2(adhoc) hashes=2062+3 location=embedded
Signature=adhoc
Info.plist entries=8
TeamIdentifier=not set
Sealed Resources version=2 rules=13 files=1754
Internal requirements count=0 size=12
gauthierbtz@MacBook-de-Gauthier MyApp_0002_FINAL % codesign -v dist/MyApp.app 
gauthierbtz@MacBook-de-Gauthier MyApp_0002_FINAL % spctl -a -vv dist/MyApp.app
dist/MyApp.app: accepted
override=security disabled
origin=MyApp

即使我再次对我的应用进行代码签名以确保ti被签名,我也会得到以下输出

dist/MyApp.app: is already signed

当我运行可执行文件时,一切都很好,我的软件正在运行。

但是当我使用命令执行应用程序文件夹时:

open dist/MyApp.app

我在控制台中收到以下错误消息:

LSOpenURLsWithRole() Failed with error -10810 for the file /Users/gauthierbtz/DropBox/cff/Python/MyApp_0002_FINAL/dist/MyApp.app.

因此,我随后检查了Mac OS X控制台,并看到以下行:

CODE SIGNING: cs_invalid_page(0x110655000): p=63883[MyApp] final status 0x22000000,allowing (remove VALID) page

有人可以向我解释这怎么可能吗?编码告诉我一切都很好,但是当我运行我的应用程序时,它表示未签名!?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...