Skip to content

[Android] Bug with unmount of toast #578

@ivaniuk7531

Description

@ivaniuk7531

Describe the bug
In my app, I need to display several toast messages sequentially. However, I’ve encountered an issue specifically on Android where one or more of the toast components occasionally fail to unmount as expected. As a result, the toast remains stuck on the screen, even after its display duration has passed. This doesn’t seem to happen consistently and is hard to reproduce reliably, but it affects the user interface and can lead to a poor user experience. I suspect the issue might be related to how the toast lifecycle is handled internally.

Steps to reproduce
Steps to reproduce the behavior:

  1. Show a few toasts one after another;
  2. Use the element inspector to observe that one of the toast components does not unmount properly.

Expected behavior
All displayed toasts should be properly unmounted and no longer visible on the screen.

Video record
https://github.com/user-attachments/assets/57a91d55-4566-4510-8efc-5f380a4bcfff

Environment

  • OS: Android (API 33+)
  • react-native-toast-message version: v2.3.3
  • react-native version v0.75.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions