-
Notifications
You must be signed in to change notification settings - Fork 304
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
Rust stack traces on Dart side during a panic #1553
Comments
@AlienKevin I realize my memory was too blur that I confused how I setup anyhow error vs panic in my app. For anyhow error, it is there as long as backtrace env variable is configured. For panic, it involves a bit more:
Looking backward, it seems that next time when near #1487 (reply in thread), I should ask "please show the complete messages", and then it may be easier to realize it is this problem since I will realize there is no error message inside PanicException.message. |
I see. Would you mind providing a short example on how to integration sentry_rust into the FRB setup? I tried two ways but somehow the panic is not registered:
The init code is copied from the Sentry doc: let guard = sentry::init((include_str!("../sentry_dsn.txt"), sentry::ClientOptions {
release: sentry::release_name!(),
..Default::default()
})); Or maybe I need to configure my Flutter Sentry project to also accept Rust errors? |
Just call sentry::init, and let the guard be never dropped. call it may not be enough, because the guard is dropped. This is indeed a Sentry issue, not FRB issue, IMHO... |
That works, thanks! I basically used a OnceCell:
You are right. And after doing more research, I found out that panic backtracing is a long-standing pain point at the intersection of rust-lang, sentry, and mobile platforms:
|
For nuances of Rust backtrace on iOS and Android, see: fzyzcjy/flutter_rust_bridge#1553 (comment)
The new Also, I tested my code with FRB's backtrace-rs solution and found that the Android backtrace is still redacted. So now I'm pretty sure that cargokit is not including the debug symbols somehow. I filed an issue at cargokit (irondash/cargokit#49). |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue. |
To ensure #1487 (reply in thread) is not a bug of FRBIt is expected Rust behavior, but we can improve it.
EDIT
The text was updated successfully, but these errors were encountered: