Closed runofthemillgeek closed 3 years ago
From my understanding you're currently trying to build this for local development and eventually for shipping to the MAS? Let's try the following configuration and see if it works?
mas.plist
<?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>
<array>
<string>B4X*******.to.go.osx</string>
</array>
<key>com.apple.application-identifier</key>
<string>B4X*******.to.go.osx</string>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
</dict>
</plist>
mas.inherit.plist
<?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.inherit</key>
<true/>
</dict>
</plist>
After getting the app to run locally, we can tackle the submission issue together.
Also I managed to reproduce the original issue...
The mistake here is that the personal team ID is used instead of the project team ID in the entitlements file... But I don't think I see that in your case?
Some additional context—the forge is configured only for mas
right now and produces the following outputs:
╰─ ls out --tree --level=2 ─╯
out
├── Flock-mas-x64
│ ├── Flock.app
│ ├── LICENSE
│ ├── LICENSES.chromium.html
│ └── version
└── make
└── Flock-0.0.0.pkg
I've tried running the .app directly as well as install the .pkg signed with 3P Installer as stated here (am I doing this right so far?).
I've run the installed app and got the same termination reason.
Also I managed to reproduce the original issue...
The mistake here is that the personal team ID is used instead of the project team ID in the entitlements file... But I don't think I see that in your case?
Don't think so. The Mac Developer one and the Installer certs are pulled out directly from our org's developer account. Double checked in keychain as well.
Running these presently on:
macOS Catalina 10.15.4 Xcode 11.4, Build version 11E146
@sangeeth96 😂 uhm... Make sure to replace the B4X*******
with your actual team id. I had it redacted because it is somewhat sensitive info. See if it works with the corrected team id in the entitlements file?
Also, let's not flatten and install the app for now (unless that already comes together electron-forge
) . I'm not sure if that will do some changes to the app bundle itself. The app should run immediately after code signing.
^ Sorry that's my mistake... (the buttons are close to each other)
@sethlu Ha, my bad. 🙈I thought it was fine to show them off since I could see Team IDs of other electron apps installed via codesign
🤔. Anyway, I've replaced the placeholders with the correct team ID, removed the pkg step and ran it again. But I'm still getting the same crash. Just to be sure, I created a new Mac Developer certificate and installed it on my machine.
If it's of interest, I ran spctl
on on the login helper and that says "rejected". I'm not sure about using spctl
at this stage though.
$ spctl -a -vvv "Contents/Library/LoginItems/Flock Login Helper.app
Contents/Library/LoginItems/Flock Login Helper.app: rejected
origin=Mac Developer: Flock Desktop (N5X7372Q4D)
Yea, it's fine if the app bundle doesn't pass the gatekeeper because it's not signed with the Developer ID identity or by Apple.
I'm wondering why the crash log is reporting the app at /Applications/Flock.app/Contents/MacOS/Flock
🤔 Can you try launching the app from the electron-forge
output directory and see if the same crash log appears?
Yea, it's fine if the app bundle doesn't pass the gatekeeper because it's not signed with the Developer ID identity or by Apple.
I'm wondering why the crash log is reporting the app at
/Applications/Flock.app/Contents/MacOS/Flock
🤔 Can you try launching the app from theelectron-forge
output directory and see if the same crash log appears?
I moved it there since launching from output directory is crashing just the same.
@sethlu One more thing, I've tried versions of Electron from the latest beta to 8 and 7 most recent versions. They were all giving me the same error.
For the main application we're building, the DMG gets signed and notarized end-to-end and works fine when opened. Only the MAS is having trouble. The crash dump there is pretty much similar to the ones I posted above.
I'm quite puzzled as to why this is happening for even the most basic Electron apps.
After experimenting with the codesigning utilities a bit, I think that error code is just something generic and it's only coming up for me when ElectronTeamID
is not present in the Info.plist
file. And I don't think electron-forge
updates the Info.plist
for you after packaging... and that may be the reason behind the crashing.
I'm wondering why you opted for pre-auto-entitlements: false
in the configuration? 🤔 If you put it to true, electron-osx-sign
should take care of the Info.plist
update in the app bundle for you. Wanna give that a try?
Somewhat unrelated but interesting notes on Electron 7.1.8
com.apple.developer.team-identifier
key is present in the entitlements file...
ElectronTeamID
is present in Info.plist
... The app only runs if the Mac Developer certificate and the device are included in the provisioning profile, or we observe an exception EXC_CRASH (Code Signature Invalid)
.ElectronTeamID
isn't present in Info.plist
, the app always crashes with ThreadPoolSingleThreadForegroundBlocking0
at launch (all with different call stack at crash) -- but none of the crash log resembles your casecom.apple.developer.team-identifier
isn't present in the entitlements file...
ElectronTeamID
is present in Info.plist
, the app always runs -- it doesn't even care if the signing certificate or the device isn't included in the embedded provisioning profile 😂 ElectronTeamID
isn't present in Info.plist
, the app always crashes with ThreadPoolSingleThreadForegroundBlocking0
at launch (all with different call stack at crash) -- but none of the crash log resembles your case@sethlu I put the option in there after going through https://github.com/electron-userland/electron-builder/issues/897#issuecomment-487414713 where you mentioned to opt for this (if building for MAS and want to test it) and manually include the identifier in the entitlements file.
I will try again by placing it back in. One other doubt regarding Info.plist
files—is it required to make these updates in the helper apps as well? 🤔 If so, does osx-sign do that?
Another request I have is that if you have a working boilerplate setup for getting this codesigned the right way, would love it if you could share it so that I can check it out and see if it works on my end as well.
I gave electron-builder
another shot. Also made sure to re-download the certs and provisioning profile for development.
The builder config:
appId: to.go.osx
productName: Flock
asar: false
forceCodeSigning: false
files: [
'src/',
'node_modules/'
]
mac:
target: [ dir ]
icon: build-assets/mac.icns
helperBundleId: to.go.osx.helper
type: development
identity: null
mas:
entitlements: build-assets/entitlements/mas.plist
entitlementsInherit: build-assets/entitlements/mas.inherit.plist
gatekeeperAssess: false
hardenedRuntime: false
type: development
identity: null
With electron-builder
, I run into a problem from the get-go: while packaging, the Info.plist
files are in binary format. I used plutil
and fd
to manually convert all the Info.plist
files (except for framework inside the Frameworks
folder) and then ran electron-osx-sign
manually with the following parameters:
npx electron-osx-sign \
--gatekeeper-assess=true \
--hardened-runtime=false \
--type=development \
--platform=mas \
--entitlements="build-assets/entitlements/mas.plist" \
--entitlements-inherit="build-assets/entitlements/mas.inherit.plist" \
"$APP_PATH"
I did this because of the binary problem and it seems like builder uses a vendored version of this repo. I disabled signing within builder itself. I've reduced the entitlements to the following:
mas.plist
:
<?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/>
</dict>
</plist>
mas.inherit.plist
:
<?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.inherit</key>
<true/>
</dict>
</plist>
With these, I get the app to start. But, as soon as it tries to create a window, one slowly appears with a white screen and crashes thereafter. The logs from the app:
App is ready...
(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false". It will change to be "true" in Electron 9. For more information please check https://github.com/electron/electron/issues/18397
[22347:0407/035451.679249:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 1 time(s)
[22347:0407/035452.278112:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 2 time(s)
[22347:0407/035452.875021:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 3 time(s)
[22347:0407/035453.518995:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 4 time(s)
[22347:0407/035454.023976:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 5 time(s)
[22347:0407/035454.524735:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 6 time(s)
[22347:0407/035454.921325:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 7 time(s)
[22347:0407/035456.667848:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 8 time(s)
[22347:0407/035457.167236:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 9 time(s)
[22347:0407/035457.167317:FATAL:gpu_data_manager_impl_private.cc(1034)] The display compositor is frequently crashing. Goodbye.
[1] 22347 trace trap ./dist/mac/Flock.app/Contents/MacOS/Flock --enable-logging
Crash report here: crash-report.zip
So, this seems to point to the Helper (GPU) app. I did try signing that app alone with different sorts of entitlements but none seem to be helping.
I did one more thing based on comments from https://github.com/electron/electron/issues/19626, which is to try with --no-sandbox
option... and it worked! Window appears, stays on, content gets displayed. But this doesn't seem like a solution since this flag shouldn't be passed for MAS builds, right? Or is it fine to keep this off?
@sangeeth96 having the same issue. All entitlements are in some strange bplist
format.
Running codesign -d --entitlements :- "build/App.app"
confirms this.
@greenimpala Beat me to posting that. We got our app to pass the MAS crash! 🎉 mas-dev
build also works perfectly.
So, here's what seems to be happening: electron-builder
is generating Info.plist
files in binary format (the bplist
thingy). I don't see an option to change this. It uses app-builder
to make the .app package and looking at this line indicates it is encoding in binary format all the time.
If you check the Apple document related to resolving notarization issues (link here), it is stated that the entitlements file should be in XML format which made me go and dig into the .app package and apply the same reasoning for Info.plist
files as well. Also, latest electron-osx-sign
threw an error about this while testing which made me positive about this. Lastly, I dug into Messenger and Slack packages after installing from App store to verify these.
So, what I did is to let electron-builder
run its course and package/sign for mas
and mas-dev
targets. Then I ran the following script:
#! /bin/bash
plutil -convert xml1 "$DIST_DIR/Flock.app/Contents/Frameworks/Flock Helper (GPU).app/Contents/Info.plist"
plutil -convert xml1 "$DIST_DIR/Flock.app/Contents/Frameworks/Flock Helper (Plugin).app/Contents/Info.plist"
plutil -convert xml1 "$DIST_DIR/Flock.app/Contents/Frameworks/Flock Helper (Renderer).app/Contents/Info.plist"
plutil -convert xml1 "$DIST_DIR/Flock.app/Contents/Frameworks/Flock Helper.app/Contents/Info.plist"
plutil -convert xml1 "$DIST_DIR/Flock.app/Contents/Info.plist"
This will convert all necessary Info.plist
files to XML format. Thereafter, I re-signed with the latest electron-osx-sign
as follows:
#!/bin/bash
APP_PATH="$DIST_DIR/Flock.app"
BUILD_TYPE="${BUILD_TYPE:-distribution}"
sign_mas_dev () {
npx electron-osx-sign \
--gatekeeper-assess=true \
--hardened-runtime=false \
--type="$BUILD_TYPE" \
--platform=mas \
--entitlements="build/entitlements.mas.plist" \
"$APP_PATH"
};
sign_mas_dev
Set values for DIST_DIR
and BUILD_TYPE
appropriately. Change build/entitlements.mas.plist
to the location of your main entitlements file. The default child entitlements are perfect (don't change them unless you know what you're doing).
Related Notes:
Mac Developer:
, 3rd Party Mac Developer:
and 3rd Party Mac Installer:
certificates for building mas
and mas-dev
targets in your build machine.mas-dev
build.I'll go ahead and raise an issue in the app-builder
repo. Also, I hope electron-builder
uses the latest electron-osx-sign
instead of their vendored version.
CC @sethlu
I don't understand why during runtime, when the app crashes and we get crash logs, the errors are all cryptic and not pointing straight to the source of the problem—which seems to be the incorrectly encoded plist
files. I get errors from the Helper GPU which I posted in the crash logs above and they are all cryptic.
@sangeeth96 +1 for the detailed instructions :) I now get a launch with mas-dev but an immediate crash (possibly something now with my configuration / app). Will report back.
Update: I had a call to app.requestSingleInstanceLock()
which is not allowed on MAS. The app is now running sandbox. @sangeeth96 thank you once again 🎉. Let's hope this gets merged back into electron-builder
.
@sangeeth96 thanks for your step by step post. You are right, electron-builder
is generating Info.plist
files in binary format. I tried your tricks with XML conversion, it convert well the files. I tried to sign again the work done by electron-builder
in the mas/ folder with electron-osx-sign
but not luck for me... I'm still getting an Error type message from the crashlogs -> EXC_CRASH (Code Signature Invalid)
(my certs and provisioning profiles are well up to date).
I made this try using the electron-quick-start setup so I don't think it can be a problem from my app configuration such as @greenimpala.
Any ideas/advises would be welcome guys.
Also, I'm a bit confused about the next step of electron-osx-sign
to get a PKG. Let's say the signature worked well and I could open my signed app without any crash on y Mac. We are suppose to send/upload PKG files to the AppStoreConnect. How do convert your file.app into a file.pkg?
I'm confused because I know only electron-builder
(which I use since a year now) and the PKG file is automatically built during signing process for mas
. What about electron-osx-sign
? How do you proceed?
Thanks!
@Faksprod electron-osx-sign
only does the codesigning bit. However, there is a historical tool that comes with electron-osx-sign
called electron-osx-flat
that may still work (I haven't tested it for a while). And it works like this...
electron-osx-flat path/to/my.app
Similar to electron-osx-sign
, it should discover your signing identity automatically.
However, if you're looking for fancier app flattening tools, I think other folks here will have more up-to-date information 😄
@sethlu 👍 Thanks a lot for clarifications! I finally gave a shot back to electron-builder
this last 4 days and found a way for fixing the issue (.app and .pkg crash) encountered here. I made a step by step answer (if it can helps someone) -> Building + Signing MAS .app and .pkg files (no crash at launch + App Store validation).
Hi @Faksprod,
Thank you for posting the details. I have the exact same problem, app crashed right after signing.
I have followed your guide, and apply to electron-quick-start as well the app is not crashing after signing anymore.
But now I got a new problem: notarization failed with: "The binary is not signed with a valid Developer ID certificate." "The signature does not include a secure timestamp." "The executable does not have the hardened runtime enabled."
I checked my code signing identity:
security find-identity -vp codesigning
1) 2C08AE6CF116F447B8DF03D92E3BAA7E23584D99 "3rd Party Mac Developer Application: Company Inc. (2xxxxxxx7)"
2) 0DCB7585F33E750EB6EB25BB9A54589A4555C550 "Apple Development: (7xxxxxxx5)"
3) 192830ABACE0EF54A8C342B8904458B92840FAC6 "Developer ID Application: OptiSigns Inc. (2xxxxxxxx7)"
4) A698C769F1D65A16D925C08454C662226B2157AB "Apple Development: email@email.com (8xxxxxxxH)"
5) E8A537A6CB8332A2B26CD1834F1734E2FE3BFF82 "Apple Distribution: Company Inc. (2xxxxxxxx7)"
6) 192830ABACE0EF5EA8C342B8904458B92840FAC6 "Developer ID Application: Company Inc. (2xxxxxxx7)"
6 valid identities found
It seems like missing something. The : 3rd Party Mac Developer Installer. But it is in my key chain. (see my key chain screenshot).
I also created a simple app with Xcode and use Xcode for signing with these certificates and it went through notarization and App Store upload OK.
Here's my build config for mac and mas:
"mac": {
"target": [
"mas"
]
},
"mas": {
"type": "distribution",
"category": "public.app-category.productivity",
"hardenedRuntime": true,
"gatekeeperAssess": true,
"provisioningProfile": "embedded.provisionprofile",
"entitlements": "build/entitlements.mas.plist",
"entitlementsInherit": "build/entitlements.mas.inherit.plist"
I also tried to add to "mac" these config:
"type": "distribution",
"hardenedRuntime": true,
"gatekeeperAssess": false,
But it seems doesn't matter. Any help would be much appreciated!
Full log from apple notarize:
{ "logFormatVersion": 1, "jobId": "c3f06e18-6520-4605-a058-5bdbf55123fb", "status": "Invalid", "statusSummary": "Archive contains critical validation errors", "statusCode": 4000, "archiveFilename": "Electron_Quick_Start-mac_store.pkg", "uploadDate": "2020-05-08T15:10:37Z", "sha256": "a0c686f2c2f1ffe10cdc5752786969daa8978f4a6c826f5d2848f8aa66935431", "ticketContents": null, "issues": [ { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/MacOS/Electron Quick Start", "message": "The binary is not signed with a valid Developer ID certificate.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/MacOS/Electron Quick Start", "message": "The signature does not include a secure timestamp.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/MacOS/Electron Quick Start", "message": "The executable does not have the hardened runtime enabled.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/Library/LoginItems/Electron Quick Start Login Helper.app/Contents/MacOS/Electron Quick Start Login Helper", "message": "The binary is not signed with a valid Developer ID certificate.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/Library/LoginItems/Electron Quick Start Login Helper.app/Contents/MacOS/Electron Quick Start Login Helper", "message": "The signature does not include a secure timestamp.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/Library/LoginItems/Electron Quick Start Login Helper.app/Contents/MacOS/Electron Quick Start Login Helper", "message": "The executable does not have the hardened runtime enabled.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework", "message": "The binary is not signed with a valid Developer ID certificate.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework", "message": "The signature does not include a secure timestamp.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib", "message": "The binary is not signed with a valid Developer ID certificate.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib", "message": "The signature does not include a secure timestamp.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/Frameworks/Electron Quick Start Helper.app/Contents/MacOS/Electron Quick Start Helper", "message": "The binary is not signed with a valid Developer ID certificate.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/Frameworks/Electron Quick Start Helper.app/Contents/MacOS/Electron Quick Start Helper", "message": "The signature does not include a secure timestamp.", "docUrl": null, "architecture": "x86_64" }, { "severity": "error", "code": null, "path": "Electron_Quick_Start-mac_store.pkg/com.optisigns.xcode-sample-app.pkg Contents/Payload/Applications/Electron Quick Start.app/Contents/Frameworks/Electron Quick Start Helper.app/Contents/MacOS/Electron Quick Start Helper", "message": "The executable does not have the hardened runtime enabled.", "docUrl": null, "architecture": "x86_64" } ] }
@Faksprod same issue here, cant see my 3rd Party Mac Developer Installer its in keychain, not sure why :(
@le1771 Unfortunately, I won't be able to help you on that point, I never had to Notarize an macOS app yet. My app is only distributed on the Mac App Store so Notarization process is not needed... But this morning I found this article (which I bookmarked just in case of) and it seems well explained and up to date (this article is mentioned on the electron-builder website). I hope it could help you!
@siddhartham Not sure to understand. Can you see or CAN'T you see your Certificates in your Keychain? If you CAN'T see it in your Keychain, I guess you have to focus on this step first.
@Faksprod when i do the security find-identity -v -p codesigning I DO NOT see the "3rd Party Mac Developer Installer" one. I DO see the "3rd Party Mac Developer Application" one.
Both are present in keychain.
@siddhartham The 3rd Party Mac Developer Installer
certificate is not for the codesigning
policy. So it wouldn't show up when you run security find-identity -v -p codesigning
However, it'll show up as a valid certificate here: security find-identity -v
👌
@le1771 Can you open a new issue & provide a bit more information there for us to troubleshoot? It may not be the same issue that's originally posted here 🤔
Thanks @sethlu , that explains the issue.
Actual issue got resolved by removing the --deep flags from codesign
@sangeeth96 +1 for the detailed instructions :) I now get a launch with mas-dev but an immediate crash (possibly something now with my configuration / app). Will report back.
Update: I had a call to
app.requestSingleInstanceLock()
which is not allowed on MAS. The app is now running sandbox. @sangeeth96 thank you once again 🎉. Let's hope this gets merged back intoelectron-builder
.
yes works
Running on: macOS Catalina 10.15.4 Xcode 11.4, Build version 11E146
I'm trying to build the starter electron app from the guide for MAS but it crashes on launch with the following dump content:
Crash dump:
``` Process: Flock [16202] Path: /Applications/Flock.app/Contents/MacOS/Flock Identifier: to.go.osx Version: 3.1.1 (3.1.1) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Flock [16202] User ID: 502 Date/Time: 2020-04-02 10:35:46.196 +0530 OS Version: Mac OS X 10.15.4 (19E266) Report Version: 12 Anonymous UUID: 705EBFD8-9558-8B08-A1F8-E4C34EA33F0E Time Awake Since Boot: 21000 seconds System Integrity Protection: enabled Crashed Thread: 22 ThreadPoolSingleThreadForegroundBlocking0 Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Trace/BPT trap: 5 Termination Reason: Namespace SIGNAL, Code 0x5 Terminating Process: exc handler [16202] Thread 0:: CrBrowserMain Dispatch queue: com.apple.root.user-interactive-qos 0 libsystem_kernel.dylib 0x00007fff6a6aadfa mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff6a6ab170 mach_msg + 60 2 libdispatch.dylib 0x00007fff6a52490e _dispatch_mach_send_and_wait_for_reply + 632 3 libdispatch.dylib 0x00007fff6a524d4e dispatch_mach_send_with_result_and_wait_for_reply + 50 4 libxpc.dylib 0x00007fff6a7ac8d6 xpc_connection_send_message_with_reply_sync + 238 5 com.apple.CoreFoundation 0x00007fff305d5d1d __104-[CFPrefsSearchListSource synchronouslySendDaemonMessage:andAgentMessage:andDirectMessage:replyHandler:]_block_invoke_2 + 28 6 com.apple.CoreFoundation 0x00007fff305d58e6 -[_CFXPreferences withConnectionForRole:performBlock:] + 36 7 com.apple.CoreFoundation 0x00007fff305d58a6 __104-[CFPrefsSearchListSource synchronouslySendDaemonMessage:andAgentMessage:andDirectMessage:replyHandler:]_block_invoke + 113 8 libdispatch.dylib 0x00007fff6a51068d _dispatch_client_callout2 + 8 9 libdispatch.dylib 0x00007fff6a520fd8 _dispatch_apply_invoke_and_wait + 157 10 libdispatch.dylib 0x00007fff6a520b36 dispatch_apply_f + 762 11 com.apple.CoreFoundation 0x00007fff305d57fe __104-[CFPrefsSearchListSource synchronouslySendDaemonMessage:andAgentMessage:andDirectMessage:replyHandler:]_block_invoke.119 + 83 12 com.apple.CoreFoundation 0x00007fff305d579a CFPREFERENCES_IS_WAITING_FOR_SYSTEM_AND_USER_CFPREFSDS + 74 13 com.apple.CoreFoundation 0x00007fff305d5634 -[CFPrefsSearchListSource synchronouslySendDaemonMessage:andAgentMessage:andDirectMessage:replyHandler:] + 172 14 com.apple.CoreFoundation 0x00007fff305d410d -[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:] + 215 15 com.apple.CoreFoundation 0x00007fff305d3e4b -[CFPrefsSearchListSource alreadylocked_getDictionary:] + 360 16 com.apple.CoreFoundation 0x00007fff305d3a74 -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 152 17 com.apple.CoreFoundation 0x00007fff305d39bc -[CFPrefsSource copyValueForKey:] + 47 18 com.apple.CoreFoundation 0x00007fff305d3970 __76-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:]_block_invoke + 32 19 com.apple.CoreFoundation 0x00007fff305cba87 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 381 20 com.apple.CoreFoundation 0x00007fff305cb57a -[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 364 21 com.apple.CoreFoundation 0x00007fff305cb304 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 145 22 com.apple.CoreFoundation 0x00007fff305cb237 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 101 23 com.apple.CoreFoundation 0x00007fff305e77db _CFPreferencesGetAppBooleanValueWithContainer + 17 24 com.apple.AppKit 0x00007fff2d8911db +[NSDictationManager isDictationSupported] + 86 25 com.apple.AppKit 0x00007fff2d890d87 -[NSApplication(NSMenuUpdating) _addTextInputMenuItems:] + 49 26 com.apple.AppKit 0x00007fff2d890cfb -[NSApplication(NSMenuUpdating) _customizeMainMenu] + 38 27 com.apple.AppKit 0x00007fff2d88f60d -[NSApplication finishLaunching] + 654 28 com.apple.AppKit 0x00007fff2d88f050 -[NSApplication run] + 244 29 com.github.Electron.framework 0x000000010fa47f6c v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17444988 30 com.github.Electron.framework 0x000000010fa469f2 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17439490 31 com.github.Electron.framework 0x000000010f9f83c3 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17118419 32 com.github.Electron.framework 0x000000010f9d0973 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 16956035 33 com.github.Electron.framework 0x000000010edadc63 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 4230515 34 com.github.Electron.framework 0x000000010edaf662 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 4237170 35 com.github.Electron.framework 0x000000010edab488 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 4220312 36 com.github.Electron.framework 0x000000010ec49376 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 2770054 37 com.github.Electron.framework 0x000000010ec48fab v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 2769083 38 com.github.Electron.framework 0x00000001112a5d98 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 42995368 39 com.github.Electron.framework 0x000000010debc214 ElectronInitializeICUandStartNode + 15073860 40 com.github.Electron.framework 0x000000010d05bf94 ElectronMain + 84 41 to.go.osx 0x000000010d024130 0x10d023000 + 4400 42 libdyld.dylib 0x00007fff6a569cc9 start + 1 Thread 1: 0 libsystem_pthread.dylib 0x00007fff6a769b68 start_wqthread + 0 Thread 2: 0 libsystem_pthread.dylib 0x00007fff6a769b68 start_wqthread + 0 Thread 3:: Dispatch queue: com.apple.root.user-interactive-qos 0 libsystem_kernel.dylib 0x00007fff6a6aadfa mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff6a6ab170 mach_msg + 60 2 libdispatch.dylib 0x00007fff6a52490e _dispatch_mach_send_and_wait_for_reply + 632 3 libdispatch.dylib 0x00007fff6a524d4e dispatch_mach_send_with_result_and_wait_for_reply + 50 4 libxpc.dylib 0x00007fff6a7ac8d6 xpc_connection_send_message_with_reply_sync + 238 5 com.apple.CoreFoundation 0x00007fff305d5d1d __104-[CFPrefsSearchListSource synchronouslySendDaemonMessage:andAgentMessage:andDirectMessage:replyHandler:]_block_invoke_2 + 28 6 com.apple.CoreFoundation 0x00007fff305d58e6 -[_CFXPreferences withConnectionForRole:performBlock:] + 36 7 com.apple.CoreFoundation 0x00007fff305d58a6 __104-[CFPrefsSearchListSource synchronouslySendDaemonMessage:andAgentMessage:andDirectMessage:replyHandler:]_block_invoke + 113 8 libdispatch.dylib 0x00007fff6a51068d _dispatch_client_callout2 + 8 9 libdispatch.dylib 0x00007fff6a520539 _dispatch_apply_invoke + 157 10 libdispatch.dylib 0x00007fff6a510658 _dispatch_client_callout + 8 11 libdispatch.dylib 0x00007fff6a51eaa8 _dispatch_root_queue_drain + 663 12 libdispatch.dylib 0x00007fff6a51f097 _dispatch_worker_thread2 + 92 13 libsystem_pthread.dylib 0x00007fff6a76a9f7 _pthread_wqthread + 220 14 libsystem_pthread.dylib 0x00007fff6a769b77 start_wqthread + 15 Thread 4: 0 libsystem_pthread.dylib 0x00007fff6a769b68 start_wqthread + 0 Thread 5:: ThreadPoolServiceThread 0 libsystem_kernel.dylib 0x00007fff6a6b3b96 kevent64 + 10 1 com.github.Electron.framework 0x000000010fa56f61 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17506417 2 com.github.Electron.framework 0x000000010fa56df6 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17506054 3 com.github.Electron.framework 0x000000010f9f83c3 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17118419 4 com.github.Electron.framework 0x000000010f9d0973 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 16956035 5 com.github.Electron.framework 0x000000010fa00c84 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17153428 6 com.github.Electron.framework 0x000000010fa107e4 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17217780 7 com.github.Electron.framework 0x000000010fa420e7 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17420791 8 libsystem_pthread.dylib 0x00007fff6a76e109 _pthread_start + 148 9 libsystem_pthread.dylib 0x00007fff6a769b8b thread_start + 15 Thread 6:: ThreadPoolForegroundWorker 0 libsystem_kernel.dylib 0x00007fff6a6aadfa mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff6a6ab170 mach_msg + 60 2 com.github.Electron.framework 0x000000010fa4c373 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17462403 3 com.github.Electron.framework 0x000000010fa09ab8 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17189832 4 com.github.Electron.framework 0x000000010fa0a51e v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17192494 5 com.github.Electron.framework 0x000000010fa0a024 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17191220 6 com.github.Electron.framework 0x000000010fa420e7 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17420791 7 libsystem_pthread.dylib 0x00007fff6a76e109 _pthread_start + 148 8 libsystem_pthread.dylib 0x00007fff6a769b8b thread_start + 15 Thread 7:: ThreadPoolBackgroundWorker 0 libsystem_kernel.dylib 0x00007fff6a6aadfa mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff6a6ab170 mach_msg + 60 2 com.github.Electron.framework 0x000000010fa4c373 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17462403 3 com.github.Electron.framework 0x000000010fa09ab8 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17189832 4 com.github.Electron.framework 0x000000010fa0a10e v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17191454 5 com.github.Electron.framework 0x000000010fa09f94 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17191076 6 com.github.Electron.framework 0x000000010fa420e7 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17420791 7 libsystem_pthread.dylib 0x00007fff6a76e109 _pthread_start + 148 8 libsystem_pthread.dylib 0x00007fff6a769b8b thread_start + 15 Thread 8:: Chrome_IOThread 0 com.github.Electron.framework 0x000000010f3a78a0 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 10496432 1 com.github.Electron.framework 0x000000010f3a68b6 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 10492358 2 com.github.Electron.framework 0x0000000112d784e4 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 71120372 3 com.github.Electron.framework 0x000000010ef5b443 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 5989715 4 com.github.Electron.framework 0x000000010ef5b0c1 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 5988817 5 com.github.Electron.framework 0x000000010ef4dae6 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 5934070 6 com.github.Electron.framework 0x000000010f9e851f v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17053231 7 com.github.Electron.framework 0x000000010f9f7bba v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17116362 8 com.github.Electron.framework 0x000000010f9f7949 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17115737 9 com.github.Electron.framework 0x000000010fa56d97 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17505959 10 com.github.Electron.framework 0x000000010f9f83c3 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17118419 11 com.github.Electron.framework 0x000000010f9d0973 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 16956035 12 com.github.Electron.framework 0x000000010edb11b6 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 4244166 13 com.github.Electron.framework 0x000000010fa107e4 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17217780 14 com.github.Electron.framework 0x000000010fa420e7 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 17420791 15 libsystem_pthread.dylib 0x00007fff6a76e109 _pthread_start + 148 16 libsystem_pthread.dylib 0x00007fff6a769b8b thread_start + 15 Thread 9: 0 libsystem_kernel.dylib 0x00007fff6a6af766 kevent + 10 1 com.github.Electron.framework 0x00000001133234da uv_free_interface_addresses + 1370 2 com.github.Electron.framework 0x0000000113312a41 uv_run + 465 3 com.github.Electron.framework 0x0000000113288256 node::MultiIsolatePlatform::CancelPendingDelayedTasks(v8::Isolate*) + 902 4 libsystem_pthread.dylib 0x00007fff6a76e109 _pthread_start + 148 5 libsystem_pthread.dylib 0x00007fff6a769b8b thread_start + 15 Thread 10: 0 libsystem_kernel.dylib 0x00007fff6a6ad882 __psynch_cvwait + 10 1 libsystem_pthread.dylib 0x00007fff6a76e425 _pthread_cond_wait + 698 2 com.github.Electron.framework 0x000000011331e5e9 uv_cond_wait + 9 3 com.github.Electron.framework 0x0000000113288458 node::MultiIsolatePlatform::CancelPendingDelayedTasks(v8::Isolate*) + 1416 4 com.github.Electron.framework 0x000000011328619b node::options_parser::SplitHostPort(std::__1::basic_stringI'm using
electron-forge
which useselectron-osx-sign
internally (from npm, not vendored) and I've set the debug variable to get the following output:Forge make logs:
``` $ DEBUG=electron-osx-sign* yarn make yarn run v1.22.4 $ electron-forge make --platform=mas ✔ Checking your system ✔ Resolving Forge Config We need to package your application before we can make it ✔ Preparing to Package Application for arch: x64 ✔ Preparing native dependencies ⠋ Packaging Application electron-osx-sign electron-osx-sign@0.4.15 +0ms electron-osx-sign:warn No `identity` passed in arguments... +13ms electron-osx-sign Finding `Mac Developer` certificate for signing app in development for the Mac App Store signing... +1ms electron-osx-sign Executing... security find-identity -v +0ms ⠹ Packaging Application electron-osx-sign Identity: > Name: Mac Developer: macapp@flock.com (68X4UT6RJP) > Hash: D6AA3B1172358136E2BDAB79DC50C7F1AAB8E141 +2s electron-osx-sign Identity: > Name: Mac Developer: macapp@flock.com (68X4UT6RJP) > Hash: D6AA3B1172358136E2BDAB79DC50C7F1AAB8E141 +0ms electron-osx-sign:warn Multiple identities found, will use the first discovered. +0ms electron-osx-sign Pre-sign operation enabled for provisioning profile: * Disable by setting `pre-embed-provisioning-profile` to `false`. +2ms electron-osx-sign:warn Pre-sign operation disabled for entitlements automation. +0ms electron-osx-sign `provisioning-profile` passed in arguments. +5ms electron-osx-sign Executing... security cms -D -i mas-dev.provisionprofile +0ms ⠴ Packaging Application electron-osx-sign Provisioning profile: > Name: Flock Messenger Development Profile > Platforms: [ 'darwin', 'mas' ] > Type: development > Path: mas-dev.provisionprofile > Message: { AppIDName: 'goto', ApplicationIdentifierPrefix: [ 'B4X8EQS24E' ], CreationDate: 2020-04-02T00:28:57.000Z, Platform: [ 'OSX' ], IsXcodeManaged: false, DeveloperCertificates: [The config for
electron-osx-sign
:The entitlements:
mas.plist
mas.inherit.plist
I followed the advise as to set
type
todevelopment
. After changing the entitlements around a bit, the error from #130 was gone but the .app file still crashed as soon it's launched with the above crashdump log. I followed https://developer.apple.com/library/archive/qa/qa1884/_index.html and made the installer pkg signed with 3P Installer and tried installing that to no luck (same error). We had initially submitted the pkg for review before testing it ourselves (we thought we couldn't test the MAS builds) but it got rejected with the note saying the app crashes on launch. So, we tried to start from scratch to understand where things were failing but it's failing from the get go.What are we doing wrong here? I'm hoping this is the right way to go on about testing MAS builds before submitting for review.