-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
fix: AbstractMethodError when getting Lifecycle #2228
Conversation
sentry-android-core/src/main/java/io/sentry/android/core/AppLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
@bitsandfoxes revert the sentry-native changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rever the submodule changes
sentry-android-core/src/main/java/io/sentry/android/core/AppLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
Codecov ReportBase: 80.62% // Head: 80.62% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #2228 +/- ##
=========================================
Coverage 80.62% 80.62%
Complexity 3357 3357
=========================================
Files 240 240
Lines 12335 12335
Branches 1638 1638
=========================================
Hits 9945 9945
Misses 1783 1783
Partials 607 607 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@bitsandfoxes, I think we discussed yesterday in a call that we don't need this change because the root cause is some weird transient dependency handling of Unity. If the same error happens on Android, we want the SDK to crash instead of failing silently to let the user know something is wrong with the dependencies. Furthermore, we concluded that this error is an edge case on Android. Should we close this? |
I think this quick workaround makes sense so that the SDK won't install |
Fine with me as long as we don't silently fail. Logging the error should be enough. |
* wrapped getLifeCycle in a try-catch * removed newline * Format code * Updated CHANGELOG.md * wrapping L92 and added comment * Format code Co-authored-by: Sentry Github Bot <[email protected]>
📜 Description
This came up through Unity. In some cases, Unity projects resolve their own external dependencies via adding and including
arr
files. This seems to lead to issues during runtime when the AppLifecycleIntegration tries to add its observer and results in anAbstractMethodError
.💡 Motivation and Context
To deal with the
AbstractMethodError
gracefully, we can catch the error instead and bail before we create the watcher.💚 How did you test it?
📝 Checklist
🔮 Next steps