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

forceRender throws Exception #1484

Open
JhonnyJason opened this issue Nov 7, 2024 · 0 comments
Open

forceRender throws Exception #1484

JhonnyJason opened this issue Nov 7, 2024 · 0 comments

Comments

@JhonnyJason
Copy link

JhonnyJason commented Nov 7, 2024

Describe the bug
I have a gridjs v6.2.0 instance where the height is potentially being updated.
The data comes from a server - so a promise resolving to the actual data is used.
For updating the height it goes as follows:

height = newHeight
search = {enabled:true,keyword:""} // in case of empty search field
tableObj.updateConfig({height,search}).forceRender()

Now appearingly by random chance the rendering fails - displaying that some error in the data occured.
In the console there is an uncaught exception flying in some animationFrame of the forceRender function.
It does not say much more than "Cannot read properties of undefined (reading 'length')" and has a quite crazy stacktrace.

Tested On:

  • OS: Linux 6.11.6-arch1-1 SMP PREEMPT_DYNAMIC
  • WIth Browsers:
    Chromium Version 130.0.6723.91 (Official Build) Arch Linux (64-bit)
    Firefox Developer Edition Version 133.0b4 (64-bit)
  • Webpack v5.96.1 is used to bundle all JS

Every version starting from v6.1.0 has this same behaviour.
The last version of GridJS which works without this bug is v6.0.6
Using v6.0.6 is my current quickfix.

Additional context

If the same function for updating the height is called again, usually it renders fine again. It seems more like random chance that the error occurs, not reliably.

Mostly I am testing with large datasets - in my case 1000 Datasets of 13 parameters + each a formatter function.
Reducing the dataset to 12 entries, makes it very unlikely that the error occurs. However already 42 entries cause this issue to appear more often.

My next guess is that it could be some kind of race-condition inside an animationframe.
As the firefox displays the same behaviour I suppose it is not a browser issue.

Stacktrace:

overviewtablemodule.js:185 [Grid.js] [ERROR]: TypeError: Cannot read properties of undefined (reading 'length')
n.error @ gridjs.module.js:22
eval @ gridjs.module.js:22
Promise.then
eval @ gridjs.module.js:22
eval @ gridjs.module.js:22
o @ gridjs.module.js:22
eval @ gridjs.module.js:22
setTimeout
eval @ gridjs.module.js:22
eval @ gridjs.module.js:22
n.emit @ gridjs.module.js:22
o.afterRegistered @ gridjs.module.js:22
o.register @ gridjs.module.js:22
o.tryRegister @ gridjs.module.js:22
eval @ gridjs.module.js:22
Pt @ gridjs.module.js:22
c.__r @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
eval @ gridjs.module.js:22
I @ gridjs.module.js:22
setTimeout
E @ gridjs.module.js:22
N.setState @ gridjs.module.js:22
r.__c.r.__ @ gridjs.module.js:22
eval @ gridjs.module.js:22
Pt @ gridjs.module.js:22
xt @ gridjs.module.js:22
setTimeout
e @ gridjs.module.js:22
requestAnimationFrame
St @ gridjs.module.js:22
c.diffed @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
eval @ gridjs.module.js:22
I @ gridjs.module.js:22
setTimeout
E @ gridjs.module.js:22
N.setState @ gridjs.module.js:22
r.__c.r.__ @ gridjs.module.js:22
eval @ gridjs.module.js:22
Pt @ gridjs.module.js:22
xt @ gridjs.module.js:22
setTimeout
e @ gridjs.module.js:22
requestAnimationFrame
St @ gridjs.module.js:22
c.diffed @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
eval @ gridjs.module.js:22
I @ gridjs.module.js:22
setTimeout
E @ gridjs.module.js:22
N.setState @ gridjs.module.js:22
r.__c.r.__ @ gridjs.module.js:22
eval @ gridjs.module.js:22
Pt @ gridjs.module.js:22
xt @ gridjs.module.js:22
setTimeout
e @ gridjs.module.js:22
requestAnimationFrame
St @ gridjs.module.js:22
c.diffed @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
eval @ gridjs.module.js:22
I @ gridjs.module.js:22
setTimeout
E @ gridjs.module.js:22
N.setState @ gridjs.module.js:22
r.__c.r.__ @ gridjs.module.js:22
eval @ gridjs.module.js:22
Pt @ gridjs.module.js:22
xt @ gridjs.module.js:22
setTimeout
e @ gridjs.module.js:22
requestAnimationFrame
St @ gridjs.module.js:22
c.diffed @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
R @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
T @ gridjs.module.js:22
M @ gridjs.module.js:22
q @ gridjs.module.js:22
e.forceRender @ gridjs.module.js:22
updateTable @ overviewtablemodule.js:185
updateTableHeight @ overviewtablemodule.js:166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant