GateKeeper refues to allow execution of notarized and stapled app on MacOS - macos

We have developed a small test .app with C code that loads (dlopen()) a simple one function dylib library (the dylib file is included in the app Contents under /Contents/Frameworks/), which printf's two text lines to a text file in /tmp/ using xcode 12.
The app (and dylib inside) was signed using provisioning profile that is tied with Developer ID based certificate. App's runtime is hardened, signed, notarized and stapled correctly for Developer ID (to be published on our website) by Xcode archiving/exporting tool's UI.
We verified that it works on our build machine by placing it under /Applications/loadtest.app and executing it by double click ( /tmp/loadtest.log is created and entries are printed correctly. )
Once we download it on another macbook (running with osx 11.4), it will not exeute (getting "You do not have permission to open the application" message from the GateKeeper), and will crash with "Termination Reason: Namespace CODESIGNING, Code 0x1" (see full crash dump below).
Checking with spctl on the new macbook:
spctl -a -t exec -v /Applications/loadtest.app:
"/Applications/loadtest.app: accepted
source=Notarized Developer ID"
We have tried changing the permissions and attributes of the app (found few hints for this on the internet), but it does not help. Someone suggested to restart the machine (to allow it to re-concile Apple's notarization services and download the latest stapling "tickets"), which also didn't help.
If we disable SIP on that test MacBook, the application now runs, not before we get a warning about "unknown publisher" from the gatekeeper and allowing it, but we need our apps to run with SIP enabled.
Does anyone have any hint or suggestion? We contacted Apple, but havn't recieved any answer from them since.
...
Crash dump:
rocess: loadtest [582]
Path: /Applications/loadtest.app/Contents/MacOS/loadtest
Identifier: loadtest
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: loadtest [582]
User ID: 501
Date/Time: 2021-07-15 12:56:09.913 +0300
OS Version: macOS 11.4 (20F71)
Report Version: 12
Bridge OS Version: 5.4 (18P4663)
Anonymous UUID: FD00A5BA-5166-EC7D-B051-E28BDEE29E95
Time Awake Since Boot: 110 seconds
System Integrity Protection: enabled
Crashed Thread: Unknown
Exception Type: EXC_CRASH (Code Signature Invalid)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x1
kernel messages:
VM Regions Near 0 (cr2):
-->
mapped file 104a09000-104a0d000 [ 16K] r-x/r-x SM=COW Object_id=a7cdfe2f
Backtrace not available
Unknown thread crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x00007ffeeb1f6a88
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000
rip: 0x000000010ee38000 rfl: 0x0000000000000200 cr2: 0x0000000000000000
Logical CPU: 0
Error Code: 0x00000000
Trap Number: 0
Unknown thread instruction stream not available.
Unknown thread last branch register state not available.
Binary images description not available
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
Writable regions: Total=8400K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8400K(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
STACK GUARD 56.0M 1
Stack 8192K 1
VM_ALLOCATE 8K 2
VM_ALLOCATE (reserved) 232K 3 reserved VM address space (unallocated)
mapped file 968K 7
=========== ======= =======
TOTAL 65.2M 14
TOTAL, minus reserved VM space 65.0M 14
Model: MacBookPro16,1, BootROM 1554.120.19.0.0 (iBridge: 18.16.14663.0.0,0), 6 processors, 6-Core Intel Core i7, 2.6 GHz, 16 GB, SMC
Graphics: kHW_IntelUHDGraphics630Item, Intel UHD Graphics 630, spdisplays_builtin
Graphics: kHW_AMDRadeonPro5300MItem, AMD Radeon Pro 5300M, spdisplays_pcie_device, 4 GB
Memory Module: BANK 0/ChannelA-DIMM0, 8 GB, DDR4, 2667 MHz, Micron, 8ATF1G64HZ-2G6E1
Memory Module: BANK 2/ChannelB-DIMM0, 8 GB, DDR4, 2667 MHz, Micron, 8ATF1G64HZ-2G6E1
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x7BF), wl0: Feb 16 2021 03:05:58 version 9.30.444.10.32.5.67 FWID 01-3d719d60
Bluetooth: Version 8.0.5d7, 3 services, 25 devices, 1 incoming serial ports
Network Service: USB 10/100/1000 LAN, Ethernet, en7
USB Device: USB3.0 Hub
USB Device: USB 10/100/1000 LAN
USB Device: USB 3.1 Bus
USB Device: USB2.0 Hub
USB Device: Microsoft® Nano Transceiver v1.0
USB Device: USB 2.0 BILLBOARD
USB Device: Apple T2 Bus
USB Device: Composite Device
USB Device: Touch Bar Backlight
USB Device: Touch Bar Display
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Headset
USB Device: Ambient Light Sensor
USB Device: FaceTime HD Camera (Built-in)
USB Device: Apple T2 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 63.5
Thunderbolt Bus: MacBook Pro, Apple Inc., 63.5
...

Related

Codesigned application is crashing on reboot of Catalina with "EXC_CRASH (Code Signature Invalid)"

I've got an application that is codesigned properly that starts up and runs without issue -- unless/until some macs (in this case Catalina 10.15.5) reboot.
In this case the mac was shut down with power button so when it reboots it attempts to restart open apps. When it restarts my application I get the crash report below.
Restarting the app manually works, because it is properly signed. I just can't figure out what the problem is on boot - I have no information to go on as you can see.
Just to be clear on my architecture (in case it somehow matters): I have a parent application "Ggui" that runs a background service "GService". "Gservice" spins up an app that goes into a socket listen mode - this is the app that is crashing. It is called "Vchat".
Ggui
|_____ Gservice
| |______ Vchat
| |______ UpdateCheck
|
|_____ Dservice
Crash report:
Process: Vchat [685]
Path: /Applications/MyApp.app/Contents/MacOS/Vchat.app/Contents/MacOS/Vchat
Identifier: Vchat
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [521]
Responsible: Ggui [431]
User ID: 501
Date/Time: 2020-08-17 09:55:32.890 -0400
OS Version: Mac OS X 10.15.5 (19F101)
Report Version: 12
Bridge OS Version: 4.5 (17P5300)
Anonymous UUID: 2E8B1B09-530B-660E-2690-AE512687AE94
Time Awake Since Boot: 170 seconds
System Integrity Protection: enabled
Crashed Thread: Unknown
Exception Type: EXC_CRASH (Code Signature Invalid)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Killed: 9
Termination Reason: Namespace SIGNAL, Code 0x9
Terminating Process: Gservice [521]
kernel messages:
Backtrace not available
Unknown thread crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x00007ffeeeee4b28
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000
rip: 0x0000000107d68000 rfl: 0x0000000000000200 cr2: 0x0000000000000000
Logical CPU: 0
Error Code: 0x00000000
Trap Number: 0
Binary images description not available
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 144
thread_create: 0
thread_set_state: 0
Model: MacBookAir8,1, BootROM 1037.120.87.0.0 (iBridge: 17.16.15300.0.0,0), 2 processors, Dual-Core Intel Core i5, 1.6 GHz, 8 GB, SMC
Graphics: kHW_IntelUHDGraphics617Item, Intel UHD Graphics 617, spdisplays_builtin
Memory Module: BANK 0/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x80AD, 0x483943434E4E4E435054414C42522D4E5644
Memory Module: BANK 1/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x80AD, 0x483943434E4E4E435054414C42522D4E5644
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x843), wl0: Feb 28 2020 15:31:19 version 9.30.357.35.32.5.42 FWID 01-9d05982a
Bluetooth: Version 7.0.5f6, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB 3.0 Bus
USB Device: Apple T2 Bus
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Headset
USB Device: Ambient Light Sensor
USB Device: FaceTime HD Camera (Built-in)
USB Device: Apple T2 Controller
Thunderbolt Bus: MacBook Air, Apple Inc., 47.4

Atom editor not working after reboot / OSX

I'm not sure if it's the correct stack platform but since some time my Atom Editor don't start after I restart or boot my Mac.
I need to reinstall the app. I also uninstall the hole application with AppCleaner and install it new without success. After the reboot I've got this error message:
Process: Atom [916]
Path: /Applications/Atom.app/Contents/MacOS/Atom
Identifier: com.github.atom
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Atom [916]
User ID: 501
Date/Time: 2019-09-26 22:42:03.502 +0200
OS Version: Mac OS X 10.14.6 (18G95)
Report Version: 12
Anonymous UUID: 67A52C69-B8B4-FB36-FAF9-2F2D5A429F99
Time Awake Since Boot: 65 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_CRASH (Code Signature Invalid)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x1
kernel messages:
VM Regions Near 0 (cr2):
-->
__TEXT 000000010f3a4000-000000010f3a5000 [ 4K] r-x/rwx SM=COW
Thread 0 Crashed:
0 0x0000000119caa000 _dyld_start + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x00007ffee085bc30
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000
rip: 0x0000000119caa000 rfl: 0x0000000000000200 cr2: 0x0000000000000000
Logical CPU: 0
Error Code: 0x00000000
Trap Number: 0
Binary Images:
0x10f3a4000 - 0x10f3a4ff3 + (0) <4FAD2A7B-B418-358C-949F-1104B0620579>
0x119ca9000 - 0x119d1370f + (655.1.1) <DFC3C4AF-6F97-3B34-B18D-7DCB23F2A83A>
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 1564
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=608K resident=0K(0%) swapped_out_or_unallocated=608K(100%)
Writable regions: Total=8400K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8400K(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
STACK GUARD 56.0M 1
Stack 8192K 1
__DATA 232K 3
__LINKEDIT 176K 2
__TEXT 432K 2
shared memory 8K 2
=========== ======= =======
TOTAL 64.8M 11
Model: MacBookPro10,1, BootROM 257.0.0.0.0, 4 processors, Intel Core i7, 2,3 GHz, 8 GB, SMC 2.3f36
Graphics: kHW_IntelHD4000Item, Intel HD Graphics 4000, spdisplays_builtin
Graphics: kHW_NVidiaGeForceGT650MItem, NVIDIA GeForce GT 650M, spdisplays_pcie_device, 1 GB
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54333531533642465238432D50422020
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54333531533642465238432D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xEF), Broadcom BCM43xx 1.0 (7.21.190.33 AirPortDriverBrcm4360-1325.2)
Bluetooth: Version 6.0.14d3, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM256E, 251 GB
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: FaceTime HD Camera (Built-in)
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: Hub
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: USB 3.0 Bus
USB Device: USB3.0 Hub
USB Device: USB2.0 Hub
USB Device: Keyboard Hub
USB Device: Apple Keyboard
USB Device: Game Mouse
Thunderbolt Bus: MacBook Pro, Apple Inc., 23.4
OSX is on 10.14.6
Atom 1.40.1
Updated:
with atom --safe I’ve got this message in the terminal:
LSOpenURLsWithRole() failed for the application /Applications/Atom.app with error -10810.
with atom -f this error:
/usr/local/bin/atom: line 192: 2506 Killed: 9 "$ATOM_PATH/$ATOM_APP_NAME/Contents/MacOS/$ATOM_EXECUTABLE_NAME" --executed-from="$(pwd)" --pid=$$ "$#"
Update2
it works till version 1.38.2. since 1.39 the app chrashed
You could try resigning with Jonathan Levin's jtool
jtool --sign /Applications/Atom.app/Contents/MacOS/Atom
backup original Atom executable
And replace /Applications/Atom.app/Contents/MacOS/Atom with resulting out.bin (i.e. rename out.bin to /Applications/Atom.app/Contents/MacOS/Atom)
I was facing a similar problem in my Mac wherein Atom kept crashing after I had 'Force Quit' it some time back in the day. I deleted the ~/.atom folder as mentioned here and then it worked like a breeze.

