Title: Misleading error NoSuchMethodError: No virtual method addIntegrationToSdkVersion()V in class Lio/sentry/android/fragment/FragmentLifecycleIntegration · Issue #3847 · getsentry/sentry-java · GitHub
Open Graph Title: Misleading error NoSuchMethodError: No virtual method addIntegrationToSdkVersion()V in class Lio/sentry/android/fragment/FragmentLifecycleIntegration · Issue #3847 · getsentry/sentry-java
X Title: Misleading error NoSuchMethodError: No virtual method addIntegrationToSdkVersion()V in class Lio/sentry/android/fragment/FragmentLifecycleIntegration · Issue #3847 · getsentry/sentry-java
Description: Integration sentry-android Build System Gradle AGP Version 8.7.2 Proguard Enabled Version 7.16.0 Steps to Reproduce Update Sentry version without updating Sentry android plugin Run the app The setup: [versions] sentry-io = "7.16.0" sentr...
Open Graph Description: Integration sentry-android Build System Gradle AGP Version 8.7.2 Proguard Enabled Version 7.16.0 Steps to Reproduce Update Sentry version without updating Sentry android plugin Run the app The setu...
X Description: Integration sentry-android Build System Gradle AGP Version 8.7.2 Proguard Enabled Version 7.16.0 Steps to Reproduce Update Sentry version without updating Sentry android plugin Run the app The setu...
Opengraph URL: https://github.com/getsentry/sentry-java/issues/3847
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Misleading error NoSuchMethodError: No virtual method addIntegrationToSdkVersion()V in class Lio/sentry/android/fragment/FragmentLifecycleIntegration","articleBody":"### Integration\n\nsentry-android\n\n### Build System\n\nGradle\n\n### AGP Version\n\n8.7.2\n\n### Proguard\n\nEnabled\n\n### Version\n\n7.16.0\n\n### Steps to Reproduce\n\n1. Update Sentry version without updating Sentry android plugin\n2. Run the app\n\nThe setup:\n```\n[versions]\nsentry-io = \"7.16.0\"\nsentry-io-plugin = \"3.5.0\" # instead of last 4.13.0\n\n[libraries]\nsentry-io-android = { module = \"io.sentry:sentry-android\", version.ref = \"sentry-io\" }\nsentry-io-timber = { module = \"io.sentry:sentry-android-timber\", version.ref = \"sentry-io\" }\n\n[plugins]\nsentry-io = { id = \"io.sentry.android.gradle\", version.ref = \"sentry-io-plugin\" }\n```\n\nConfigure sentry in the Android Application\n```\n\n SentryAndroid.init(applicationContext) { options ->\n options.addIntegration(\n SentryTimberIntegration(\n minEventLevel = SentryLevel.ERROR,\n ),\n )\n options.isDebug = isDebug\n options.environment = environment\n }\n```\n\nAdd configuration in the manifest:\n```\n \u003c!-- Required: set your sentry.io project identifier (DSN) -->\n \u003cmeta-data\n android:name=\"io.sentry.dsn\"\n android:value=\"https://[redacted].ingest.sentry.io/[redacted]\" />\n\n \u003c!-- enable automatic breadcrumbs for user interactions (clicks, swipes, scrolls) -->\n \u003cmeta-data\n android:name=\"io.sentry.traces.user-interaction.enable\"\n android:value=\"true\" />\n \u003c!-- enable screenshot for crashes -->\n \u003cmeta-data\n android:name=\"io.sentry.attach-screenshot\"\n android:value=\"true\" />\n \u003c!-- enable view hierarchy for crashes -->\n \u003cmeta-data\n android:name=\"io.sentry.attach-view-hierarchy\"\n android:value=\"true\" />\n\n \u003c!-- enable the performance API by setting a sample-rate, adjust in production env -->\n \u003cmeta-data\n android:name=\"io.sentry.traces.sample-rate\"\n android:value=\"1.0\" />\n \u003c!-- enable profiling when starting transactions, adjust in production env -->\n \u003cmeta-data\n android:name=\"io.sentry.traces.profiling.sample-rate\"\n android:value=\"1.0\" />\n```\n\nAdd the sentry.properties file\n```\ndefaults.project=[redacted]\ndefaults.org=[redacted]\n```\n\nRun the app\n\n\n\nadditional information: it used to work, I bumped up libraries versions and got this issue.\n\nThese are the relevant changes:\n\n- Target SDK 34 -> 35\n- AGP 8.4.1 -> 8.7.2\n- Sentry version 6.17.0 -> 7.16.0\n- Sentry Gradle plugin version: 3.5.0 -> 3.5.0 (not changed)\n\n### Expected Result\n\nEither the app starts or the error mention incompatible plugin version.\n\n### Actual Result\n\nThe app crashes with an error that has nothing pointing to the plugin incompatibility being an issue\n\n```\njava.lang.NoSuchMethodError: No virtual method addIntegrationToSdkVersion()V in class Lio/sentry/android/fragment/FragmentLifecycleIntegration; or its super classes (declaration of 'io.sentry.android.fragment.FragmentLifecycleIntegration' appears in /data/app/~~ftLzJZBpcPqu7RoxikSkZw==/com.solongevity.app.dev.debug-dGWYg34RfMvRqAi4gFx4Og==/base.apk!classes13.dex)\n at io.sentry.android.fragment.FragmentLifecycleIntegration.register(FragmentLifecycleIntegration.kt:51)\n at io.sentry.Sentry.init(Sentry.java:271)\n at io.sentry.Sentry.init(Sentry.java:167)\n at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:93)\n at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:64)\n at io.sentry.android.core.SentryInitProvider.onCreate(SentryInitProvider.java:25)\n at android.content.ContentProvider.attachInfo(ContentProvider.java:2451)\n at android.content.ContentProvider.attachInfo(ContentProvider.java:2421)\n at io.sentry.android.core.SentryInitProvider.attachInfo(SentryInitProvider.java:43)\n at android.app.ActivityThread.installProvider(ActivityThread.java:7488)\n at android.app.ActivityThread.installContentProviders(ActivityThread.java:6999)\n at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6770)\n at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)\n at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2134)\n at android.os.Handler.dispatchMessage(Handler.java:106)\n at android.os.Looper.loopOnce(Looper.java:201)\n at android.os.Looper.loop(Looper.java:288)\n at android.app.ActivityThread.main(ActivityThread.java:7898)\n at java.lang.reflect.Method.invoke(Native Method)\n at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)\n at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)\n```\n","author":{"url":"https://github.com/danielesegato","@type":"Person","name":"danielesegato"},"datePublished":"2024-11-05T10:59:38Z","url":"https://github.com/getsentry/sentry-java/issues/3847"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e22dcb95-2c79-65c8-00c4-091b29838142 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FAC:29CA94:BBB38:107B25:6B046366 |
| html-safe-nonce | 8af9f00f89e2a64cac42e6223dd2ce037ac1e01a12ec555ae2a4563b5b27a792 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkFDOjI5Q0E5NDpCQkIzODoxMDdCMjU6NkIwNDYzNjYiLCJ2aXNpdG9yX2lkIjoiNDQxMjU4MTg4OTExNDkyMzg3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a48454b9d57f7b74f0d7ac6ea9f28b261e36445f9a2899aaf60e97176dc4d048 |
| hovercard-subject-tag | issue:2635127121 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-java/3847/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a5930560a712d338926c58f82aeb9e53322631e18b42dac22ce7e7d2d3776cf6/getsentry/sentry-java/issues/3847 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a5930560a712d338926c58f82aeb9e53322631e18b42dac22ce7e7d2d3776cf6/getsentry/sentry-java/issues/3847 |
| og:image:alt | Integration sentry-android Build System Gradle AGP Version 8.7.2 Proguard Enabled Version 7.16.0 Steps to Reproduce Update Sentry version without updating Sentry android plugin Run the app The setu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | danielesegato |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3368190 |
| octolytics-dimension-repository_nwo | getsentry/sentry-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3368190 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 03e114520787ad27289207f153520ef97461127c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width