首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >打开签名电子应用程序时获取代码签名无效

打开签名电子应用程序时获取代码签名无效
EN

Stack Overflow用户
提问于 2021-12-12 20:27:02
回答 1查看 1.4K关注 0票数 10

我已经处理这个问题将近两周了。当我在DMG文件中构建我的电子应用程序时,一切都很完美,但是当我尝试以pkg格式构建应用程序以上传到AppStore时,打开时会出现以下错误:

代码语言:javascript
复制
EXC_CRASH (SIGKILL (Code Signature Invalid))

完整的报告:(我不知道读这篇文章,但是你能告诉我这里有没有有用的东西吗?)

代码语言:javascript
复制
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: 672ED1C3-54FF-4FC5-A724-C9BBFA324FF7
CrashReporter Key:   CEADA8D8-D266-0222-B9C5-DB0AB2503CC1
Hardware Model:      MacBookPro17,1
Process:             Foo [29494]
Path:                /Applications/Foo.app/Contents/MacOS/Foo
Identifier:          com.domain.foo
Version:             1.1.4 (1.1.4)
Code Type:           X86-64 (Native)
Role:                Default
Parent Process:      launchd [1]
Coalition:           com.domain.foo [17341]

Date/Time:           2021-12-12 16:55:38.4248 -0300
Launch Time:         2021-12-12 16:55:38.3359 -0300
OS Version:          macOS 12.0.1 (21A559)
Release Type:        User
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL (Code Signature Invalid))
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: CODESIGNING 1 

Triggered by Thread:  0

Thread 0 Crashed:
0                                       0x7ff7ffce2a2c 0x7ff7ffcdf000 + 14892


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000000   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x0000000000000000   x9: 0x0000000000000000  x10: 0x0000000000000000  x11: 0x0000000000000000
   x12: 0x0000000000000000  x13: 0x0000000000000000  x14: 0x0000000000000000  x15: 0x0000000000000000
   x16: 0x0000000000000000  x17: 0x0000000000000000  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x0000000000000000  x21: 0x0000000000000000  x22: 0x0000000000000000  x23: 0x0000000000000000
   x24: 0x0000000000000000  x25: 0x0000000000000000  x26: 0x0000000000000000  x27: 0x0000000000000000
   x28: 0x0000000000000000   fp: 0x0000000000000000   lr: 0x0000000000000000
    sp: 0x000000030a078bb0   pc: 0x00007ff7ffce2a2c cpsr: 0x00000000
   far: 0x0000000000000000  esr: 0x00000000  Address size fault

Binary Images:
    0x7ff7ffcdf000 -     0x7ff7ffd0efff  (*) <9f5d65be-d8d0-3979-bb05-e651a67e785c> ???

Error Formulating Crash Report:
dyld_process_snapshot_get_shared_cache failed

EOF

-----------
Full Report
-----------

{"app_name":"domain","timestamp":"2021-12-12 16:55:38.00 -0300","app_version":"1.1.4","slice_uuid":"ab3cb5d1-eb3f-388f-8c63-416a00da1aaa","build_version":"1.1.4","platform":0,"bundleID":"com.domain.foo","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.0.1 (21A559)","incident_id":"672ED1C3-54FF-4FC5-A724-C9BBFA324FF7","name":"domain"}
{
  "uptime" : 190000,
  "procLaunch" : "2021-12-12 16:55:38.3359 -0300",
  "procRole" : "Default",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro17,1",
  "procStartAbsTime" : 4762359345462,
  "coalitionID" : 17341,
  "osVersion" : {
    "train" : "macOS 12.0.1",
    "build" : "21A559",
    "releaseType" : "User"
  },
  "captureTime" : "2021-12-12 16:55:38.4248 -0300",
  "incident" : "672ED1C3-54FF-4FC5-A724-C9BBFA324FF7",
  "bug_type" : "309",
  "pid" : 29494,
  "procExitAbsTime" : 4762361449260,
  "translated" : true,
  "cpuType" : "X86-64",
  "procName" : "domain",
  "procPath" : "\/Applications\/domain.app\/Contents\/MacOS\/domain",
  "bundleInfo" : {"CFBundleShortVersionString":"1.1.4","CFBundleVersion":"1.1.4","CFBundleIdentifier":"com.domain.foo"},
  "storeInfo" : {"deviceIdentifierForVendor":"9A6CD500-5E91-538F-B2B1-0E710ECC4FDF","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "com.domain.foo",
  "crashReporterKey" : "CEADA8D8-D266-0222-B9C5-DB0AB2503CC1",
  "wakeTime" : 3593,
  "sleepWakeUUID" : "1E5033D3-F82F-4C6E-B325-1B31313C3DBB",
  "sip" : "enabled",
  "isCorpse" : 1,
  "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGKILL (Code Signature Invalid)"},
  "termination" : {"namespace":"CODESIGNING","flags":66,"code":1},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":1348663,"threadState":{"x":[{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":0},"fp":{"value":0},"sp":{"value":13053168560},"esr":{"value":0,"description":" Address size fault"},"pc":{"value":140703125350956,"matchesCrashFrame":1},"far":{"value":0}},"frames":[{"imageOffset":14892,"imageIndex":0}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 140703125336064,
    "size" : 196608,
    "uuid" : "9f5d65be-d8d0-3979-bb05-e651a67e785c",
    "name" : ""
  }
],
  "vmSummary" : "ReadOnly portion of Libraries: Total=816K resident=0K(0%) swapped_out_or_unallocated=816K(100%)\nWritable regions: Total=21.0M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=21.0M(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nSTACK GUARD                       56.0M        1 \nStack                             8176K        1 \nVM_ALLOCATE                       13.0M        4 \n__DATA                              80K        3 \n__DATA_CONST                        48K        1 \n__LINKEDIT                         240K        4 \n__TEXT                             624K        2 \nmapped file                        5.9G       29 \n===========                     =======  ======= \nTOTAL                              6.0G       45 \n",
  "legacyInfo" : {
  "threadTriggered" : {

  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "607844aa04477260f58a8077",
      "factorPackIds" : {
        "SIRI_MORPHUN_ASSETS" : "6103050cbfe6dc472e1c982a"
      },
      "deploymentId" : 240000066
    },
    {
      "rolloutId" : "60da5e84ab0ca017dace9abf",
      "factorPackIds" : {

      },
      "deploymentId" : 240000008
    },
    {
      "rolloutId" : "601d9415f79519000ccd4b69",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "6194416dea7ed64a7812a429"
      },
      "deploymentId" : 240000322
    },
    {
      "rolloutId" : "5fc94383418129005b4e9ae0",
      "factorPackIds" : {

      },
      "deploymentId" : 240000174
    },
    {
      "rolloutId" : "602ad4dac86151000cf27e46",
      "factorPackIds" : {
        "SIRI_DICTATION_ASSETS" : "61ae8d06da72d16a4beb762e"
      },
      "deploymentId" : 240000290
    },
    {
      "rolloutId" : "5ffde50ce2aacd000d47a95f",
      "factorPackIds" : {

      },
      "deploymentId" : 240000081
    }
  ],
  "experiments" : [

  ]
},
  "reportNotes" : [
  "dyld_process_snapshot_get_shared_cache failed"
]
}

Model: MacBookPro17,1, BootROM 7429.41.5, proc 8:4:4 processors, 8 GB, SMC 
Graphics: Apple M1, Apple M1, Built-In
Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online
Memory Module: LPDDR4
AirPort: Wi-Fi, wl0: Sep 13 2021 21:06:59 version 18.20.310.14.7.8.119 FWID 01-9d72ee4a
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.

package.json

代码语言:javascript
复制
{
    "name": "domain",
    "version": "1.1.4",
    "description": "",
    "main": "main.js",
    "scripts": {
      "start": "electron ./",
      "start:prod": "set NODE_ENV=prod&& electron ./",
      "start:sbx": "set NODE_ENV=sbx&& electron ./",
      "rebuild": "electron-rebuild -f -w",
      "pack": "electron-builder --dir",
      "clean:dist": "rimraf dist",
      "clean:win": "rimraf windows_installer",
      "build:win": "npm run clean:win&& npm run dist&& node build_installer.js",
      "postinstall": "electron-builder install-app-deps",
      "dist": "npm run clean:dist&& electron-builder",
      "dist:prod": "set NODE_ENV=prod&& npm run dist",
      "create-installer-mac": "electron-installer-dmg ./dist/mac/domain.app domain --overwrite --background=./resources/background.png --icon=./resources/icons/domain.icns --out=./dist/mac/"
    },
    "build": {
      "appId": "com.domain.foo",
      "asar": true,
      "cscLink": "build/all-certs.p12",
      "cscKeyPassword": "mypassword",
      "asarUnpack": [
        "build",
        "resources"
      ],
      "mac": {
        "target": "mas"
      },
      "mas": {
        "type": "distribution",
        "category": "public.app-category.productivity",
        "entitlements": "build/entitlements.mas.plist"
      },
      "linux": {
        "target": [
          "AppImage",
          "deb"
        ]
      },
      "win": {
        "target": "nsis",
        "icon": "build/icon.ico"
      },
      "nsis": {
        "deleteAppDataOnUninstall": true,
        "oneClick": false
      }
    },
    "author": "domain <info@domain.com>",
    "keywords": [],
    "devDependencies": {
      "appdmg": "^0.6.0",
      "electron": "^13.5.1",
      "electron-builder": "^22.11.7",
      "electron-installer-dmg": "^3.0.0",
      "electron-packager": "^15.2.0",
      "electron-rebuild": "^1.11.0",
      "electron-wix-msi": "^3.2.0",
      "exe-icon-extractor": "^1.0.8"
    },
    "dependencies": {
      "auto-launch": "^5.0.5",
      "axios": "^0.24.0",
      "chokidar": "^3.4.3",
      "electron-log": "^4.3.4",
      "form-data": "^3.0.0",
      "graceful-fs": "^4.2.6",
      "jwt-decode": "^2.2.0",
      "keytar": "^7.4.0",
      "lodash": "^4.17.21",
      "moment": "^2.29.1",
      "nedb": "^1.8.0",
      "nedb-promises": "^4.1.0",
      "os-locale": "^5.0.0",
      "rimraf": "^3.0.2",
      "user-home": "^2.0.0"
    }
  }

entitlements.mas.plist

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<string>teamid.com.domain.foo</string>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
</dict>
</plist>

我用npm run dist来建造

如果我运行打开-a foo.app,就会得到:

代码语言:javascript
复制
-------------------------------------

翻译报告(下文报告全文)

事件标识符:759B0A7D-D47E-4B91-A 628-E86E95B44C05 CrashReporter键:CEADA8D8-D 266-0222-B9C5-DB0AB2503CC1硬件型号: MacBookPro17,1进程: MyApp 3889路径:MyApp标识符: com.foo.app版本: 1.1.10 (1.1.10)代码类型: X86-64 (原生)角色:默认父进程: launchd 1联合: com.foo.app 1296

发布日期/时间: 2022-01-04 22:14:57.5140 -0400发布时间: 2022-01-04 22:14:57.0231 -0400操作系统版本: macOS 12.0.1 (21A559)发布类型:用户报告版本: 104

异常类型: EXC_CRASH (代码签名无效)异常代码:0x00000000000000,0x0000000000000000异常注: EXC_CORPSE_NOTIFY终止原因: CODESIGNING 1

线程突出显示:0

回溯路径不可用

没有可用的线程状态(寄存器信息)

二进制图像:不可用的二进制图像描述

编写崩溃报告时出错: dyld_process_info_create失败6 dyld_process_snapshot_get_shared_cache未能创建CSSymbolicatorRef身体仍然有效的¯_(ツ)/¯

EOF

完整报告

