notifee: Runtime production crash DuplicateTaskCompletionException

I just deployed Notifee to our production app and it’s crashing at runtime with the following exception:

com.google.android.gms.tasks.DuplicateTaskCompletionException: Complete with: result Done

Notifee is the only library in the project using play-services-tasks. We’re only using local timestamp triggered notification like so:

const trigger: TimestampTrigger = {
            type: TriggerType.TIMESTAMP,
            timestamp: time.getTime(),
        }

        // Create a trigger notification
        await notifee.createTriggerNotification(
            {
                id,
                title,
                body: message,
                data,
                android: {
                    channelId: "default",
                    smallIcon: "@drawable/ic_notification",
                    largeIcon: "@mipmap/ic_launcher",
                    color: "#f12317",
                    pressAction: {
                        id: "default",
                        launchActivity: "default",
                    },
                },
            },
            trigger
        )

This seems to be affecting a large percentage of users across all device models and android versions. I am not certain what causes the crash at the moment and don’t have a reproduction yet.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (9 by maintainers)

Most upvoted comments

Makes sense. I’ve only seen that stack reported once so it’s probably just a fluke. The first stack in the original report however DuplicateTaskCompletionException is happening to a lot of users on a lot of different devices and Android versions.