Skip to main content

Getting "A server with the specified hostname could not be found" error

Updated over a month ago

Issue

I have setup Sentry for macOS, but no events are showing up in Sentry.

I can see the Xcode logs say:

"NSLocalizedDescription=A server with the specified hostname could not be found.,
NSErrorFailingURLStringKey=https://o{ORG_ID}.ingest.us.sentry.io/api/{PROJECT_ID/envelope/"

However, I am sure I am setting the correct DSN.

I have tried the SPM and CocoaPods integrations both with the same error.

Applies To

  • All SaaS Customers

  • Error Monitoring

  • Cocoa SDK on macOS

Resolution

macOS requires you to tick App Sanbox capabilities for network connections like below:

Screenshot 2024-07-03 at 10.21.10.png

This should fix the issue and allow your events to reach Sentry.

Did this answer your question?