appcenter-sdk-apple icon indicating copy to clipboard operation
appcenter-sdk-apple copied to clipboard

[MSAppCenter startFromLibraryWithServices:] shouldn't attempt to use NSUserDefaults

Open davestjohn opened this issue 6 years ago • 9 comments
trafficstars

Description

Using [MSAppCenter startFromLibraryWithServices:<>] from an XPC service results in errors logged in the console on macOS Catalina. It is unclear if these errors prevent the actual data from being sent to the server but it appears it does.

Example:

Couldn't write values for keys ( pastDevicesKey ) in CFPrefsPlistSource<0x7fcfbe500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible

Repro Steps

Please list the steps used to reproduce your issue.

  1. Install macOS Catalina
  2. Run test that uses [MSAppCenter startFromLibraryWithServices...]
  3. Try to send some analytics

Details

  1. Which SDK version are you using?
    • 2.1.0
  2. Which OS version did you experience the issue on?
    • macOS Catalina beta 3
  3. Which Cocoapods version are you using (run pod --version)?
    • n/a
  4. What device version did you see this error on? Were you using an emulator or a physical device?
    • physical MacPro
  5. What language are you using?
    • [x] Objective C
    • [ ] Swift
  6. What third party libraries are you using?
  7. Please enable verbose logging for your app using MSAppCenter.setLogLevel(.verbose) before your call to MSAppCenter.start(...) for Swift, or [MSAppCenter setLogLevel:MSLogLevelVerbose] before [MSAppCenter start: ...] for Objective C and include the logs here:

