-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
SentryNativeChannel.captureReplay Error: type 'Null' is not a subtype of type 'String' in type cast on iOS only #2568
Comments
Thanks for reporting this.
Can you please share logs before this error? |
Let me know if it's enough or not. |
I couldn't reproduce the issue and given logs don't indicate what could lead to it. Is this something that always happens in your app? Do Android replays work fine? Could you maybe create a small repro example app that shows this issue? Alternatively you could also try running agains latest unreleased version of the sentry-dart SDK by specifying it as a git dependency https://dart.dev/tools/pub/dependencies#git-packages although I'm not aware of any recent changes that would affect the described behavior. |
Android replay always works fine, Whenever I run the iOS app, it always gives the error. I've to do it in xcodeproject, info.plist, or AppDelegate.swift related changed? Like any native specific confirmations I've to perform? |
The error coming from the event processor happens when a replay is being attached to another error. It may help if we could figure out what error is being handled by the event processor - maybe the whole issue is about the lifecycle and replay is somehow not initialized at the time that error occurs.
Note sure I understand - are you asking about the suggestion to use the latest main as a package dependency? If so, you can do it by updating dependencies:
sentry_flutter:
git:
url: https://github.com/getsentry/sentry-dart.git
ref: ec50b2159d85b69bbbb3619960b3f922ec5592f5
path: flutter |
Please let me know one thing, I'm trying session replay on the simulator. So it can run the session replay on Simulator, right? Or I've to run on the real iOS device? |
Simulator is fine. |
I'm trying on the simulator, whenever there is an error, the event is always height dropped by the processor. Please look at the below error log.
And if there is no error, then it does not even capture any session replay. So Here I'm stuck on what to do, I've tried using the direct git repo as a dependency but getting the same issue, replays are not captruring. |
Just to clarify - your app is a flutter app, not native with flutter integrated? How are you launching the app? The log you've linked above doesn't actually show any sentry-flutter SDK debug messages. |
@vaind Apologies for the inconvenience. I discovered the issue: Session Replay does not work on iOS versions below 16, and I was testing on iOS 15, which is why the session replay wasn’t captured. After testing on iOS 17, it’s working perfectly. Thank you so much for your valuable assistance and support throughout. I truly appreciate it! |
Thanks, we'll clarify in the docs and handle in the flutter code |
Platform
Flutter Mobile iOS
Obfuscation
Enabled
Debug Info
Enabled
Doctor
[✓] Flutter (Channel stable, 3.24.5, on macOS 13.6.1 22G313 darwin-x64, locale
en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.96.2)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
Version
8.12.0
Steps to Reproduce
Run the app on the iOS Simulator.
Get the following issue and Session replay has been not recorded:
This setup for session replay is perfectly working on Android, and I can see the capture session on the Sentry Dashboard, While running on the iOS simulator, it's giving an error and not capturing the session.
Expected Result
Session Replay should capture user sessions and display them in the Sentry Dashboard.
Actual Result
When running the app on the iOS Simulator, the session replay is not recorded, and the following error occurs:
Are you willing to submit a PR?
None
The text was updated successfully, but these errors were encountered: