XPC Service NSCocoaError domain - xcode

I've written an Application that uses XPC Service to communicate with its helper. The application launches and works as expected within Xcode.
However, the following error appears when I try to run the application outside of Xcode after I Archive it.
HideMyMac[27183:936477] XPCService error: Error
Domain=NSCocoaErrorDomain Code=4097 "connection to service named
io.jabbari.HideMyMac.HideMyMac-XPCService" UserInfo=
{NSDebugDescription=connection to service named
io.jabbari.HideMyMac.HideMyMac-XPCService}
Here is the source of this application on Github. I normally would provide source with my code, however, the xml style plists would clutter the page and take away from the post.
Here what I have attempted:
Step 1: Updated - Main App Target -> Capabilities Tab
Turned on 'App Sandbox'
Turned on 'App Groups'
Added an app group - 'XYZ'
Step 2: Updated - Helper Target -> Capabilities Tab
Turned on 'App Sandbox'
Enabled 'Outgoing Connections (Client)'
Turned on 'App Groups'
Added an app group - 'XYZ'
What am I missing anything?

This is probably not a good question for StackOverflow, because it's a very project-specific configuration issue.
The actual problem you're running into is that the XPCService crashes immediately:
HideMyMac[5999]: XPCService error: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named io.jabbari.HideMyMac-XPCService" UserInfo={NSDebugDescription=connection to service named io.jabbari.HideMyMac-XPCService}
ReportCrash[5995]: Saved crash report for HideMyMac-XPCService[6000] version ??? to …
this is because the SMJobKit framework cannot be found by the dynamic loader at the expected place:
Dyld Error Message:
Library not loaded: #rpath/SMJobKit.framework/Versions/A/SMJobKit
Referenced from: /Users/USER/Library/Developer/Xcode/Archives/2016-02-24/HideMyMac 24.02.16, 16.32.xcarchive/Products/Applications/HideMyMac.app/Contents/XPCServices/HideMyMac-XPCService.xpc/Contents/MacOS/HideMyMac-XPCService
Reason: image not found
So, you should check the copy files / embed framework phases in Xcode's build phases tab.

Related

SwiftUI previews error: Connecting to launched interactive agent

I received the above error when using the SwiftUI previews feature and can't figure out why this happens. The error always looks something like this:
GenericHumanReadableError: unexpected error occurred
messageRepliedWithError("Connecting to launched interactive agent 1894", Optional(Error Domain=com.apple.dt.xcodepreviews.service Code=17 "connectToPreviewHost: Failed to connect to 1894: (null)" UserInfo={NSLocalizedDescription=connectToPreviewHost: Failed to connect to 1894: (null)}))
I managed to figure out a good way to debug this, please see below
If you head into /Users/USERNAME/Library/Logs/DiagnosticReports you will see the latest crash reports. Open the most recent one (should start with your app name), and it should tell you the reason the app crashed. It'll look something like this:
Application Specific Information:
Fatal error: This request requires an authenticated account: file /Users/USERNAME/Work/AppName/Models/CloudKitAlbumManager.swift, line 101
In my case, it was a fatalError i threw in development for debugging. The previews loads your app and thus call your whole stack and will crash if you like me throws fatalErrors for debugging.
I hope this helps

app.R did not return a shiny.appobj object error after deploying local shiny app

shiny app with two files (app.R and data.RDS) on local computer works
deploy shiny app to shinyapps.io
receives the following error during deployment
An error has occurred
The application failed to start.
Error in value[3L] : app.R did not return a shiny.appobj object. Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> Execution halted
tries to debug error and finds the following page http://shiny.rstudio.com/articles/single-file.html referenced by another question here on google group
I'm stuck as to how to debug this issue. Is this saying app.R needs to split into two files? If no, what are the steps I can do to fix/debug this error?

NSURLSession/NSURLConnection HTTP load failed on OSX app

i am testing OSX application that fetch remote server links like https://www.google-analytics.com/collect.
I have found many questions about that but can't find match answer for that .The error i am getting are
NSURLSession/NSURLConnection HTTP load failed
Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" UserInfo={_kCFStreamErrorCodeKey=1, _kCFStreamErrorDomainKey=1}
App use "APP SANDBOX" with "com.apple.security.network.server" set to true , all normal http links are working except secure https links.
NSAllowsArbitraryLoads set to true as well.
What i found so far is if APP PROJECT is turn on "ENABLE DEVELOPER SIGNING" , it doesn't work.
However if APP PROJECT is turn off "DEVELOPER SIGNING" , it work.
Any idea what it could be and how to solve?
Regards,
John
I already found out why,
I answered the question here
Technically you need to check the
Outgoing Connections
from Capabilities>App Sanbox

APNS Error in registration. Error: Error Domain=NSCocoaErrorDomain Code=3000

Hello everyone i have beenn working in several projects and all push notification were working either on developemnt or prodcution. However i am not getting this error : "Error in registration. Error: Error Domain=NSCocoaErrorDomain Code=3000" since yesterday. I have tried to create a new provisioning but its shut down for maintenance. Is it due to this?
Thanks in advance.
Ensure the Bundle Identifier matches the one in your project's
plist.
Create a new App ID, and configure it for production/development
push before creating a new provisioning profile.
Make sure you're build and archiving on the right target, with the
right configuration. You might need to go back to project settings
and double check with the correct configuration selected (I use
release for this).

allowDefinition='MachineToApplication' - MVC3 ERROR

I'm developing an application in MVC3 (http://www.colombiatrolley.com/sitrolley). In my computer it runs correctly, but when I upload it to the server (a hosting service) I get this error:
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
I know it is a very common error but I have not fixed it yet.
Some config sections are only allowed at the "root" of the application, then authentication section is one of them.
You need to configure IIS to run your your site as an application, not a sub-directory in an existing application.
For IIS 7+, right click the directory that contains your web application, and select "Convert to Application".
EDIT:
Arie van Someren is right. Looking carefully at your error, you want the <authentication> configuration to be in the web.config one level up, not the web.config in Views.
I had the same problem. I solved it by deleting the obj folder that appeared after doing a "Build > Publish".

Resources