Electron / Quasar - how to run a Mac app after signing & sandboxing?

I have a Quasar / Electron Mac app which allows the user to click on a snippet and paste it into the last viewed app (e.g. Mail etc).
When I build the app for the mas (Mac App Store) platform without signing and sandboxing, with the following settings in quasar.conf.js
electron: {
packager: {
asar: false,
appBundleId: '[app id]',
platform: 'mas',
version: '1.0.0',
buildVersion: '4'
}
}
... and the following build command:
quasar build -m electron
Then the generated app file runs fine when I double click it.
However, if I sign and sandbox the app, with the following settings in quasar.conf.js:
electron: {
packager: {
asar: false,
appBundleId: '[app id]',
osxSign: {
'entitlements': 'src-electron/default.entitlements.mas.plist'
},
platform: 'mas',
version: '1.0.0',
buildVersion: '4'
}
}
... with this default.entitlements.mas.plist file:
<?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.network.client</key>
<true/>
</dict>
</plist>
... and the same build command:
quasar build -m electron
Then, when I double click the generated app file, it quits straight away with the following message:
Edit: Clicking Report reveals the following message:
PROCESS: Email Snippets [90262]
Path: /Applications/MAMP/*/Email Snippets.app/Contents/MacOS/Email Snippets
Identifier: com.dannyconnell.emailsnippets
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Email Snippets [90262]
User ID: 501
Date/Time: 2018-11-03 21:14:01.171 +0000
OS Version: Mac OS X 10.13.6 (17G65)
Report Version: 12
Anonymous UUID: E00B5535-E6DC-B81E-1DCC-43B629EDC468
Sleep/Wake UUID: B3B79D2B-F30B-47B0-A980-0822EFC30745
Time Awake Since Boot: 90000 seconds
Time Since Wake: 480 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_CRASH (Code Signature Invalid)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x1
kernel messages:
VM Regions Near 0 (cr2):
-->
__TEXT 0000000103992000-0000000103993000 [ 4K] r-x/rwx SM=COW
Thread 0 Crashed:
0 ??? 0x000000011127d19c _dyld_start + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x00007ffeec26db20
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000
rip: 0x000000011127d19c rfl: 0x0000000000000200 cr2: 0x0000000000000000
Logical CPU: 0
Error Code: 0x00000000
Trap Number: 0
Binary Images:
0x103992000 - 0x103992ff7 +??? (0) <447A1052-3F46-3E1B-BAC8-64F49EDE036E> (null)
0x11127c000 - 0x1112c6acf +??? (551.4) <8A72DE9C-A136-3506-AA02-4BA2B82DCAF3> (null)
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 58409
thread_create: 0
thread_set_state: 54
VM Region Summary:
ReadOnly portion of Libraries: Total=432K resident=0K(0%) swapped_out_or_unallocated=432K(100%)
Writable regions: Total=8404K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8404K(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
STACK GUARD 56.0M 2
Stack 8192K 2
__DATA 228K 4
__LINKEDIT 128K 3
__TEXT 304K 3
shared memory 8K 3
=========== ======= =======
TOTAL 64.7M 11
Model: MacBookPro12,1, BootROM MBP121.0177.B00, 2 processors, Intel Core i5, 2.7 GHz, 8 GB, SMC 2.28f7
Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54414C41522D4E5544
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54414C41522D4E5544
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.77.37.31.1a9)
Bluetooth: Version 6.0.7f10, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0256G, 251 GB
USB Device: USB 3.0 Bus
USB Device: Internal Memory Card Reader
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1
If I then package the app using electron-osx-flat:
electron-osx-flat "dist/electron-mat/[app name]-mas-x64/[app name].app" --verbose
.. and double click the pkg file to install it, then the app installs successfully. But when I click the app in Applications, it again quits straight away with the message in the image above.
Edit: Also, if I run the executable within the .app file in Terminal, I just get the message:
Killed: 9
However, when I submit this generated pkg file for review, the app basically works for the reviewer, but the copy and paste functionality is not working.
I believe this is to do with missing entitlements in the default.entitlements.mas.plist file.
However, I would like to be able to test for these kinds of issues myself, before submitting to the app store.
How can I run and test my app once it is signed and sandboxed?
Thanks to #miadz for pointing me in the right direction.
Here's what you need to do to run your Electron app fully sandboxed (as it will appear to the Apple Review Team, with all entitlements applied):
1) Firstly, you need a 2nd Mac on which to test your app
2) Add your 2nd Mac as a listed device on the Apple Developer site (Account > Certificates, IDs and Profiles > macOS > Devices > all). You will need your Mac's UUID which you can find from your menu bar in Apple > About This Mac > Overview > System Report...
3) Generate a Mac Development Provisioning profile for your app on the Apple Developer site (Account > Certificates, IDs and Profiles > macOS > Provisioning Profiles > Development) and make sure you select your 2nd Mac as a device. If you already have a development provisioning profile, then edit it and select your 2nd Mac under Devices.
4) Download your provisioning profile and place it in the root of your Quasar / Electron project
5) On your development Mac, build your app for the mas platform without signing, e.g.
electron: {
packager: {
asar: false,
appBundleId: '[app id]',
platform: 'mas',
version: '1.0.0',
buildVersion: '4'
}
}
then...
quasar build -m electron
6) Sign your generated app for development with electron-osx-sign (you may need to npm install electron-osx-sign -g first):
electron-osx-sign "dist/electron-mat/[app name]-mas-x64/[app name].app" --platform=mas --type=development --entitlements="src-electron/default.entitlements.mas.plist" --provisioning-profile="[app name]_Mac_Development.provisionprofile"
7) Send the generated .app file to your 2nd Mac and run

Testing the Mac Installer Package using Xcode 6

Before submitting my Mac App to the App Store I am used to test the installation package following
the procedure described here:
Testing the Mac Installer Package - Apple documentation
This mainly involve archiving the app, exporting as Mac Installer Package and installing it using:
sudo installer -store -pkg .... -target /
Since I updated to Xcode 6 I always get a signature error when I start the app [EXC_CRASH (Code Signature Invalid)]:
Process: ......... [1749]
Path: /Applications/.........
Identifier: ......
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: .......... [1749]
User ID: 501
Date/Time: 2014-11-07 18:52:45.292 +0100
OS Version: Mac OS X 10.10 (14A389)
Report Version: 11
Anonymous UUID: 142A2C49-B327-E26A-0DE4-0CCB99AC1DC0
Sleep/Wake UUID: 174FDF51-B783-4172-952B-EB8E5B07D436
Time Awake Since Boot: 2700 seconds
Time Since Wake: 690 seconds
Crashed Thread: 0
Exception Type: EXC_CRASH (Code Signature Invalid)
Exception Codes: 0x0000000000000000, 0x0000000000000000
kernel messages:
VM Regions Near 0x7fff75cbe0a8 (cr2):
__LINKEDIT 00007fff68263000-00007fff68277000 [ 80K] r--/rwx SM=COW /usr/lib/dyld
--> Submap 00007fff70000000-00007fff80000000 [256.0M] r--/rwx SM=PRV process-only VM submap
unused shlib __DATA 00007fff749e7000-00007fff76f76000 [ 37.6M] rw-/rw- SM=COW system shared lib __DATA not used by this process
Thread 0 Crashed:
0 dyld 0x00007fff681f4000 _dyld_start + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x000000000000000d rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x00007fff556dcb50
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000
rip: 0x00007fff681f4000 rfl: 0x0000000000000201 cr2: 0x00007fff75cbe0a8
Logical CPU: 0
Error Code: 0x020000f4
Trap Number: 133
Binary Images:
0x7fff681f3000 - 0x7fff68229837 dyld (???) <4696A982-1500-34EC-9777-1EF7A03E2659> /usr/lib/dyld
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 1226
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=300K resident=288K(96%) swapped_out_or_unallocated=12K(4%)
Writable regions: Total=8420K written=0K(0%) resident=12K(0%) swapped_out=0K(0%) unallocated=8408K(100%)
REGION TYPE VIRTUAL
=========== =======
STACK GUARD 56.0M
Stack 8192K
VM_ALLOCATE 8K
VM_ALLOCATE (reserved) 4K reserved VM address space (unallocated)
__DATA 228K
__LINKEDIT 80K
__TEXT 220K
mapped file 1044K
shared memory 4K
=========== =======
TOTAL 65.6M
TOTAL, minus reserved VM space 65.5M
Model: MacBookPro11,1, BootROM MBP111.0138.B11, 2 processors, Intel Core i7, 2.8 GHz, 16 GB, SMC 2.16f68
Graphics: Intel Iris, Intel Iris, Built-In
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533641465238412D50422020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533641465238412D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x112), Broadcom BCM43xx 1.0 (7.15.124.12.8)
Bluetooth: Version 4.3.0f10 14890, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0512F, 500.28 GB
USB Device: Internal Memory Card Reader
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 17.2
Exactly the same app as not this problem using Xcode 5.
Any suggestion?
This is getting me crazy since I am not confident to submit the app to Apple.
I eventually contacted Apple support and they answered that the procedure is:
1) Export your app as a Mac Application
2) productbuild --component <APP>.app /Applications <APP>.pkg --sign "3rd Party Mac Developer Installer:"
3) sudo installer -store -pkg <APP>.pkg -target /
The documentation doesn't mention point #2!
This doesn't seem to affect app review. If your archive is validated, you can just submit your app and it should work fine when downloaded from the app store.
Apple's Technical Q&A QA1884 document (dated 2015-01-26) covers this topic:
When I run my Mac app, it crashes immediately, and the crash log says Exception Type: EXC_CRASH (Code Signature Invalid). What is going on here?
... distribution builds of Mac apps cannot be run directly; they are for submitting to iTunes Connect for app review only.
The document suggests some work arounds.

Error with Pre-installed Postgresql for Mac OSX 10.7 "/var/pgsql_socket/.s.PGSQL.5432"?

Need help fixing my postgresql, the pre-installed one that comes with OSX Lion.
I get the error
psql: could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
also, when i use the terminal command "which psql" I get
/usr/bin/psql
So it seems as if I'm pointing at the right psql installation. Also, I've recently finished removing all previous installations of postgres/postgres apps, etc, and I've also removed anything relating to those previous versions of postgres from my ".bash_profile".
As an added piece of information, I tried to use the Postgres.app and continue to get Version 9.2.4.3 and I receive and "Unexpected quit message", I think this may be part of the same problem.
Error message when quitting:
Process: com.heroku.postgres-service [49859]
Path: /Applications/Postgres.app/Contents/XPCServices/com.heroku.postgres-service.xpc/Contents/MacOS/com.heroku.postgres-service
Identifier: com.heroku.postgres-service
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: com.heroku.postgres-service [49856]
Date/Time: 2013-09-05 12:55:08.176 -0400
OS Version: Mac OS X 10.7.5 (11G63)
Report Version: 9
Anonymous UUID: 7F2C7D7B-4EF2-4ED5-A570-94393FBE5F97
Crashed Thread: Unknown
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00007fff5fc01028
Backtrace not available
Unknown thread crashed with X86 Thread State (64-bit):
rax: 0x0000000000000055 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x0000000000000000
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000
rip: 0x00007fff5fc01028 rfl: 0x0000000000010203 cr2: 0x00007fff5fc01028
Logical CPU: 0
Binary images description not available
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 3164
thread_create: 0
thread_set_state: 0
Model: MacBookPro8,1, BootROM MBP81.0047.B27, 2 processors, Intel Core i5, 2.4 GHz, 10 GB, SMC 1.68f99
Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 512 MB
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1333 MHz, 0x029E, 0x434D5341384758334D314131333333433920
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80CE, 0x4D34373142353737334448302D4348392020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom BCM43xx 1.0 (5.106.198.19.22)
Bluetooth: Version 4.0.8f17, 2 service, 11 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: TOSHIBA MK5065GSXF, 500.11 GB
Serial ATA Device: MATSHITADVD-R UJ-8A8
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8509, 0xfa200000 / 3
USB Device: hub_device, 0x0424 (SMSC), 0x2513, 0xfa100000 / 2
USB Device: USB Receiver, 0x046d (Logitech Inc.), 0xc51b, 0xfa130000 / 6
USB Device: BRCM2070 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0xfa110000 / 5
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x821a, 0xfa113000 / 8
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0252, 0xfa120000 / 4
USB Device: hub_device, 0x0424 (SMSC), 0x2513, 0xfd100000 / 2
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd110000 / 3
Please try with host option:
psql -h localhost
You can add this line to your .bash_profile file:
export PGHOST=localhost
Permission denied suggests a file permission issue. Make sure that the socket file exists where it is supposed to be, and that you can list /var/ and /var/pgsql_socket/
If that doesn't fix it, install PostgreSQL via Homebrew.

Resources