-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Describe the bug
When device-mode destination filters are enabled and Segment destination drop rules ("type": "drop"
) are applied, a warning is logged for each dropped event.
W java.util.concurrent.ExecutionException: java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Any
To Reproduce
Steps to reproduce the behavior:
- Enable device-mode destination filters in your Android app.
- In the Segment dashboard, create a destination filter with the "drop" action for a specific event.
- In the app, track the event you set to be dropped.
- Launch the app and trigger the event by navigating to the related screen.
- Check the Android console logs for the message:
"null cannot be cast to non-null type"
- Confirm that this warning appears.
Expected behavior
Warning W java.util.concurrent.ExecutionException: java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Any
is not displayed at all or at worst it is displayed with proper message (e.g. XXX event is dropped after applying filter).
Platform (please complete the following information):
- Library Version in use: 1.0.1
- Platform being tested: Android
- Integrations in use: Firebase (device-mode)
Additional context
Full stacktrace:
W java.util.concurrent.ExecutionException: java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Any
W at java.util.concurrent.FutureTask.report(FutureTask.java:122)
W at java.util.concurrent.FutureTask.get(FutureTask.java:205)
W at com.segment.analytics.substrata.kotlin.JSScope.await(SafeEngine.kt:84)
W at com.segment.analytics.substrata.kotlin.JSScope.await$default(SafeEngine.kt:82)
W at com.segment.analytics.liveplugins.kotlin.LivePlugin.execute(LivePlugin.kt:69)
W at com.segment.analytics.kotlin.core.platform.Mediator.execute(Mediator.kt:47)
W at com.segment.analytics.kotlin.core.platform.Timeline.applyPlugins(Timeline.kt:62)
W at com.segment.analytics.kotlin.core.platform.Timeline.applyPlugins(Timeline.kt:54)
W at com.segment.analytics.kotlin.core.platform.DestinationPlugin.process(Plugin.kt:135)
W at com.segment.analytics.kotlin.core.platform.DestinationPlugin.execute(Plugin.kt:162)
W at com.segment.analytics.kotlin.core.platform.Mediator.execute(Mediator.kt:44)
W at com.segment.analytics.kotlin.core.platform.Timeline.applyPlugins(Timeline.kt:62)
W at com.segment.analytics.kotlin.core.platform.Timeline.applyPlugins(Timeline.kt:54)
W at com.segment.analytics.kotlin.core.platform.Timeline.process(Timeline.kt:36)
W at com.segment.analytics.kotlin.core.Analytics$process$1.invokeSuspend(Analytics.kt:523)
W at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
W at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
W at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
W at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
W at java.lang.Thread.run(Thread.java:1012)
W Caused by: java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Any
W at com.segment.analytics.substrata.kotlin.JSEngine.call(JSEngine.kt:208)
W at com.segment.analytics.liveplugins.kotlin.LivePlugin$execute$ret$1.invoke(LivePlugin.kt:70)
W at com.segment.analytics.liveplugins.kotlin.LivePlugin$execute$ret$1.invoke(LivePlugin.kt:69)
W at com.segment.analytics.substrata.kotlin.JSScope.optimize$lambda-4(SafeEngine.kt:101)
W at com.segment.analytics.substrata.kotlin.JSScope.$r8$lambda$hVLtNz8KE8RmkS6LOU8KIOX5TaI(Unknown Source:0)
W at com.segment.analytics.substrata.kotlin.JSScope$$ExternalSyntheticLambda2.call(D8$$SyntheticClass:0)
W at java.util.concurrent.FutureTask.run(FutureTask.java:264)
W ... 3 more
cc: @trod-123
Metadata
Metadata
Assignees
Labels
No labels