{"app_name":"Foo",“时间戳”:“2022-01-04 22:14:59.00-0400”,"app_version":"1.1.10","build_version":"1.1.10","platform":0,"bundleID":"com.foo.app","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.0.1 (21A 559)“,"procLaunch”}{“Foo”}{ "uptime“:13000,”procLaunch“:"2022-01-04 22:14:57.0231 -0400","procRole”:“默认”,“版本”:2,"userID“:501,"deployVersion”:210,"modelCode“:"MacBookPro17,1","procStartAbsTime”:317693807800,"coalitionID“:1296,"osVersion”:{“火车”:"macOS 12.0.1","build“:"21A559","releaseType”:"User“},"captureTime”:"2022-01-04 22:14:57.5140 -0400",“事故”:"759B0A7D-D47E-4B91-A628-E86E95B44C05","bug_type“:"309","pid“:3889,"procExitAbsTime”:317703364649,“procExitAbsTime”:true,"cpuType“:"X86-64","procName”:"Foo","procPath“:bundleInfo:{"CFBundleShortVersionString":"1.1.10","CFBundleVersion":"1.1.10","CFBundleIdentifier":"com.foo.app"},“{"deviceIdentifierForVendor":"9A6CD500-5E91-538F-B2B1-0E710ECC4FDF",”:thirdParty:true},"parentProc“:"launchd","parentPid”:1,"coalitionName“:"com.foo.app","crashReporterKey”:“CEADA8D8-D 266-0222-B9C5-DB0AB2503CC1”,"wakeTime“:160,"sleepWakeUUID”:"FAF63016-AF61-41CB-AEA8-1FF7BED9295E","sip“:”启用“,"isCorpse”:1,“例外”:{“代码”:“0x0000000000000000,0x00000000000000”,"rawCodes":0,0,“键入”:“EXC_CRASH”,“信号”:“SIGKILL(代码签名无效)”},“终止”:{“命名空间”:“CODESIGNING”,“标志”:66,“代码”:1},"extMods“:{”调用者“:{”thread_create“:0,"thread_set_state":0,"task_for_pid":0},“系统”:{“thread_create”:0,"thread_set_state":0,"task_for_pid":0},“目标”:{“thread_create”:0,"thread_set_state":0,"task_for_pid":0},“警告”:0 },"legacyInfo“:{ "threadHighlighted”:0},"trialInfo“:{”部署“:[{ "rolloutId”:“607844a04477260f58a8077”,"factorPackIds“:{ "SIRI_MORPHUN_ASSETS”:"6103050cbfe6dc472e1c982a“},"deploymentId”:240000066 },{ "rolloutId“:"60da5e84ab0ca017dace9abf","factorPackIds”:{

代码语言:javascript
复制
  },
  "deploymentId" : 240000008
},
{
  "rolloutId" : "602ad4dac86151000cf27e46",
  "factorPackIds" : {
    "SIRI_DICTATION_ASSETS" : "61ae8d06da72d16a4beb762e"
  },
  "deploymentId" : 240000290
},
{
  "rolloutId" : "5ffde50ce2aacd000d47a95f",
  "factorPackIds" : {

  },
  "deploymentId" : 240000090
},
{
  "rolloutId" : "601d9415f79519000ccd4b69",
  "factorPackIds" : {
    "SIRI_TEXT_TO_SPEECH" : "61c0d3122be4e338e11ae9e1"
  },
  "deploymentId" : 240000357
},
{
  "rolloutId" : "5fc94383418129005b4e9ae0",
  "factorPackIds" : {

  },
  "deploymentId" : 240000196
}

],“实验”:[

},"reportNotes“:"_dyld_process_info_create with with 6","dyld_process_snapshot_get_shared_cache failed","Failed -with仍然有效的¯_(ツ)/¯_”}

型号:MacBookPro17.1,BootROM 7429.41.5,proc 8:4:4处理器,8 GB,SMC图形: Apple M1,Apple M1,内置显示:彩色液晶显示,2560 x 1600 Retina,Main,MirrorOff,在线内存模块: LPDDR4 AirPort: Wi,wl0: 9ep 2021 :06:59版本18.310.14.7.8.119 FWID 01-9d72ee4a蓝牙:版本(null),0服务,0设备,0串口网络服务:Wi,AirPort,en0 USB设备: USB31Bus USB设备: USB31Bus Thunderbolt : MacBook Pro,苹果公司雷电巴士: MacBook专业,苹果公司。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-07-29 21:38:38

终于找到了解决办法!但不完全确定是哪一个。

我所做的,是从quick-start创建官方文件,然后按照这一个这样的DMG电子构建,最后以这个回购为例来说明应享权利和mas设置。

之后,为快速启动应用程序,我复制所有的真正的工程和它的工作!

所以证书是好的,我不知道问题在哪里,但它是有效的!

顺便说一句:我想感谢@wojtek322 322所有的支持和每天的反馈和答案!有个人帮我真是太棒了!

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70327436

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档