Comments (11)
Thanks @Legion2 .
We'll check it and come back to you.
@buenaflor have you seen that before? or @romtsn ?
from sentry-kotlin-multiplatform.
Thanks @Legion2 . We'll check it and come back to you. @buenaflor have you seen that before? or @romtsn ?
no, first time seeing this. I guess we have to investigate with debugger attached to see what's going on
from sentry-kotlin-multiplatform.
Short question: When is the beforeSend
hook supposed to be executed:
- when the exception is thrown/catched and converted to an event, or
- before the event is send to sentry which is possibly much later than when it was catched (possibly after application restart)?
from sentry-kotlin-multiplatform.
@Legion2 before the event is sent after the event is "ready" and enriched.
It depends on the platform:
iOS is after the app is restarted
Android usually before the process dies, but it can be on restart as well.
from sentry-kotlin-multiplatform.
@Legion2 hi, thanks for bringing up the issue. What kind of error are you throwing in your activity? It's definitely weird that beforeSend is not being triggered. I'm trying to reproduce this issue but it seems to be working on my end. Can you show a code sample of your activity?, just to be sure.
from sentry-kotlin-multiplatform.
Initially a Unable to start activity ComponentInfo {...} androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment ...: could not find Fragment constructor
caught my attention, because it was logged to sentry and had the tag mechanism: UncaughtExceptionHandler
and handled: false
in sentry, however we use the above beforeSend
to filter such exceptions. (Use case: We provide an sdk which is integrated in 3rd party apps, we do not want to catch all errors of the 3rd party app and send them to our sentry, because they are not actionable for us)
When I tried to reproduce this in a debug version of a demo app with a debugger attached and breakpoint set in the beforeSend
hook I used error("test")
to throw an exception in the onCreate
of the main activity to reproduce a fatal exception. During the testing I could never trigger the breakpoint in beforeSend
callback.
from sentry-kotlin-multiplatform.
@Legion2 could you prepare a little demo repo that reproduces this issue?
Other than that we do not officially support using Sentry within other sdks.
from sentry-kotlin-multiplatform.
Closing this due to inactivity
from sentry-kotlin-multiplatform.
I think this issue is related to double initialization of SentrySDK, we are using React Native Sentry SDK and Kotlin Multiplatform SDK at the same type and they both initialize the Android SDK and there by overriding each others settings.
@buenaflor I was not able to find any documentation about that case and assume that it is not supported.
from sentry-kotlin-multiplatform.
@Legion2 most likely yes that's the case. and yes the SDKs are not written with these cases in mind unfortunately
from sentry-kotlin-multiplatform.
I found this flag today (https://docs.sentry.io/platforms/react-native/manual-setup/native-init/) and hope this will fix most of the issues we have.
from sentry-kotlin-multiplatform.
Related Issues (20)
- Test Apple targets don't find Sentry framework when using SPM HOT 22
- isCrashedLastRun method
- The Ability to Adjust App Hang Preferences HOT 4
- Cococa deps updater should also update dependencies in samples
- Docs: clarify difference between native android init docs and kmp android init
- Support Compose Multiplatform
- Crashes on App Boot HOT 4
- [Gradle Plugin] Better support for tests not working on cocoa targets
- Implement & Document `lastEventId` with User Feedback
- Improve the KMP SDK
- Make `setSentryUnhandledExceptionHook` public HOT 2
- Build failed for iOS: Undefined symbols for architecture arm64: "_OBJC_CLASS_$_SentryId" HOT 9
- Problem when used together with Phoenix library HOT 9
- Expose platform specific Configuration via expect actual HOT 18
- ci: build iOS app and upload to TestFlight
- Support Spotlight
- Add internal logging mechanism
- Compilation failed: Linking globals named 'kniprot_cocoapods_Sentry3_SentryMetricsAPIDelegate': symbol multiply defined! HOT 9
- WASM support HOT 1
- Send trace origin HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentry-kotlin-multiplatform.