ant-design icon indicating copy to clipboard operation
ant-design copied to clipboard

ResizeObserver loop limit exceeded

Open RickLucassen opened this issue 5 years ago • 100 comments

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  • Create eventlistener on "window" for "error". (window.addEventListener("error", (e) => console.error(e));)
  • Render widget that renders a dropdown of some sort when clicking the input field.
  • Click on the field.
  • See "ResizeObserver loop limit exceeded" error message in console.

What is expected?

For the error not to be generated

What is actually happening?

Opening any kind of widget (dropdown) generates this error.

Environment Info
antd 4.6.3
React 16.11.0
System Ubuntu 20.04.1
Browser Chromium 85.0.4183.83

RickLucassen avatar Sep 07 '20 08:09 RickLucassen

Hello @RickLucassen. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by Need Reproduce will be closed if no activities in 7 days.

你好 @RickLucassen, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。7 天内未跟进的 issue 将会被自动关闭。

ant-design-bot avatar Sep 07 '20 08:09 ant-design-bot

@cyjake

https://github.com/react-component/resize-observer/pull/18 https://github.com/react-component/align/pull/72

afc163 avatar Sep 07 '20 08:09 afc163

Seems error has gone after refactor of rc-trigger & rc-motion.

zombieJ avatar Sep 22 '20 08:09 zombieJ

hi @zombieJ, is there any eta when those refactorings would make into release?

makarov-roman avatar Sep 25 '20 12:09 makarov-roman

hi @zombieJ, is there any eta when those refactorings would make into release?

makarov-roman avatar Sep 25 '20 12:09 makarov-roman

@makarov-roman remove your lock file and reinstall.

zombieJ avatar Sep 28 '20 06:09 zombieJ

@zombieJ Remove lock file is not a good solution. You can make It better by deleting antd part only from the lock file and run yarn or npm-install again. Or upgrade only concretely packages (rc-resize-observer, rc-align, rc-trigger, rc-motion ?)

gynekolog avatar Oct 08 '20 10:10 gynekolog

Seems error has gone after refactor of rc-trigger & rc-motion.

antd(v 4.16.9)中,还存在题主说的问题呢。例子:https://codesandbox.io/s/4ovng?file=/src/index.js

nigulasikk avatar Aug 03 '21 10:08 nigulasikk

Please reopen. As @nigulasikk shows this is still an issue

citmusa avatar Aug 20 '21 02:08 citmusa

For completeness, the message text in Firefox and Safari reads:

ResizeObserver loop completed with undelivered notifications.


ResizeObserver loop limit exceeded

Is Chrome at all only

scheinercc avatar Oct 14 '21 04:10 scheinercc

will this bug be fixed?

hopperhuang avatar Dec 27 '21 04:12 hopperhuang

will this bug be fixed?

dingyc1022 avatar Dec 28 '21 11:12 dingyc1022

will this bug be fixed?

1006223320 avatar Jan 01 '22 07:01 1006223320

mark

mqliutie avatar Mar 07 '22 06:03 mqliutie

Error comes out when clicking Select input

alienzhangyw avatar Mar 10 '22 02:03 alienzhangyw

Hi I'm facing same error on Select component of antd version 4.17.2 any fix for this https://github.com/ant-design/ant-design/issues/15075#issuecomment-1120156254

ishan123456789 avatar May 07 '22 07:05 ishan123456789

Hello @RickLucassen. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @RickLucassen,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支(新特性发到 feature 分支,其他发到 master 分支),务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

giphy

github-actions[bot] avatar May 10 '22 06:05 github-actions[bot]

https://stackoverflow.com/a/58701523/3040605

afc163 avatar May 10 '22 06:05 afc163

For anyone wanting to remove the popup from react you can use:

body > hmr-error-overlay { // This worked for me the container element might have changed so add change accordingly 
  display: none;
}

And to not let go of all the errors I added this block for error logging in the index.jsx

window.addEventListener('error', function (e) {
  console.error(e.message);
  // prevent React's listener from firing
  e.stopImmediatePropagation();
  // prevent the browser's console error message
  e.preventDefault();
});

ishan123456789 avatar May 17 '22 12:05 ishan123456789

Sucks, a waste of my time...

GrayYoung avatar Mar 21 '23 09:03 GrayYoung

still face this error with antd table

nghiahc2 avatar Mar 21 '23 16:03 nghiahc2

@nghiahc2 I have the same issue when navigation to page that using Table component.

Any solution?

mMarcos208 avatar Mar 28 '23 23:03 mMarcos208

@mMarcos208 i upgraded react from 17 to 18... And it works!

nghiahc2 avatar Mar 29 '23 01:03 nghiahc2

Same isssue

quangnmwork avatar Mar 29 '23 08:03 quangnmwork

Still no update? I have the same problem

MudulOzan avatar Apr 03 '23 09:04 MudulOzan

https://codesandbox.io/s/antd-reproduction-template-forked-oevinj?file=/index.js The latest version of 4.x cannot reproduce this problem

yoyo837 avatar Apr 03 '23 09:04 yoyo837

https://codesandbox.io/s/antd-reproduction-template-forked-oevinj?file=/index.js The latest version of 4.x cannot reproduce this problem

I am using the latest tho still have this

MudulOzan avatar Apr 03 '23 11:04 MudulOzan

https://codesandbox.io/s/antd-reproduction-template-forked-oevinj?file=/index.js The latest version of 4.x cannot reproduce this problem

I am using the latest tho still have this

How to reproduce, I can't reproduce it with 4.x latest.

yoyo837 avatar Apr 03 '23 11:04 yoyo837

https://codesandbox.io/s/antd-reproduction-template-forked-oevinj?file=/index.js The latest version of 4.x cannot reproduce this problem

I am using the latest tho still have this

How to reproduce, I can't reproduce it with 4.x latest.

I joined a complicated project I don't know all all posibilities but hear me out: Collapse inside Popover

I created a custom collapse component on my own and then put it inside Popover not a problem at all. Then I add one more css rule which is border bottom then I recieve this error. Pretty strange to me but I don't know how to reproduce or what causes this.

Probably it must be something about animations.

MudulOzan avatar Apr 03 '23 11:04 MudulOzan

I have the same issue with the Sider that is in collapsed mode when I click one of the menus in the Sider. The error will be prompted

MarcusCody avatar Apr 05 '23 20:04 MarcusCody