default 13:08:07.579313-0400 sudo dstjohn : TTY=ttys002 ; PWD=/private/tmp/XRAnalytics.dst/Library/Frameworks ; USER=root ; COMMAND=/bin/pax -rw XeroxAnalytics.framework /Library/Frameworks default 13:09:31.321659-0400 pstoxrps XRAnalytics record being submitted: { CallingAppVersion = "8.1"; CallingApplication = Pages; ClientOSLang = "en-US"; DriverPort = dnssd; DriverVersion = "5.0.0"; NumberCopies = 1; NumberPages = 1; ProductModel = "Xerox AltaLink B8145"; "device_Id" = "D37CC166-3A15-5423-9C63-8C880C4BA685"; name = Print; paperSize = Letter; "session_Id" = "543DB164-99D2-433A-856D-1464BB84C819"; "user_Id" = "0B6BE2A9-BC8C-47F4-A15E-5AA63DE58CD6"; } default 13:09:31.324577-0400 kernel AMFI: '/Library/Frameworks/XeroxAnalytics.framework/Versions/A/XPCServices/XRAnalyticsCommunications.xpc/Contents/MacOS/XRAnalyticsCommunications' is adhoc signed. default 13:09:31.327106-0400 amfid /Library/Frameworks/XeroxAnalytics.framework/Versions/A/XPCServices/XRAnalyticsCommunications.xpc/Contents/MacOS/XRAnalyticsCommunications signature not valid: -67050 error 13:09:31.354018-0400 cfprefsd rejecting write of key(s) SessionIdHistory in { com.xerox.XRAnalyticsCommunications, _lp, kCFPreferencesAnyHost, no container, managed: 0 } from process 2699 (XRAnalyticsCommunications) because Path not accessible error 13:09:31.354110-0400 XRAnalyticsCommunications Couldn't write values for keys ( SessionIdHistory ) in CFPrefsPlistSource<0x7fcfbe500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible error 13:09:31.354944-0400 cfprefsd rejecting write of key(s) UserIdHistory in { com.xerox.XRAnalyticsCommunications, _lp, kCFPreferencesAnyHost, no container, managed: 0 } from process 2699 (XRAnalyticsCommunications) because Path not accessible error 13:09:31.355036-0400 XRAnalyticsCommunications Couldn't write values for keys ( UserIdHistory ) in CFPrefsPlistSource<0x7fcfbe500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible error 13:09:31.355627-0400 cfprefsd rejecting write of key(s) MSInstallId in { com.xerox.XRAnalyticsCommunications, _lp, kCFPreferencesAnyHost, no container, managed: 0 } from process 2699 (XRAnalyticsCommunications) because Path not accessible error 13:09:31.355715-0400 XRAnalyticsCommunications Couldn't write values for keys ( MSInstallId ) in CFPrefsPlistSource<0x7fcfbe500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible default 13:09:31.357872-0400 XRAnalyticsCommunications nw_path_evaluator_start [481E872D-E2A4-4F44-8E44-2AC6FDBFD810 <NULL> generic, indefinite] path: satisfied (Path is satisfied), interface: en0, ipv4, dns default 13:09:31.358252-0400 XRAnalyticsCommunications nw_path_evaluator_start [481E872D-E2A4-4F44-8E44-2AC6FDBFD810 <NULL> generic, indefinite] path: satisfied (Path is satisfied), interface: en0, ipv4, dns error 13:09:31.360382-0400 cfprefsd rejecting write of key(s) pastSessionsKey in { com.xerox.XRAnalyticsCommunications, _lp, kCFPreferencesAnyHost, no container, managed: 0 } from process 2699 (XRAnalyticsCommunications) because Path not accessible error 13:09:31.360476-0400 XRAnalyticsCommunications Couldn't write values for keys ( pastSessionsKey ) in CFPrefsPlistSource<0x7fcfbe500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible default 13:09:31.361361-0400 XRAnalyticsCommunications [AppCenter] WARNING: -[MSAuthTokenContext authTokenHistory]/210 Failed to retrieve history state or none was found. default 13:09:31.361434-0400 XRAnalyticsCommunications [AppCenter] WARNING: -[MSAuthTokenContext setAuthTokenHistory:]/225 Failed to save new history state. default 13:09:31.364326-0400 XRAnalyticsCommunications Set a breakpoint at SLSLogBreak to catch errors/faults as they are logged. error 13:09:31.364609-0400 XRAnalyticsCommunications This user is not allowed access to the window system right now. error 13:09:31.364691-0400 XRAnalyticsCommunications 0 is not a valid connection ID. error 13:09:31.364717-0400 XRAnalyticsCommunications 0 is not a valid connection ID. error 13:09:31.364737-0400 XRAnalyticsCommunications 0 is not a valid connection ID. error 13:09:31.364756-0400 XRAnalyticsCommunications 0 is not a valid connection ID. default 13:09:31.365896-0400 XRAnalyticsCommunications FRONTLOGGING: version 1 default 13:09:31.365917-0400 XRAnalyticsCommunications Registering, pid=2699 default 13:09:31.369441-0400 XRAnalyticsCommunications CHECKIN: pid=2699 default 13:09:31.377212-0400 runningboardd Resolved pid 2699 to [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:2699] default 13:09:31.378530-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:2699] This process will not be managed. default 13:09:31.378565-0400 runningboardd Now tracking process: [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:2699] default 13:09:31.378993-0400 runningboardd Acquiring assertion targeting xpcservice<com.xerox.XRAnalyticsCommunications(26)> from originator [daemon<com.apple.coreservices.launchservicesd>:156] with description <RBSAssertionDescriptor; backgroundApp:2699; ID: 326-156-519; target: 2699> attributes = { <RBSDomainAttribute: 0x7ffca8f0b860; domain: com.apple.launchservicesd; name: RoleNonUserInteractive; sourceEnvironment: 0x0>; } default 13:09:31.379133-0400 runningboardd Assertion 326-156-519 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) will be created as active default 13:09:31.379611-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:2699] Ignoring jetsam update because this process is not memory-managed default 13:09:31.379637-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:2699] Ignoring resume because this process is not lifecycle managed default 13:09:31.379637-0400 runningboardd Finished acquiring assertion 326-156-519 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) default 13:09:31.379669-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:2699] Error 45 setting darwin role to NonUserInteractive: Operation not supported, falling back to setting priority default 13:09:31.379837-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:2699] Set darwin priority to: PRIO_DEFAULT default 13:09:31.380023-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:2699] Ignoring GPU update because this process is not GPU managed default 13:09:31.380345-0400 runningboardd Acquiring assertion targeting xpcservice<com.xerox.XRAnalyticsCommunications(26)> from originator [daemon<com.apple.coreservices.launchservicesd>:156] with description <RBSAssertionDescriptor; backgroundApp:2699; ID: 326-156-520; target: 2699> attributes = { <RBSDomainAttribute: 0x7ffcaa212a70; domain: com.apple.launchservicesd; name: RoleNonUserInteractive; sourceEnvironment: 0x0>; } default 13:09:31.380556-0400 runningboardd Assertion 326-156-520 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) will be created as active default 13:09:31.380995-0400 XRAnalyticsCommunications CHECKEDIN: pid=2699 asn=0x0-0xd20d2 foreground=0 default 13:09:31.380848-0400 launchservicesd CHECKIN:0x0-0xd20d2 2699 com.xerox.XRAnalyticsCommunications default 13:09:31.380997-0400 runningboardd Finished acquiring assertion 326-156-520 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) default 13:09:31.381042-0400 runningboardd Invalidating assertion 326-156-519 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) from originator 156 default 13:09:31.385063-0400 XRAnalyticsCommunications Registered, pid=2699 ASN=0x0,0xd20d2 error 13:09:31.386977-0400 XRAnalyticsCommunications 0 is not a valid connection ID. error 13:09:31.387001-0400 XRAnalyticsCommunications 0 is not a valid connection ID. error 13:09:31.387080-0400 XRAnalyticsCommunications 0 is not a valid connection ID. default 13:09:31.387103-0400 XRAnalyticsCommunications Invalid Connection ID 0 error 13:09:31.388169-0400 cfprefsd rejecting write of key(s) pastDevicesKey in { com.xerox.XRAnalyticsCommunications, _lp, kCFPreferencesAnyHost, no container, managed: 0 } from process 2699 (XRAnalyticsCommunications) because Path not accessible error 13:09:31.388267-0400 XRAnalyticsCommunications Couldn't write values for keys ( pastDevicesKey ) in CFPrefsPlistSource<0x7fcfbe500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible default 13:09:31.389090-0400 XRAnalyticsCommunications [AppCenter] ERROR: +[MSDBStorage executeNonSelectionQuery:inOpenedDatabase:]/255 Query "INSERT INTO "logs" ("groupId", "log", "priority", "timestamp") VALUES ('Analytics', 'YnBsaXN0MDDUAAEAAgADAAQABQAGAAcAClgkdmVyc2lvblkkYXJjaGl2ZXJUJHRvcFgkb2JqZWN0cxIAAYagXxAPTlNLZXllZEFyY2hpdmVy0QAIAAlUcm9vdIABrxBBAAsADAAjACQAKAAuAFwAXQBeAF8AYABhAGIAYwBkAGUAZgBnAGgAaQBtAG4AbwBzAJMAlACVAJYAlwCYAJkAmgCbAJwAnQCeAJ8AoACmAKcAqACtALIAtwC4AL0AwgDDAMgAyQDOAM8A1ADVANoA2wDgAOEA5gDnAOwA8QDyAPYA+lUkbnVsbNsADQAOAA8AEAARABIAEwAUABUAFgAXABgAGQAaABsAHAAdABkAGQAgACEAGVZkZXZpY2VWdXNlcklkVG5hbWVSaWRfEA90eXBlZFByb3BlcnRpZXNWJGNsYXNzWnByb3BlcnRpZXNTc2lkWXRpbWVzdGFtcFR0eXBlXxATZGlzdHJpYnV0aW9uR3JvdXBJZIAFgACAFIAVgBaAQIAAgACAA4ACgABVZXZlbnTSACUAEgAmACdXTlMudGltZSNBwWx7Ja5Sg4AE0gApACoAKwAsWiRjbGFzc25hbWVYJGNsYXNzZXNWTlNEYXRlogArAC1YTlNPYmplY3TfEBcALwAwADEAMgASADMANAA1ADYANwA4ADkAOgA7ADwAPQA+AD8AQABBAEIAQwBEAEUARgBHABkASQBKABkAGQBNAE4AGQAZABkAGQBTAFQAVQBWABkAGQBZAFoAW1lvc1ZlcnNpb25edGltZVpvbmVPZmZzZXRYYXBwQnVpbGRfEBVsaXZlV<…> default 13:09:35.391422-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:2699] Death sentinel fired! default 13:09:35.392647-0400 runningboardd Invalidating assertion 326-156-520 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) from originator 156 default 13:09:35.493077-0400 runningboardd Removing process: [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:2699] default 13:09:35.495628-0400 runningboardd Removing assertions for terminated process: [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:2699] default 13:53:14.628760-0400 sudo dstjohn : TTY=ttys002 ; PWD=/private/tmp/XRAnalytics.dst/Library/Frameworks ; USER=root ; COMMAND=/bin/pax -rw XeroxAnalytics.framework /Library/Frameworks default 13:54:14.071182-0400 pstoxrps XRAnalytics record being submitted: { CallingAppVersion = "8.1"; CallingApplication = Pages; ClientOSLang = "en-US"; DriverPort = dnssd; DriverVersion = "5.0.0"; NumberCopies = 1; NumberPages = 1; ProductModel = "Xerox AltaLink B8145"; "device_Id" = "D37CC166-3A15-5423-9C63-8C880C4BA685"; name = Print; paperSize = Letter; "session_Id" = "81DC01EF-44FC-49E9-A28B-FEDD79336436"; "user_Id" = "0B6BE2A9-BC8C-47F4-A15E-5AA63DE58CD6"; } default 13:54:14.074632-0400 kernel AMFI: '/Library/Frameworks/XeroxAnalytics.framework/Versions/A/XPCServices/XRAnalyticsCommunications.xpc/Contents/MacOS/XRAnalyticsCommunications' is adhoc signed. default 13:54:14.077219-0400 amfid /Library/Frameworks/XeroxAnalytics.framework/Versions/A/XPCServices/XRAnalyticsCommunications.xpc/Contents/MacOS/XRAnalyticsCommunications signature not valid: -67050 error 13:54:14.104903-0400 cfprefsd rejecting write of key(s) SessionIdHistory in { com.xerox.XRAnalyticsCommunications, _lp, kCFPreferencesAnyHost, no container, managed: 0 } from process 3150 (XRAnalyticsCommunications) because Path not accessible error 13:54:14.105005-0400 XRAnalyticsCommunications Couldn't write values for keys ( SessionIdHistory ) in CFPrefsPlistSource<0x7fe7d5500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible error 13:54:14.105850-0400 cfprefsd rejecting write of key(s) UserIdHistory in { com.xerox.XRAnalyticsCommunications, _lp, kCFPreferencesAnyHost, no container, managed: 0 } from process 3150 (XRAnalyticsCommunications) because Path not accessible error 13:54:14.105911-0400 XRAnalyticsCommunications Couldn't write values for keys ( UserIdHistory ) in CFPrefsPlistSource<0x7fe7d5500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible error 13:54:14.106525-0400 cfprefsd rejecting write of key(s) MSInstallId in { com.xerox.XRAnalyticsCommunications, _lp, kCFPreferencesAnyHost, no container, managed: 0 } from process 3150 (XRAnalyticsCommunications) because Path not accessible error 13:54:14.106617-0400 XRAnalyticsCommunications Couldn't write values for keys ( MSInstallId ) in CFPrefsPlistSource<0x7fe7d5500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible default 13:54:14.108773-0400 XRAnalyticsCommunications nw_path_evaluator_start [5729982A-E16A-45BF-903A-9443A6826FF1 <NULL> generic, indefinite] path: satisfied (Path is satisfied), interface: en0, ipv4, dns default 13:54:14.109147-0400 XRAnalyticsCommunications nw_path_evaluator_start [5729982A-E16A-45BF-903A-9443A6826FF1 <NULL> generic, indefinite] path: satisfied (Path is satisfied), interface: en0, ipv4, dns default 13:54:14.110829-0400 XRAnalyticsCommunications [AppCenter] INFO: -[MSAppCenter configureWithAppSecret:transmissionTargetToken:fromApplication:]/281 App Center SDK configured from a library successfully. default 13:54:14.110894-0400 XRAnalyticsCommunications [AppCenter] VERBOSE: -[MSAppCenter start:withServices:fromApplication:]/296 Start services MSAnalytics from a library error 13:54:14.111484-0400 cfprefsd rejecting write of key(s) pastSessionsKey in { com.xerox.XRAnalyticsCommunications, _lp, kCFPreferencesAnyHost, no container, managed: 0 } from process 3150 (XRAnalyticsCommunications) because Path not accessible error 13:54:14.111561-0400 XRAnalyticsCommunications Couldn't write values for keys ( pastSessionsKey ) in CFPrefsPlistSource<0x7fe7d5500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible default 13:54:14.112057-0400 XRAnalyticsCommunications [AppCenterAnalytics] INFO: -[MSAnalytics applyEnabledState:]/154 Analytics service has been enabled. default 13:54:14.112384-0400 XRAnalyticsCommunications [AppCenterAnalytics] VERBOSE: -[MSAnalytics startWithChannelGroup:appSecret:transmissionTargetToken:fromApplication:]/106 Started Analytics service. default 13:54:14.112571-0400 XRAnalyticsCommunications [AppCenter] WARNING: -[MSAuthTokenContext authTokenHistory]/210 Failed to retrieve history state or none was found. default 13:54:14.112631-0400 XRAnalyticsCommunications [AppCenter] WARNING: -[MSAuthTokenContext setAuthTokenHistory:]/225 Failed to save new history state. default 13:54:14.112718-0400 XRAnalyticsCommunications [AppCenter] INFO: -[MSChannelUnitDefault authTokenContext:didUpdateAuthToken:]_block_invoke/105 New auth token received, flushing queue. default 13:54:14.112798-0400 XRAnalyticsCommunications [AppCenter] INFO: -[MSChannelUnitDefault authTokenContext:didUpdateAuthToken:]_block_invoke/105 New auth token received, flushing queue. default 13:54:14.112854-0400 XRAnalyticsCommunications [AppCenter] INFO: -[MSChannelUnitDefault authTokenContext:didUpdateAuthToken:]_block_invoke/105 New auth token received, flushing queue. default 13:54:14.112905-0400 XRAnalyticsCommunications [AppCenter] INFO: -[MSChannelUnitDefault authTokenContext:didUpdateAuthToken:]_block_invoke/105 New auth token received, flushing queue. default 13:54:14.112955-0400 XRAnalyticsCommunications [AppCenter] INFO: -[MSChannelUnitDefault authTokenContext:didUpdateAuthToken:]_block_invoke/105 New auth token received, flushing queue. default 13:54:14.113002-0400 XRAnalyticsCommunications [AppCenter] INFO: -[MSChannelUnitDefault authTokenContext:didUpdateAuthToken:]_block_invoke/105 New auth token received, flushing queue. default 13:54:14.115556-0400 XRAnalyticsCommunications Set a breakpoint at SLSLogBreak to catch errors/faults as they are logged. error 13:54:14.115583-0400 XRAnalyticsCommunications This user is not allowed access to the window system right now. error 13:54:14.115638-0400 XRAnalyticsCommunications 0 is not a valid connection ID. error 13:54:14.115658-0400 XRAnalyticsCommunications 0 is not a valid connection ID. error 13:54:14.115675-0400 XRAnalyticsCommunications 0 is not a valid connection ID. error 13:54:14.115691-0400 XRAnalyticsCommunications 0 is not a valid connection ID. default 13:54:14.116758-0400 XRAnalyticsCommunications FRONTLOGGING: version 1 default 13:54:14.116780-0400 XRAnalyticsCommunications Registering, pid=3150 default 13:54:14.120366-0400 XRAnalyticsCommunications CHECKIN: pid=3150 default 13:54:14.128117-0400 runningboardd Resolved pid 3150 to [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:3150] default 13:54:14.129452-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:3150] This process will not be managed. default 13:54:14.129487-0400 runningboardd Now tracking process: [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:3150] default 13:54:14.129914-0400 runningboardd Acquiring assertion targeting xpcservice<com.xerox.XRAnalyticsCommunications(26)> from originator [daemon<com.apple.coreservices.launchservicesd>:156] with description <RBSAssertionDescriptor; backgroundApp:3150; ID: 326-156-631; target: 3150> attributes = { <RBSDomainAttribute: 0x7ffcaa229980; domain: com.apple.launchservicesd; name: RoleNonUserInteractive; sourceEnvironment: 0x0>; } default 13:54:14.130042-0400 runningboardd Assertion 326-156-631 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) will be created as active default 13:54:14.130562-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:3150] Ignoring jetsam update because this process is not memory-managed default 13:54:14.130580-0400 runningboardd Finished acquiring assertion 326-156-631 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) default 13:54:14.130587-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:3150] Ignoring resume because this process is not lifecycle managed default 13:54:14.130669-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:3150] Error 45 setting darwin role to NonUserInteractive: Operation not supported, falling back to setting priority default 13:54:14.130738-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:3150] Set darwin priority to: PRIO_DEFAULT default 13:54:14.130896-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:3150] Ignoring GPU update because this process is not GPU managed default 13:54:14.131205-0400 runningboardd Acquiring assertion targeting xpcservice<com.xerox.XRAnalyticsCommunications(26)> from originator [daemon<com.apple.coreservices.launchservicesd>:156] with description <RBSAssertionDescriptor; backgroundApp:3150; ID: 326-156-632; target: 3150> attributes = { <RBSDomainAttribute: 0x7ffca8c0f460; domain: com.apple.launchservicesd; name: RoleNonUserInteractive; sourceEnvironment: 0x0>; } default 13:54:14.131409-0400 runningboardd Assertion 326-156-632 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) will be created as active default 13:54:14.131717-0400 launchservicesd CHECKIN:0x0-0x100100 3150 com.xerox.XRAnalyticsCommunications default 13:54:14.131861-0400 XRAnalyticsCommunications CHECKEDIN: pid=3150 asn=0x0-0x100100 foreground=0 default 13:54:14.131798-0400 runningboardd Finished acquiring assertion 326-156-632 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) default 13:54:14.131805-0400 runningboardd Invalidating assertion 326-156-631 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) from originator 156 default 13:54:14.135859-0400 XRAnalyticsCommunications Registered, pid=3150 ASN=0x0,0x100100 error 13:54:14.137876-0400 XRAnalyticsCommunications 0 is not a valid connection ID. error 13:54:14.137903-0400 XRAnalyticsCommunications 0 is not a valid connection ID. error 13:54:14.137986-0400 XRAnalyticsCommunications 0 is not a valid connection ID. default 13:54:14.138009-0400 XRAnalyticsCommunications Invalid Connection ID 0 error 13:54:14.139049-0400 cfprefsd rejecting write of key(s) pastDevicesKey in { com.xerox.XRAnalyticsCommunications, _lp, kCFPreferencesAnyHost, no container, managed: 0 } from process 3150 (XRAnalyticsCommunications) because Path not accessible error 13:54:14.139126-0400 XRAnalyticsCommunications Couldn't write values for keys ( pastDevicesKey ) in CFPrefsPlistSource<0x7fe7d5500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible default 13:54:14.139317-0400 XRAnalyticsCommunications [AppCenter] DEBUG: -[MSChannelUnitDefault enqueueItem:flags:]_block_invoke/187 Saving log, type: event, flags: 1. default 13:54:14.140011-0400 XRAnalyticsCommunications [AppCenter] ERROR: +[MSDBStorage executeNonSelectionQuery:inOpenedDatabase:]/255 Query "INSERT INTO "logs" ("groupId", "log", "priority", "timestamp") VALUES ('Analytics', 'YnBsaXN0MDDUAAEAAgADAAQABQAGAAcAClgkdmVyc2lvblkkYXJjaGl2ZXJUJHRvcFgkb2JqZWN0cxIAAYagXxAPTlNLZXllZEFyY2hpdmVy0QAIAAlUcm9vdIABrxBBAAsADAAjACQAKAAuAFwAXQBeAF8AYABhAGIAYwBkAGUAZgBnAGgAaQBtAG4AbwBzAJMAlACVAJYAlwCYAJkAmgCbAJwAnQCeAJ8AoACmAKcAqACtALIAtwC4AL0AwgDDAMgAyQDOAM8A1ADVANoA2wDgAOEA5gDnAOwA8QDyAPYA+lUkbnVsbNsADQAOAA8AEAARABIAEwAUABUAFgAXABgAGQAaABsAHAAdABkAGQAgACEAGVZkZXZpY2VWdXNlcklkVG5hbWVSaWRfEA90eXBlZFByb3BlcnRpZXNWJGNsYXNzWnByb3BlcnRpZXNTc2lkWXRpbWVzdGFtcFR0eXBlXxATZGlzdHJpYnV0aW9uR3JvdXBJZIAFgACAFIAVgBaAQIAAgACAA4ACgABVZXZlbnTSACUAEgAmACdXTlMudGltZSNBwWyAYw56W4AE0gApACoAKwAsWiRjbGFzc25hbWVYJGNsYXNzZXNWTlNEYXRlogArAC1YTlNPYmplY3TfEBcALwAwADEAMgASADMANAA1ADYANwA4ADkAOgA7ADwAPQA+AD8AQABBAEIAQwBEAEUARgBHABkASQBKABkAGQBNAE4AGQAZABkAGQBTAFQAVQBWABkAGQBZAFoAW1lvc1ZlcnNpb25edGltZVpvbmVPZmZzZXRYYXBwQnVpbGRfEBVsaXZlV<…> default 13:54:18.142132-0400 runningboardd [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:3150] Death sentinel fired! default 13:54:18.143383-0400 runningboardd Invalidating assertion 326-156-632 (target:xpcservice<com.xerox.XRAnalyticsCommunications(26)>) from originator 156 default 13:54:18.250953-0400 runningboardd Removing process: [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:3150] default 13:54:18.253827-0400 runningboardd Removing assertions for terminated process: [xpcservice<com.xerox.XRAnalyticsCommunications(26)>:3150] default 13:57:11.939199-0400 sudo dstjohn : TTY=ttys000 ; PWD=/Users/dstjohn/Desktop ; USER=root ; COMMAND=/usr/bin/log collect --predicate=XRAnalyticsCommunication default 13:57:21.080451-0400 sudo dstjohn : TTY=ttys000 ; PWD=/Users/dstjohn/Desktop ; USER=root ; COMMAND=/usr/bin/log collect --predicate XRAnalyticsCommunication

