Codesigned sandox app issue?

Normally, user’s data and your app should be independent, so uninstalling and re-installing your app shouldn’t interfere with its data.

Sure! But the only way I found to make my app running again seems that, and is not a valid workaround…

You mean you also have to trash the data (outside of the bundle app) to make it working?
What if you try to clean (with AppCleaner) and put back the data before trying?

Here’s an article which should help you with that. https://ohanaware.com/blog/202052/Using-AppleScript-in-your-applications-with-App-Wrapper-4.html

Saving your app in the iCloud may also be a reason for problems with codesignin. AppWrapper will give you a warning about this, when you use the „Check“ function.

1 Like

Sure, and I tried to codesign outside the icloud folder, and nothing changed.

Sandbox: gamed(2110) deny(1) file-read-data /Users/sergio/Desktop/Gest-L - Website (UB)/Gest-L.app
Prompting policy for hardened runtime; service: kTCCServiceAppleEvents requires entitlement com.apple.security.automation.apple-events but it is missing for accessing={<TCCDProcess: identifier=com.system-i.gestl, pid=35370, auid=504, euid=504, binary_path=/Users/sergio/Desktop/Gest-L - Website (UB)/Gest-L.app/Contents/MacOS/Gest-L>}, requesting={<TCCDProcess: identifier=com.apple.appleeventsd, pid=519, auid=55, euid=55, binary_path=/System/Library/CoreServices/appleeventsd>},
Sandbox: Gest-L(35370) deny(1) nvram-get boot-args
Violation: deny(1) nvram-get boot-args
Process: Gest-L [35370]
Path: /Users/sergio/Desktop/Gest-L - Website (UB)/Gest-L.app/Contents/MacOS/Gest-L
Load Address: 0x1001ac000
Identifier: com.system-i.gestl
Version: 2335 (2022.5.1)
Code Type: arm64 (Native)
Parent Process: launchd [1]
Responsible: /Users/sergio/Desktop/Gest-L - Website (UB)/Gest-L.app/Contents/MacOS/Gest-L
User ID: 504

Date/Time: 2022-07-13 11:34:36.162 GMT+2
OS Version: macOS 12.4 (21F79)
Release Type: User
Report Version: 8

MetaData: {“platform-policy”:false,“errno”:1,“profile-flags”:0,“nvram-variable”:“boot-args”,“responsible-process-path”:“/Users/sergio/Desktop/Gest-L - Website (UB)/Gest-L.app/Contents/MacOS/Gest-L”,“uid”:504,“binary-in-trust-cache”:false,“team-id”:“65WV5BPG3S”,“primary-filter-value”:“boot-args”,“pid”:35370,“target”:“boot-args”,“platform_binary”:“no”,“profile-in-collection”:false,“responsible-process-team-id”:“65WV5BPG3S”,“responsible-process-signing-id”:“com.system-i.gestl”,“platform-binary”:false,“policy-description”:“Sandbox”,“process”:“Gest-L”,“build”:“macOS 12.4 (21F79)”,“flags”:5,“container”:“/Users/sergio/Library/Containers/com.system-i.gestl/Data”,“signing-id”:“com.system-i.gestl”,“operation”:“nvram-get”,“apple-internal”:false,“process-path”:“/Users/sergio/Desktop/Gest-L - Website (UB)/Gest-L.app/Contents/MacOS/Gest-L”,“normalized_target”:[“boot-args”],“hardware”:“J274”,“primary-filter”:“nvram-variable”,“action”:“deny”,“summary”:“deny(1) nvram-get boot-args”,“release-type”:“User”}

