You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set the sample-rate in the AndroidManifest.xml: <meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
Run the appplication in debug
Check Logcat filtering for "Sentry" word
The issue started from 4.14.0. The version 4.13.0 is working as expected. This PR is probably the cause of the issue.
Expected Result
Successfully init the App with the Sentry configuration. The logcat will show only io.sentry.auto-init read: true when filtering for "Sentry" word.
Actual Result
The Logcat shows io.sentry.auto-init read: true and then warning messages related to the manifest configuration of float values:
Key io.sentry.traces.sample-rate expected Integer but value was a java.lang.Float. The default value -1 was returned.
Attempt to cast generated internal exception:
java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Integer
at android.os.BaseBundle.getInt(BaseBundle.java:1050)
at io.sentry.android.core.ManifestMetadataReader.readDouble(ManifestMetadataReader.java:500)
at io.sentry.android.core.ManifestMetadataReader.applyMetadata(ManifestMetadataReader.java:294)
at io.sentry.android.core.AndroidOptionsInitializer.loadDefaultAndMetadataOptions(AndroidOptionsInitializer.java:109)
at io.sentry.android.core.SentryAndroid.lambda$init$1(SentryAndroid.java:116)
at io.sentry.android.core.SentryAndroid$$ExternalSyntheticLambda0.configure(D8$$SyntheticClass:0)
at io.sentry.Sentry.applyOptionsConfiguration(Sentry.java:196)
at io.sentry.Sentry.init(Sentry.java:166)
at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:93)
at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:64)
at io.sentry.android.core.SentryInitProvider.onCreate(SentryInitProvider.java:25)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2117)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2091)
at io.sentry.android.core.SentryInitProvider.attachInfo(SentryInitProvider.java:43)
at android.app.ActivityThread.installProvider(ActivityThread.java:7187)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6670)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6565)
at android.app.ActivityThread.access$1400(ActivityThread.java:224)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7560)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
The text was updated successfully, but these errors were encountered:
hi @cmorigaki, thanks for the feedback!
that shouldn't be a problem.
Right after that log there should be the line with the correct value, like io.sentry.traces.sample-rate read: 1.0
I agree we should improve the logcat so that it doesn't show the error in case a float is provided.
Gradle Version
8.11.1
AGP Version
8.7.3
Code Minifier/Optimizer
None
Version
4.14.1
Sentry SDK Version
7.18.0
Steps to Reproduce
Use the Sentry auto-init feature:
4.14.1
AndroidManifest.xml
:<meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
The issue started from
4.14.0
. The version4.13.0
is working as expected. This PR is probably the cause of the issue.Expected Result
Successfully init the App with the Sentry configuration. The logcat will show only
io.sentry.auto-init read: true
when filtering for "Sentry" word.Actual Result
The Logcat shows
io.sentry.auto-init read: true
and then warning messages related to the manifest configuration of float values:The text was updated successfully, but these errors were encountered: