sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Couldn't read values in CFPrefsPlistSource. CRASH

Open RadagastCH opened this issue 1 year ago • 6 comments

Platform

macOS

Environment

Production, Develop, TestFlight, Other

Installed

Swift Package Manager

Version

8.22.4

Did it work on previous versions?

8.21.0

Steps to Reproduce

  1. macOS app with extensions that used Sentry
  2. Try to run anything above 8.21.0 installed via SPM

Expected Result

No Crash

Actual Result

CleanShot 2024-03-27 at 12 03 33@2x

Are you willing to submit a PR?

No response

RadagastCH avatar Mar 27 '24 10:03 RadagastCH

@RadagastCH, are you 100% sure this error is related to the sentry-cocoa SDK? Does the error disappear when you roll back to 8.21.0?

When looking at suggestions to solve this error on this Stackoverflow post, I have a hard time figuring out how our SDK could cause this error.

philipphofmann avatar Mar 27 '24 11:03 philipphofmann

@RadagastCH, are you 100% sure this error is related to the sentry-cocoa SDK? Does the error disappear when you roll back to 8.21.0?

When looking at suggestions to solve this error on this Stackoverflow post, I have a hard time figuring out how our SDK could cause this error.

Yep, we don't have any problems with version 8.21.0, but we are experiencing crashes with any versions higher than that. We only change the version in SPM and make no other change.

RadagastCH avatar Mar 27 '24 11:03 RadagastCH

@RadagastCH, again looking at this issue, I guess that it has something to do with

macOS app with extensions that used Sentry

What exactly do you mean by that? Which extensions are you using?

philipphofmann avatar Apr 02 '24 12:04 philipphofmann

@philipphofmann It's more likely that the warning is not related to the problem. It seems the main issue is "Unable to find class: SentryCrashExceptionApplication, exiting." image

It looks like it's not a crash but just a termination.

In fact, we see these classes in the headers.

@RadagastCH, again looking at this issue, I guess that it has something to do with

macOS app with extensions that used Sentry

What exactly do you mean by that? Which extensions are you using?

We are using the app as an extension for Apple Photos and Adobe products. But I'm not so sure it has anything to do with that.

RadagastCH avatar Apr 03 '24 10:04 RadagastCH

It appears we can resolve the issue by adding this code somewhere:

[SentryCrashExceptionApplication.sharedApplication description];

RadagastCH avatar Apr 03 '24 10:04 RadagastCH

Thanks @RadagastCH - looks like this is related to some optimization/code stripping. As a potential workaround we could call [SentryCrashExceptionApplication.sharedApplication description]; in the SDK code somewhere. This should be the only class that's affected.

kahest avatar Apr 03 '24 12:04 kahest