Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes reported on iOS Prod build #2993

Closed
Gauravprakash opened this issue May 3, 2023 · 28 comments
Closed

Crashes reported on iOS Prod build #2993

Gauravprakash opened this issue May 3, 2023 · 28 comments

Comments

@Gauravprakash
Copy link

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

we have integrated Sentry in our App named 99acres to trace crashes and other data as well . It impacted our crash free users so with immediate effect we decided to remove from production let me share steps which I use to implement

Native IOS
In pod file: pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '8.5.0'

App Delegate file

In AppDelegate file a private func is defined which is getting called from did finish launching method , lets have a look on code snippet:

 private func traceSentry(){
   
       SentrySDK.start { options in
           options.dsn = "https://[email protected]/4505006327791616"
           
          // We recommend adjusting this value in production
           options.debug = true
           options.tracesSampleRate = 1.0
           options.profilesSampleRate = 1.0
           options.appHangTimeoutInterval = 1
           options.enableSwizzling = true
           options.enablePreWarmedAppStartTracing = true
           options.attachScreenshot = true
           options.attachViewHierarchy = true
           if #available(iOS 15.0, *) {
               options.enableMetricKit = true
           } else {
               // Fallback on earlier versions
           }
           
       }
       let error = NSError(domain: "com.99acres.com", code: 1, userInfo: nil)
       SentrySDK.capture(error: error)
   }

React Native Side

in Package.json -> "@sentry/react-native": "^5.3.1"

while in App.js

import * as Sentry from "@sentry/react-native";

Sentry.init({
  dsn: "https://[email protected]/6152887",
  autoInitializeNativeSdk:false,
  enableNative:false,
});

Expected Result

It should be Crash free , please do suggest if any thing goes wrong

Actual Result

Screenshot 2023-05-03 at 11 09 24 AM

Product Area

Performance

Link

No response

DSN

https://[email protected]/4505006327791616

Version

8.5.0

@getsantry
Copy link

getsantry bot commented May 3, 2023

Assigning to @getsentry/support for routing, due by Wednesday, May 3rd at 5:00 pm (sfo). ⏲️

@Kobby-Bawuah Kobby-Bawuah transferred this issue from getsentry/sentry May 3, 2023
@Gauravprakash
Copy link
Author

Hi Team, Hope you're looking into this on priority

@krystofwoldrich krystofwoldrich transferred this issue from getsentry/sentry-react-native May 3, 2023
@kahest
Copy link
Member

kahest commented May 4, 2023

Hi @Gauravprakash - thank you for reporting, we are investigating. Do you by any chance have the full stacktraces for those issues and could you share them with us?

@krystofwoldrich
Copy link
Member

I've moved this to sentry-cocoa because the RN code snippet showed enabledNative: false. Definitely, a whole stack trace would be helpful.

@philipphofmann
Copy link
Member

I think most of the issues should be fixed with #2995.

@armcknight
Copy link
Member

I think most of the issues should be fixed with #2995.

I think that's going to be a relatively small proportion of the overall amount of crashes. The screenshot shows a total of 210 crashes, but #2995 only addresses the ones from SentryProfiler.processBacktrace, which is only 5% of the total. We would really need a stacktrace to see what's up with + [SentryProfiler isRunning]. I'm not sure what's up with the most prevalent crash in the serializer. Stack traces will definitely be helpful.

@brustolin
Copy link
Contributor

I also would like to see the stacktrace for +[SentrySerialization dataWithJSONObject:]

@Gauravprakash You can also send me your org name so we could better investigate.

@Gauravprakash
Copy link
Author

please check attached stacktrace, I have extracted it from 2 major crash for now

Archive 2.zip

@Gauravprakash
Copy link
Author

I think most of the issues should be fixed with #2995.

but this should be fixed from library end

@Gauravprakash
Copy link
Author

What's update here , please share your explanation for crashes occurring

@philipphofmann
Copy link
Member

@Gauravprakash, could you please share the stacktrace of the crashes? That would help us to understand what's going on.

@armcknight
Copy link
Member

Yes, the stack traces for each of these would help. I looked at the archive you uploaded, which had a stack trace for one of them, which is very helpful thanks! But the only other report in there was for a crash not listed in your screenshot, and involved no sentry code. If at all possible, please provide stack traces for the other crashes.

@Gauravprakash
Copy link
Author

@armcknight Any finding here

@armcknight
Copy link
Member

@Gauravprakash we think we've fixed some of the crashes in #3018, based on the information in one of your stack traces and some other customer reports. Stay tuned for a patch release.

@armcknight
Copy link
Member

@Gauravprakash We recently released 8.7.2 which should fix some crashes, please update and confirm if anything changes on your end.

@philipphofmann
Copy link
Member

We think 8.7.2 should fix the issue, as pointed out in #2993 (comment). Please reopen with more information otherwise.

@Gauravprakash
Copy link
Author

We're planning to implement the same,Right now it's not implemented on production, could you please confirm 8.7.2 is the latest release

@kahest
Copy link
Member

kahest commented May 30, 2023

@Gauravprakash the latest release is 8.7.3 - you can always check the releases page to see what the latest release is.

@Gauravprakash
Copy link
Author

[!] CocoaPods could not find compatible versions for pod "SentryPrivate":
In Podfile:
Sentry (from https://github.com/getsentry/sentry-cocoa.git, tag 8.7.3) was resolved to 8.7.3, which depends on
SentryPrivate (= 8.7.3)

what's expected here , could you please share pod dependency of sentry Private too

@kahest
Copy link
Member

kahest commented May 30, 2023

@brustolin ^ can you take a look?

@philipphofmann
Copy link
Member

philipphofmann commented May 30, 2023

@Gauravprakash, please run pod repo update, which updates the spec repos located at ~/.cocoapods/repos in your home folder, and try again.

@brustolin
Copy link
Contributor

SentryPrivate 8.7.3 seems to be in order
image

What @philipphofmann suggested will probably fix the issue.

@Gauravprakash
Copy link
Author

Also can you please share pod file code, I need to check dependency script for 8.7.3

@brustolin
Copy link
Contributor

Also can you please share pod file code, I need to check dependency script for 8.7.3

https://github.com/getsentry/sentry-cocoa/blob/main/Sentry.podspec
https://github.com/getsentry/sentry-cocoa/blob/main/SentryPrivate.podspec

We dont have external dependency

@Gauravprakash
Copy link
Author

@brustolin Regarding more information related to slowness , frozen frames : I was checking your demo project for calculating frozen frames, slow frames and total frames using PrivateSentrySDKOnly , while using it seems it's a private Api which can be risky, as you may change or be removed in future versions of the SDK, causing compatibility issues. Can you please provide public API provided by the framework or library though which we can rcv data ?

@philipphofmann
Copy link
Member

Can you please provide public API provided by the framework or library though which we can rcv data ?

What exactly do you mean by that? Do you want to have an API for slow and frozen frames? If yes, can you please explain your use case for this?

@Gauravprakash
Copy link
Author

like firebase performance we can track slow rendering and frozen frames though samples shared on console, similarly I can see Sentry helps to trace using PrivateSentrySDKOnly but it's not exposed publicly , so I want to ask Is it safe to use @philipphofmann as we need to collect data to send to our own server .

@philipphofmann
Copy link
Member

@Gauravprakash, you may use PrivateSentrySDKOnly at your own risk, which our hybrid SDKs like Flutter, ReactNative, and Unity also use. We can't give you a promise of not changing its API in a minor version, as it's not officially public. If we change it, there will be an alternative, as the Hybrid SDKs need the API. But again, I have to point out it's not an official API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

6 participants