Thread 0 (id: 1800654):
0 libsystem_kernel.dylib 0x00000001a1ed68b0 mach_msg_trap + 8
1 IOKit 0x00000001a4a75498 io_registry_entry_get_property_bin_buf + 356
2 IOKit 0x00000001a49cef24 IORegistryEntrySearchCFProperty + 340
3 QuartzCore 0x00000001a8e732b0 init_debug(void*) + 528
4 libdispatch.dylib 0x00000001a1d501b4 _dispatch_client_callout + 20
5 libdispatch.dylib 0x00000001a1d51a34 _dispatch_once_callout + 32
6 QuartzCore 0x00000001a91040c8 -[CAContext initWithOptions:localContext:] + 820
7 QuartzCore 0x00000001a9103b80 -[CAContext initWithCGSConnection:options:] + 68
8 QuartzCore 0x00000001a8e72f38 +[CAContext contextWithCGSConnection:options:] + 68
9 AppKit 0x00000001a55e538c -[NSCGSWindow _updateLayer] + 364
10 AppKit 0x00000001a4c71328 -[NSCGSWindow(NSCGSWindowBackingStore) setHasBackingStore:] + 76
11 AppKit 0x00000001a4c71048 _NSCreateWindowWithOpaqueShape2 + 188
12 AppKit 0x00000001a4c7035c -[NSWindow _commonAwake] + 904
13 AppKit 0x00000001a4b5a230 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 804
14 AppKit 0x00000001a4b59af8 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 784
15 AppKit 0x00000001a4b597dc -[NSWindow initWithContentRect:styleMask:backing:defer:] + 56
16 XojoFramework 0x00000001030da9e0 WindowImpCocoa::WindowImpCocoa(Window*, string, xojo::Rectxojo::Points, Window::WindowType, int, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char) + 496
17 XojoFramework 0x00000001032949bc Window::Window(double, string, xojo::Rectxojo::Points, Window::WindowType, unsigned char, unsigned char, unsigned char, int, unsigned char, unsigned char, unsigned char) + 628
18 XojoFramework 0x000000010313ac7c RuntimeWindow::RuntimeWindow(double, string, xojo::Rectxojo::Points, Window::WindowType, unsigned char, unsigned char, unsigned char, int, unsigned char, unsigned char, unsigned char) + 204
19 XojoFramework 0x000000010313bf34 RuntimeViewWindow::RuntimeViewWindow(RuntimeView*, Window::WindowType, double) + 160
20 XojoFramework 0x000000010313b074 CreateStandAloneWindow(RuntimeView*, RuntimeView*) + 304
21 XojoFramework 0x000000010324d4e4 RuntimeCreateWindow + 836
22 Gest-L 0x000000010030d498 DesktopWindow.__Init%%o + 48
23 XojoFramework 0x00000001032392a8
24 XojoFramework 0x0000000103239168 RuntimeNewObject + 324
25 Gest-L 0x0000000100b3fcc0 FinestraMessaggio.FinestraMessaggio%o<FinestraMessaggio.FinestraMessaggio>% + 316
26 Gest-L 0x00000001006f70d8 App.AggiornamentoDatabaseV17%%o + 400
27 Gest-L 0x00000001006d9078 App.AggiornamentoDatabaseVersioni%%o + 8992
28 Gest-L 0x00000001006d52e0 App.AvvioProgramma%%ob + 7088
29 Gest-L 0x00000001006a8b78 App.Event_Open%%o + 268
30 XojoFramework 0x00000001030abf54 CocoaFinishApplicationStartup() + 184
31 XojoFramework 0x00000001030aaa80
32 CoreFoundation 0x00000001a1fd550c CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 28
33 CoreFoundation 0x00000001a2079c08 ___CFXRegistrationPost_block_invoke + 52
34 CoreFoundation 0x00000001a2079b74 _CFXRegistrationPost + 456
35 CoreFoundation 0x00000001a1fa41b0 _CFXNotificationPost + 732
36 Foundation 0x00000001a2e68cc8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96
37 AppKit 0x00000001a4b4e4fc -[NSApplication _postDidFinishNotification] + 340
38 AppKit 0x00000001a4b4e214 -[NSApplication _sendFinishLaunchingNotification] + 236
39 AppKit 0x00000001a4b45c24 _DPSNextEvent + 2036
40 AppKit 0x00000001a4b44084 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1328
41 XojoFramework 0x00000001030ac860
42 XojoFramework 0x00000001030ac8e8
43 Gest-L 0x0000000100249904 Application._CallFunctionWithExceptionHandling%%op + 164
44 XojoFramework 0x0000000103236da4 CallFunctionWithExceptionHandling(void (*)()) + 180
45 XojoFramework 0x00000001030ac884
46 AppKit 0x00000001a4b36250 -[NSApplication run] + 596
47 XojoFramework 0x000000010323561c RuntimeRun + 48
48 Gest-L 0x0000000100399954 REALbasic._RuntimeRun + 28
49 Gest-L 0x00000001017c5648 _Main + 528
50 Gest-L 0x00000001017c4538 main + 36
51 dyld 0x00000001022f508c start + 520

Thread 1 (id: 1800689):
0 libsystem_kernel.dylib 0x00000001a1ed7478 __getattrlist + 8
1 CoreServicesInternal 0x00000001a49556f0 prepareValuesForBitmap(__CFURL const*, __FileCache*, _FilePropertyBitmap*, __CFError**) + 452
2 CoreServicesInternal 0x00000001a49525ec _FSURLCopyResourcePropertyForKeyInternal(__CFURL const*, __CFString const*, void*, void*, __CFError**, unsigned char) + 236
3 CoreFoundation 0x00000001a1fb2dec CFURLCopyResourcePropertyForKey + 144
4 CoreFoundation 0x00000001a206b528 _VolumeIsAutomounted + 64
5 CoreFoundation 0x00000001a206b2d8 _VolumeObserverDiskAppearedCallback + 292
6 DiskArbitration 0x00000001a8ac95ec _DADispatchCallback + 264
7 DiskArbitration 0x00000001a8ac9234 _DASessionCallback + 276
8 DiskArbitration 0x00000001a8ac9110 __DASessionSetDispatchQueue_block_invoke_2 + 72
9 libdispatch.dylib 0x00000001a1d501b4 _dispatch_client_callout + 20
10 libdispatch.dylib 0x00000001a1d53670 _dispatch_continuation_pop + 500
11 libdispatch.dylib 0x00000001a1d668e0 _dispatch_source_invoke + 1596
12 libdispatch.dylib 0x00000001a1d57784 _dispatch_lane_serial_drain + 376
13 libdispatch.dylib 0x00000001a1d58404 _dispatch_lane_invoke + 392
14 libdispatch.dylib 0x00000001a1d62c98 _dispatch_workloop_worker_thread + 648
15 libsystem_pthread.dylib 0x00000001a1f10360 _pthread_wqthread + 288
16 libsystem_pthread.dylib 0x00000001a1f0f080 start_wqthread + 8

Thread 2 (id: 1800691):
0 libsystem_kernel.dylib 0x00000001a1ed872c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001a1f0f080 start_wqthread + 8

Thread 3 (id: 1800694):
0 libsystem_kernel.dylib 0x00000001a1ed872c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001a1f0f080 start_wqthread + 8

Thread 4 (id: 1800716):
0 libsystem_kernel.dylib 0x00000001a1ed872c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001a1f0f080 start_wqthread + 8

Thread 5 (id: 1800717):
0 libsystem_kernel.dylib 0x00000001a1ed872c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001a1f0f080 start_wqthread + 8

Binary Images:
0x1001ac000 - 0x101a07ff7 com.system-i.gestl (2022.5.1 - 2335) <84ee4e16-6f66-3306-82eb-d8d3b3955bb9> /Users/sergio/Desktop/Gest-L - Website (UB)/Gest-L.app/Contents/MacOS/Gest-L
0x1022f0000 - 0x10234d0bb dyld (957) /usr/lib/dyld
0x102fc4000 - 0x10335bff7 com.xojo.XojoFramework (1.0 - 2) <5fc63055-0f27-313a-9f68-c2e6077a16ea> /Users/sergio/Desktop/Gest-L - Website (UB)/Gest-L.app/Contents/Frameworks/XojoFramework.framework/Versions/A/XojoFramework
0x1a1d4c000 - 0x1a1d92ff7 libdispatch.dylib (1325.120.2) /usr/lib/system/libdispatch.dylib
0x1a1ed5000 - 0x1a1f0cffb libsystem_kernel.dylib (8020.121.3) <03f48dc5-caa7-3678-af61-1a3c7fa8b06e> /usr/lib/system/libsystem_kernel.dylib
0x1a1f0d000 - 0x1a1f19ff3 libsystem_pthread.dylib (486.100.11) <42166a2c-89a9-3c38-a215-f028544cea23> /usr/lib/system/libsystem_pthread.dylib
0x1a1f5c000 - 0x1a24a2ff1 com.apple.CoreFoundation (6.9 - 1863) <994db908-11a1-3e43-b7df-25c09d51368a> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x1a2e5f000 - 0x1a3250ffc com.apple.Foundation (6.9 - 1863) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x1a4951000 - 0x1a498dffb com.apple.CoreServicesInternal (484 - 484) <304148f1-c65f-3e9a-8e07-6ef3ef47e2a6> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal
0x1a49cc000 - 0x1a4aa2ff2 com.apple.framework.IOKit (2.0.2) <6a11949e-7c1e-3792-8a15-8c45d5c7e228> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x1a4b04000 - 0x1a59bbff9 com.apple.AppKit (6.9 - 2113.50.132) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x1a8ac7000 - 0x1a8acefff com.apple.DiskArbitration (2.7 - 2.7) <95956a3a-01b1-39eb-811e-d193b405766d> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x1a8e53000 - 0x1a9180ffc com.apple.QuartzCore (1.11 - 964.28) <7a5838a0-104b-3896-9c99-66ee81786497> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore

I solved my problem. It’s unbeliveable.

No plugins issue, no codesign issue… nothing! It was a simple db.begintransiction in a bad place.

I’m happy but I’m angry too, because in the non-sandboxed version I have no errors and all worked nice, in the sanboxed version I have no error but the application quits immediately!

I also add that I have a version of my application that use CubeSqlServer plugin, and it ever worked fine (sandboxed or not).

I think that it was one of my stupid errors, but there is some problem during the debug using the built-in sqlite functions, because if an instruction is wrong Xojo have to highlight that to me, sandboxed or not.

At the end of my problem, I have to thank all those who have tried to help me (and have given me many ideas to be able to find the error). Thank you!

1 Like