question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Messages keep dangling despite duration set to 2

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

The ant design ‘message’ component with an assigned key does not disappear despite having set a duration of 2 seconds. It’s generally not a problem when the messages are activated by clicking (and generally also not when there is no key assigned to them). But since my messages are being generated by a websocket with a message ticketing system and delivered async to the client, they seem to not disappear. Hence, it is very hard to reproduce in the code sandbox. You can see here: https://imgur.com/a/Cg2uxdD that these are being generated by the websocket, and they are just left dangling on the site. This is causing a very frustrating user experience.

The specific component that is causing it is:

export const displayMessageWithIconAndProgress = (type, key, message) => {
  const { current_iteration, max_iterations, start_iteration } = message;
  const progress = Math.round(((current_iteration - start_iteration) / (max_iterations - start_iteration)) * 100);
  return (
    progress === 100
      ? antMessage.success({ content: `${message.description} (${progress}%)`, key, duration: 2 })
      : antMessage.loading({ content: `${message.description} (${progress}%)`, key, duration: 2 })
  );
};

There is also a specific key assigned to the messages so that the previous keys are overwritten.

What is expected?

I am expecting the message popup to disappear after 2 seconds.

What is actually happening?

The message keeps dangling, it doesn’t disappear after 2 seconds and I cannot close it as there is no closable tag.

Environment Info
antd 4.3.5
React 16.13.1
System Mac OSX
Browser Google CHrome

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Floriferouscommented, Apr 29, 2021

I can confirm this is happening to us as well on 4.15.3, reverting to 4.8.3 fixes the issue.

0reactions
ulshacommented, Jan 31, 2021

What’s the reproduce step?

@zombieJ please see comment

Read more comments on GitHub >

github_iconTop Results From Across the Web

If you have an issue with Messages or FaceTime after setting ...
After setting up your iPhone, you might experience one or more of the following issues: You can't receive iMessages or FaceTime calls.
Read more >
BCOM chapter 7 Flashcards - communication channel. - Quizlet
Study with Quizlet and memorize flashcards containing terms like The general name for the medium through which a message is transmitted is the,...
Read more >
How to Change How Long You Store Text Message History on ...
Video Transcript: By default, text messages and their associated attachments received on your Apple iPhone or iPad are kept forever.
Read more >
ProcessStartInfo hanging on "WaitForExit"? Why?
Try the following: 1) Add a timeout to p.WaitForExit(nnnn); where nnnn is in milliseconds. 2) Put the ReadToEnd call before the WaitForExit call....
Read more >
Why email is stuck in Outlook & how to make it send - Ablebits
Note: If you get the error "Outlook has already begun transmitting this message" when trying to delete or move a hanging email, wait...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found