davestjohn avatar Jul 12 '19 17:07 davestjohn

Hey, @davestjohn, thanks for getting in touch.

I apology, but the error you have posted doesn't look like error from our SDK, it looks more like error from XRAnalytics, can you elaborate on this one? As for the Catalina support - highest macOS version we currently support is Mojave. I'll give this a link to this issue to our PM to take a look at your request for Catalina support.

Jamminroot avatar Jul 14 '19 19:07 Jamminroot

The errors are coming from AppCenter not XRAnalytics, look at this message

default 13:54:14.110894-0400 XRAnalyticsCommunications [AppCenter] VERBOSE: -[MSAppCenter start:withServices:fromApplication:]/296 Start services MSAnalytics from a library

error 13:54:14.111484-0400 cfprefsd rejecting write of key(s) pastSessionsKey in { com.xerox.XRAnalyticsCommunications, _lp, kCFPreferencesAnyHost, no container, managed: 0 } from process 3150 (XRAnalyticsCommunications) because Path not accessible

error 13:54:14.111561-0400 XRAnalyticsCommunications Couldn't write values for keys ( pastSessionsKey ) in CFPrefsPlistSource<0x7fe7d5500de0> (Domain: com.xerox.XRAnalyticsCommunications, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible

The key 'pastSessionsKey' is not part of XRAnalytics but is found in the AppCenter SDK code so the error belongs to the SDK which is trying to write to the user defaults and the user in question '_lp' doesn't allow that.

davestjohn avatar Jul 15 '19 13:07 davestjohn

@davestjohn sorry for misunderstanding, I looked at different error message in log outputs you sent. I assume that the problem origins in your OS version, so it comes down to Catalina support. We'll let our PM look at your request.

Jamminroot avatar Jul 16 '19 14:07 Jamminroot

It gets lost in the noise but the main issue is trying to write to the database in /Users//Library/Application Support//com.microsoft.appcenter

I'm using the SDK from a non-user process which doesn't have read/write permissions for the users home directory, so this call is part of the problem:

MSUtility+File.m: line 160 NSArray<NSURL *> *urls = [fileManager URLsForDirectory:directory inDomains:NSUserDomainMask];

There needs to be a way to either change the domain or assume NSSystemDomainMask if loaded from a library.

davestjohn avatar Jul 17 '19 20:07 davestjohn

/Users//Library/Application Support//com.microsoft.appcenter

This should have been, /Users//Library/Application Support/my-bundle-id/com.microsoft.appcenter

davestjohn avatar Jul 17 '19 20:07 davestjohn

Sorry, currently we don't support this.

hamswan avatar Jul 18 '19 19:07 hamswan

We will continue to track this for future interest

hamswan avatar Jul 18 '19 19:07 hamswan

Hi @davestjohn, I would like to refresh the status of this feature request. Could you please confirm that this feature is still relevant for you?

DmitriyKirakosyan avatar Dec 14 '21 08:12 DmitriyKirakosyan

This feature is still relevant to me, and much desired. An additional piece of this is my app is a stand-alone executable and doesn't have a bundle-id so relying on bundle id and NSUserDomainMask are bad assumptions.

davestjohn avatar Dec 14 '21 13:12 davestjohn

As we do not have plans to add support for this feature in the next year, I'm closing the issue.

DmitriyKirakosyan avatar Oct 18 '23 10:10 DmitriyKirakosyan