gdbinit / adium-ng-preview

Repo to dump some preview info and builds for adium-ng
27 stars 0 forks source link

Problem with sandbox wenn renaming or moving the application? #1

Open MacDefender opened 7 years ago

MacDefender commented 7 years ago

If I try the latest sandbox-fixed Adium-NG version it won't start and I got plenty of error messages like this one: kernel[0]: Sandbox: Adium(13181) deny(1) file-read-data /Applications/Network/Adium-NG.app/Contents/Frameworks/...

If I move the application to the Application folder those errors disappear but instead I get: sandboxd[222]: ([13199]) Adium(13199) deny file-read-data /System/Library/CoreServices/SystemFolderLocalizations Adium[13199]: Error: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “adium_sandboxtest” in the folder “myusername”." UserInfo={NSFilePath=/Users/myusername/adium_sandboxtest, NSUnderlyingError=0x7fb09280ebd0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}} and kernel[0]: Sandbox: Adium(13199) deny(1) file-read-data /Users/myusername/Library/Preferences/com.apple.security.revocation.plist Adium[13199]: Exception was raised: Uncaught system exception: signal 11

Hope this might help to improve Adium-NG as I like the idea of a hardened Jabber client.

lospugs commented 7 years ago

If after getting the mentioned sandbox error when saving adium_standboxtest, opening a message results in the following:

If after getting the mentioned sandbox error when saving adium_standboxtest, opening a message (or really any extra window opening) results in the following:

3/29/17 1:29:18.691 PM Adium[600]: -[AIMessageWindowController loadWindow]: failed to load window nib file '/Users//Desktop/Adium.app/Contents/Resources/MessageWindow.nib'. 3/29/17 1:29:18.702 PM Adium[600]: Assertion failure in -[AIWebKitMessageViewPlugin availableMessageStyles], /Users/reverser/adium-ng/Plugins/WebKit Message View/AIWebKitMessageViewPlugin.m:137 3/29/17 1:29:18.702 PM Adium[600]: Exception was raised: No message styles available 3/29/17 1:29:18.703 PM Adium[600]: An uncaught exception was raised 3/29/17 1:29:18.703 PM Adium[600]: No message styles available 3/29/17 1:29:18.704 PM Adium[600]: ( 0 CoreFoundation 0x00007fff857f4452 __exceptionPreprocess + 178 1 libobjc.A.dylib 0x00007fff91dfbf7e objc_exception_throw + 48 2 CoreFoundation 0x00007fff857f912a +[NSException raise:format:arguments:] + 106 3 Foundation 0x00007fff8b780856 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198 4 Adium 0x00000001078a10aa Adium + 32938 5 Adium 0x00000001078a1168 Adium + 33128 6 Adium 0x00000001078a129d Adium + 33437 7 Adium 0x000000010789b9b5 Adium + 10677 8 libdispatch.dylib 0x00007fff95ab740b _dispatch_client_callout + 8 9 libdispatch.dylib 0x00007fff95ab89f2 _dispatch_barrier_sync_f_invoke + 74 10 Adium 0x000000010789b8ce Adium + 10446 11 Adium 0x000000010789b09b Adium + 8347 12 Adium 0x000000010789aec0 Adium + 7872 13 Adium 0x00000001078b753e Adium + 124222 14 Adium 0x00000001078b6e59 Adium + 122457 15 Adium 0x00000001078b6bc7 Adium + 121799 16 Adium 0x00000001078b4dd0 Adium + 114128 17 Adium 0x0000000107937d3c Adium + 650556 18 Adium 0x0000000107941420 Adium + 689184 19 Adium 0x00000001078d0b04 Adium + 228100 20 Adium 0x0000000107ce0009 -[AIAbstractListController performDefaultActionOnSelectedItem:] + 301 21 libsystem_trace.dylib 0x00007fff93e7807a _os_activity_initiate + 75 22 AppKit 0x00007fff8c7ffdbd -[NSApplication sendAction:to:from:] + 460 23 AppKit 0x00007fff8c811f12 -[NSControl sendAction:to:] + 86 24 AppKit 0x00007fff8c8911d5 -[NSTableView _sendAction:to:row:column:] + 111 25 AppKit 0x00007fff8c88f93e -[NSTableView mouseDown:] + 6067 26 AppKit 0x00007fff8c88df52 -[NSOutlineView mouseDown:] + 74 27 AIUtilities 0x0000000107b72c6f -[AIVariableHeightOutlineView mouseDown:] + 88 28 Adium 0x0000000107ce3d43 -[AIListOutlineView mouseDown:] + 388 29 AppKit 0x00007fff8cd633c9 -[NSWindow _handleMouseDownEvent:isDelayedEvent:] + 6322 30 AppKit 0x00007fff8cd643ad -[NSWindow _reallySendEvent:isDelayedEvent:] + 212 31 AppKit 0x00007fff8c7a3539 -[NSWindow sendEvent:] + 517 32 AppKit 0x00007fff8c723a38 -[NSApplication sendEvent:] + 2540 33 AppKit 0x00007fff8c58adf2 -[NSApplication run] + 796 34 AppKit 0x00007fff8c554368 NSApplicationMain + 1176 35 Adium 0x000000010789aaec Adium + 6892 36 ??? 0x0000000000000001 0x0 + 1 ) 3/29/17 1:29:18.704 PM Adium[600]: Exception was raised: No message styles available 3/29/17 1:29:18.704 PM Adium[600]: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No message styles available' *** First throw call stack: ( 0 CoreFoundation 0x00007fff857f4452 __exceptionPreprocess + 178 1 libobjc.A.dylib 0x00007fff91dfbf7e objc_exception_throw + 48 2 CoreFoundation 0x00007fff857f912a +[NSException raise:format:arguments:] + 106 3 Foundation 0x00007fff8b780856 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198 4 Adium 0x00000001078a10aa Adium + 32938 5 Adium 0x00000001078a1168 Adium + 33128 6 Adium 0x00000001078a129d Adium + 33437 7 Adium 0x000000010789b9b5 Adium + 10677 8 libdispatch.dylib 0x00007fff95ab740b _dispatch_client_callout + 8 9 libdispatch.dylib 0x00007fff95ab89f2 _dispatch_barrier_sync_f_invoke + 74 10 Adium 0x000000010789b8ce Adium + 10446 11 Adium 0x000000010789b09b Adium + 8347 12 Adium 0x000000010789aec0 Adium + 7872 13 Adium 0x00000001078b753e Adium + 124222 14 Adium 0x00000001078b6e59 Adium + 122457 15 Adium 0x00000001078b6bc7 Adium + 121799 16 Adium 0x00000001078b4dd0 Adium + 114128 17 Adium 0x0000000107937d3c Adium + 650556 18 Adium 0x0000000107941420 Adium + 689184 19 Adium 0x00000001078d0b04 Adium + 228100 20 Adium 0x0000000107ce0009 -[AIAbstractListController performDefaultActionOnSelectedItem:] + 301 21 libsystem_trace.dylib 0x00007fff93e7807a _os_activity_initiate + 75 22 AppKit 0x00007fff8c7ffdbd -[NSApplication sendAction:to:from:] + 460 23 AppKit 0x00007fff8c811f12 -[NSControl sendAction:to:] + 86 24 AppKit 0x00007fff8c8911d5 -[NSTableView _sendAction:to:row:column:] + 111 25 AppKit 0x00007fff8c88f93e -[NSTableView mouseDown:] + 6067 26 AppKit 0x00007fff8c88df52 -[NSOutlineView mouseDown:] + 74 27 AIUtilities 0x0000000107b72c6f -[AIVariableHeightOutlineView mouseDown:] + 88 28 Adium 0x0000000107ce3d43 -[AIListOutlineView mouseDown:] + 388 29 AppKit 0x00007fff8cd633c9 -[NSWindow _handleMouseDownEvent:isDelayedEvent:] + 6322 30 AppKit 0x00007fff8cd643ad -[NSWindow _reallySendEvent:isDelayedEvent:] + 212 31 AppKit 0x00007fff8c7a3539 -[NSWindow sendEvent:] + 517 32 AppKit 0x00007fff8c723a38 -[NSApplication sendEvent:] + 2540 33 AppKit 0x00007fff8c58adf2 -[NSApplication run] + 796 34 AppKit 0x00007fff8c554368 NSApplicationMain + 1176 35 Adium 0x000000010789aaec Adium + 6892 36 ??? 0x0000000000000001 0x0 + 1 )

gdbinit commented 7 years ago

Adium must be run from /Applications only. It will not run from any other place other than /Applications/Adium.app. In the future it might be possible to relax this requirement but not now.

The best thing is to rename old application and copy/move the new one to /Applications to avoid any potential code signature issues when replacing the apps (also allowing you to use old Adium if necessary).

The sandbox error message will always appear when starting and that's good signal since it means the sandbox is working. I'll probably remove the error message in future releases.

I have to check the revocation error, probably trying to check if the certificate is blacklisted or something.