react-input-mask icon indicating copy to clipboard operation
react-input-mask copied to clipboard

Maximum update depth exceeded

Open allaniftrue opened this issue 2 years ago • 16 comments

Hi, Anyone encountered this issue?

Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

allaniftrue avatar Jul 14 '22 02:07 allaniftrue

Facing the same issue only when trying to use autofill in Chrome for iOS. On all desktop browsers as well as on Android everything works fine.

osterreich avatar Jul 15 '22 21:07 osterreich

Same here, but when trying to call form.resetFields() with AntD forms

yilunc avatar Jul 26 '22 20:07 yilunc

I also have same problem, it's crashing when trying the use autofill in chrome at ios device

ffurkk avatar Aug 11 '22 06:08 ffurkk

I'm also having this issue when refilling a form with previously entered data.

azamatsmith avatar Aug 22 '22 14:08 azamatsmith

I also have same problem with props "children" used with Input component of antd

apolaert avatar Aug 26 '22 09:08 apolaert

I also have same problem with custom input based on MUI TextField. Problem crash app on focus.

Revolt9k avatar Sep 07 '22 07:09 Revolt9k

fix please

hahatulk avatar Oct 14 '22 18:10 hahatulk

i found temporary fix, you need to define value to string always, do not allow null or undefined

<InputMask .... value={props?.value ?? ""}> .... </InputMask>

hahatulk avatar Oct 14 '22 18:10 hahatulk

The above fix doesnt work for me, so I had to fork the repo and patch it. This is the change that works for me: https://github.com/sanniassin/react-input-mask/pull/309

danielhusar avatar Mar 10 '23 12:03 danielhusar

Was seeing this issue as well in our production application as well, although from logging, it seems to have stopped occurring about four weeks ago. My guess is that this chrome release may have fixed the issue as I'm unable to replicate it now

@danielhusar did you see this resolve itself also? curious why you closed the PR linked above

ethanrcohen avatar Apr 03 '23 15:04 ethanrcohen

We're having this issue on latest version of chrome mobile when autofilling

Ryanjso avatar Jun 15 '23 15:06 Ryanjso

Was seeing this issue as well in our production application as well, although from logging, it seems to have stopped occurring about four weeks ago. My guess is that this chrome release may have fixed the issue as I'm unable to replicate it now

@danielhusar did you see this resolve itself also? curious why you closed the PR linked above

I closed it as I dont think its will get merged. The repo looks unmaitaned. We are manually patching the library with fix in my PR to fix it for us.

danielhusar avatar Jun 15 '23 16:06 danielhusar

Switched my phone inputs over to https://github.com/uNmAnNeR/imaskjs/tree/master/packages/react-imask and it works flawlessly. Mobile autocomplete works great too.

Ryanjso avatar Jun 15 '23 16:06 Ryanjso

Also experiencing the crash, @sanniassin can you validate @danielhusar fix and update the package?

fred-boink avatar Jul 04 '23 21:07 fred-boink