#Crash-free session is not showed for iOS

38 messages · Page 1 of 1 (latest)

cerulean wolf
#

Hello community!

I'm running into an issue where crash-free session data is not showed in Sentry for my iOS apps.

As I understand it, the release version is automatically set the release number and to enabled the release-health I do not need to do any extra stuffs.

SentrySDK.start { options in
options.dsn = ""
options.debug = true
options.tracesSampleRate = 1.0
options.profilesSampleRate = 1.0
}
I am using latest version of SDK.

hard ermine
#

what version of the SDK are you using?

#

It looks like you have 4 different releases detected in your screenshot. Were those set automatically?

cerulean wolf
#

Thanks for getting back to me. I am using 8.23.0. Yes those are being set automatically. may I know what is the prefer way?

lilac lynx
#

I did a couple of tests and the auto-release also gets sessions for release health.
I see you have options.debug = true , do you see anything related to sessions on the logs?

cerulean wolf
#

I saw these logs when launching the app

[Sentry] [debug] Reading from session: /Users/asone/Library/Developer/CoreSimulator/Devices/82F858DA-2254-41D2-B73C-93EC8D99B9EA/data/Containers/Data/Application/6FF926E3-A304-43FA-B6CC-6909F8F643AA/Library/Caches/io.sentry/51010bdb480d33059252bf629795b0cf2be9d5be/session.current [Sentry] [debug] [SentryHub:177] A cached session was found. [Sentry] [debug] [SentryHub:192] No timestamp to close session was provided. Closing as abnormal. Using session's start time 2024-04-08 07:03:07 +0000 [Sentry] [debug] [SentryFileManager:411] Deleting session: /Users/asone/Library/Developer/CoreSimulator/Devices/82F858DA-2254-41D2-B73C-93EC8D99B9EA/data/Containers/Data/Application/6FF926E3-A304-43FA-B6CC-6909F8F643AA/Library/Caches/io.sentry/51010bdb480d33059252bf629795b0cf2be9d5be/session.current [Sentry] [debug] [SentryFileManager:57] Successfully deleted file at /Users/asone/Library/Developer/CoreSimulator/Devices/82F858DA-2254-41D2-B73C-93EC8D99B9EA/data/Containers/Data/Application/6FF926E3-A304-43FA-B6CC-6909F8F643AA/Library/Caches/io.sentry/51010bdb480d33059252bf629795b0cf2be9d5be/session.current [Sentry] [debug] [SentrySDK:463] Integration installed: SentryAutoSessionTrackingIntegration

And after that

[Sentry] [debug] [SentryFileManager:480] No lastInForeground found. [Sentry] [debug] [SentryFileManager:391] Writing session: /Users/asone/Library/Developer/CoreSimulator/Devices/82F858DA-2254-41D2-B73C-93EC8D99B9EA/data/Containers/Data/Application/6FF926E3-A304-43FA-B6CC-6909F8F643AA/Library/Caches/io.sentry/51010bdb480d33059252bf629795b0cf2be9d5be/session.current [Sentry] [debug] Capturing session with status: {"errors":0,"status":"ok","started":"2024-04-08T12:45:22.737Z","did":"7CD2ECCB-6ACD-4429-AF9F-6D98CF9489EF","sid":"FDEF99CC-0CDA-4373-BF3A-286206F34627","init":true,"timestamp":"2024-04-08T12:45:22.738Z","attrs":{"release":"[email protected]+1","environment":"production"},"seq":1}

#

Thanks for getting back to me. It seems that session is capturing. We are using self-hosted. is that related? But I tried to use trial version and it seems to have same problem also.

lilac lynx
#

unless you are using an older version of self-hosted, it should not matter.
Do you have a link to the release on your SaaS organisation?
the last entry shows a session with status ok being sent, but the abnormal was dropped

#

if you do not want to share the link in this public thread, you can write to us via [email protected]

cerulean wolf
#

I saw that we are using Sentry 22.7.0.dev0 3b1c2f6
I will send you the link through support email. Thank you so much.

#

I have sent with this subject "Crash-free session is not showed for iOS [1211800107855646783]"

cerulean sage
#

In your session event log there in the did key. The value there is the user currently on the scope in the sdk. I assume when the sessions get captured, so do some transactions. Do you receive those? Do you have transactions with the same user id as the one listed in the session event log there around the same timestamp?

If you do have other events, if you open up the JSON view of the event through the UI, do you see the SessionTrackingIntegration being loaded at the time of the event? You can check under sdk.integrations of the JSON. Here is an example of an error event from my test app

cerulean wolf
#

yes. It is being enabled.

"sdk": { "name": "sentry.cocoa", "version": "8.23.0", "integrations": [ "CoreDataTracking", "ANRTracking", "Crash", "WatchdogTerminationTracking", "AutoBreadcrumbTracking", "FileIOTracking", "NetworkTracking", "UIEventTracking", "AutoSessionTracking", "PerformanceTracking", "AppStartTracking", "FramesTracking" ] } ,

#

is this related to some project settings?

lilac lynx
#

there seems to be an issue with the project view. The crash rates are showing when checking the release and other projects. I'm checking that on our side

cerulean wolf
#

Will it be also affecting self-hosted project? If so how should I check from my side?

#

Is it only affecting for iOS project?

lilac lynx
#

seems to be only one project (ios-20). One thing I noticed is that the affected project only has one release (the default we create) while the non-affected project has two releases.
i havent tested it myself yet, but if you set a new release in your SDK for the affected project and start playing around with the app (to send some user sessions). Does the issue continues?

#
SentrySDK.start { options in
            options.dsn = ""
            options.debug = true
            options.releaseName = "[email protected]"
            options.tracesSampleRate = 1.0
            options.profilesSampleRate = 1.0
        }
cerulean wolf
#

SentrySDK.start { options in
options.dsn = ""
options.debug = true
options.releaseName = "[email protected]+2"
options.tracesSampleRate = 1.0
options.profilesSampleRate = 1.0
}

I tried to set it but issue still continues

lilac lynx
#

thank you for confirming

cerulean wolf
#

Thanks a lot for your help.

#

Also the self-hosted sentry project got 4 releases and still didn't show anything related to crash free session.

#

is there anything that I should be aware when I configure the project?

cerulean wolf
#

Hello, May I know any suggestions for this issue?

lilac lynx
#

TLDR: there is a flag that tells the UI when the information should be shown or not, we are looking into why it is not set to true in your project.

lilac lynx
cerulean wolf
#

Thank you for getting back to me.

#

I hope same root cause is happening in self-hosted project also.

#

may I know is there anyway I can check ?

#

How can I check for self-hosted project?

lilac lynx
#

the fix will first apply SaaS but will also be available on self-hosted on a future release

cerulean wolf
#

Thank you so much.

#

may I know is there any updates for this issue? because I am using trial project for SaaS version and you are not able to access self-hosted version.

lilac lynx
#

any updates on the issue will be posted on the Github issue I linked, please also use that issue to request updates