Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Maximum update depth exceeded with Mantine 7.7.1 #564

Closed
ebalo55 opened this issue Apr 3, 2024 · 8 comments
Closed

[BUG] Maximum update depth exceeded with Mantine 7.7.1 #564

ebalo55 opened this issue Apr 3, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@ebalo55
Copy link

ebalo55 commented Apr 3, 2024

Describe the bug
When running with Next.js 14.1.4 the library cannot be used as the React error Maximum update depth exceeded pops out in all pages

To Reproduce
I've create a sample bare next+mantine repo here

  1. Run the dev server
  2. open the browser at localhost:3000
  3. The error pops out immediately as the home page loads

Expected behavior
No error should occur

Screenshots
image

Desktop (please complete the following information):

  • OS: Debian Linux
  • Browser: Brave (Chromium engine)
  • Version: 1.64.109 (chromium 123.0...)
@ebalo55
Copy link
Author

ebalo55 commented Apr 3, 2024

After a few trials and errors, the problem seems to arise starting at v7.3.0 as up to the release v7.1.7 the error is not thrown.
As a reference here is the comparison between the last commit of v7.1.7 and v7.3.0

@ebalo55 ebalo55 changed the title Maximum update depth exceeded with next 14.1.4 [BUG] Maximum update depth exceeded with next 14.1.4 Apr 3, 2024
@FairyPenguin
Copy link

FairyPenguin commented Apr 3, 2024

Yeah, I faced this issue today with Nextjs 14.1.4 too same error same case. Thanks for reporting this @ebalo55

@icflorescu
Copy link
Owner

I've done some testing and it looks like this has nothing to do with Next.js version, but rather with the very specific Mantine 7.7.1 version.

It works fine with Mantine 7.7.0, but fails with Mantine 7.7.1.

I'll investigate it a bit further over the next few days, and raise a Mantine issue if necessary.

@ebalo55, your link leads to a bare Next.js app without Mantine or Mantine DataTable.

@rtivital, apparently something happened between 7.7.0 and 7.7.1 that's causing this. It's kind of difficult to debug, but I'll try to isolate the problem and let you know if I find something.

@icflorescu icflorescu self-assigned this Apr 4, 2024
@icflorescu icflorescu added the bug Something isn't working label Apr 4, 2024
@icflorescu icflorescu changed the title [BUG] Maximum update depth exceeded with next 14.1.4 [BUG] Maximum update depth exceeded with Mantine 7.7.1 Apr 4, 2024
@icflorescu icflorescu pinned this issue Apr 4, 2024
@icflorescu
Copy link
Owner

I managed to track down the error to Mantine useLocalStorage, specifically this change: mantinedev/mantine#5910, which will most likely be fixed in the next release either by mantinedev/mantine#6019 or by mantinedev/mantine#6022.

@icflorescu
Copy link
Owner

Until this is fixed, please refrain from upgrading to Mantine 7.7.1.

@ebalo55
Copy link
Author

ebalo55 commented Apr 5, 2024

I've done some testing and it looks like this has nothing to do with Next.js version, but rather with the very specific Mantine 7.7.1 version.

It works fine with Mantine 7.7.0, but fails with Mantine 7.7.1.

I'll investigate it a bit further over the next few days, and raise a Mantine issue if necessary.

@ebalo55, your link leads to a bare Next.js app without Mantine or Mantine DataTable.

@rtivital, apparently something happened between 7.7.0 and 7.7.1 that's causing this. It's kind of difficult to debug, but I'll try to isolate the problem and let you know if I find something.

Ops, leftover push while moving within repos, anyway seems like sticking to 7.7.0 work for now, thank you

@icflorescu
Copy link
Owner

This was fixed in Mantine v7.7.2.

@FairyPenguin
Copy link

This was fixed in Mantine v7.7.2.

Thanks for your effort and update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants