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

Error while executing setColumnState() #3292

Closed
sikandarlab49 opened this issue Jul 31, 2019 · 5 comments
Closed

Error while executing setColumnState() #3292

sikandarlab49 opened this issue Jul 31, 2019 · 5 comments
Labels

Comments

@sikandarlab49
Copy link

I'm submitting a ... (check one with "x")

[x] bug report => see 'Providing a Reproducible Scenario'
[] feature request => do not use Github for feature requests, see 'Customers of ag-Grid'
[] support request => see 'Requesting Community Support'

Current behavior
Whenever I run setColumnState, I get the error: unable to find bean reference frameworkOverrides while initialising BeanStub.

Uncaught TypeError: Cannot read property 'addEventListenerOutsideAngular' of null
at Function../node_modules/ag-grid-community/dist/lib/utils.js.Utils.addSafePassiveEventListener (utils.js:1741)
at HoverFeature../node_modules/ag-grid-community/dist/lib/context/beanStub.js.BeanStub.addDestroyableEventListener (beanStub.js:84)
at HoverFeature../node_modules/ag-grid-community/dist/lib/headerRendering/hoverFeature.js.HoverFeature.addMouseHoverListeners (hoverFeature.js:46)
at HoverFeature../node_modules/ag-grid-community/dist/lib/headerRendering/hoverFeature.js.HoverFeature.postConstruct (hoverFeature.js:43)
at context.js:209
at Array.forEach ()
at context.js:209
at Context../node_modules/ag-grid-community/dist/lib/context/context.js.Context.forEachMetaDataInHierarchy (context.js:158)
at context.js:204
at Array.forEach ()
at Context../node_modules/ag-grid-community/dist/lib/context/context.js.Context.callLifeCycleMethods (context.js:203)
at Context../node_modules/ag-grid-community/dist/lib/context/context.js.Context.wireBeans (context.js:78)
at Context../node_modules/ag-grid-community/dist/lib/context/context.js.Context.wireBean (context.js:67)
at HeaderWrapperComp../node_modules/ag-grid-community/dist/lib/widgets/component.js.Component.addFeature (component.js:233)
at HeaderWrapperComp../node_modules/ag-grid-community/dist/lib/headerRendering/header/headerWrapperComp.js.HeaderWrapperComp.init (headerWrapperComp.js:82)
at context.js:209
at Array.forEach ()
at context.js:209
at Context../node_modules/ag-grid-community/dist/lib/context/context.js.Context.forEachMetaDataInHierarchy (context.js:158)
at context.js:204
at Array.forEach ()
at Context../node_modules/ag-grid-community/dist/lib/context/context.js.Context.callLifeCycleMethods (context.js:203)
at Context../node_modules/ag-grid-community/dist/lib/context/context.js.Context.wireBeans (context.js:78)
at Context../node_modules/ag-grid-community/dist/lib/context/context.js.Context.wireBean (context.js:67)
at HeaderRowComp../node_modules/ag-grid-community/dist/lib/headerRendering/headerRowComp.js.HeaderRowComp.createHeaderComp (headerRowComp.js:253)
at headerRowComp.js:225
at Array.forEach ()
at HeaderRowComp../node_modules/ag-grid-community/dist/lib/headerRendering/headerRowComp.js.HeaderRowComp.onVirtualColumnsChanged (headerRowComp.js:201)
at HeaderRowComp../node_modules/ag-grid-community/dist/lib/headerRendering/headerRowComp.js.HeaderRowComp.onDisplayedColumnsChanged (headerRowComp.js:165)
at eventService.js:133
at Array.forEach ()
at Function../node_modules/ag-grid-community/dist/lib/utils.js.Utils.forEachSnapshotFirst (utils.js:1343)
at EventService../node_modules/ag-grid-community/dist/lib/eventService.js.EventService.dispatchToListeners (eventService.js:128)
at EventService../node_modules/ag-grid-community/dist/lib/eventService.js.EventService.dispatchEvent (eventService.js:105)
at ColumnController../node_modules/ag-grid-community/dist/lib/columnController/columnController.js.ColumnController.updateGroupsAndDisplayedColumns (columnController.js:2228)
at ColumnController../node_modules/ag-grid-community/dist/lib/columnController/columnController.js.ColumnController.updateDisplayedColumns (columnController.js:2020)
at ColumnController../node_modules/ag-grid-community/dist/lib/columnController/columnController.js.ColumnController.setColumnState (columnController.js:1389)
at ColumnApi../node_modules/ag-grid-community/dist/lib/columnController/columnApi.js.ColumnApi.setColumnState (columnApi.js:30)
at ProxyComponent._onGridReady (react-hot-loader.development.js:580)
at GridOptionsWrapper../node_modules/ag-grid-community/dist/lib/gridOptionsWrapper.js.GridOptionsWrapper.globalEventHandler (gridOptionsWrapper.js:1186)
at eventService.js:138
at eventService.js:174
at Array.forEach ()
at EventService../node_modules/ag-grid-community/dist/lib/eventService.js.EventService.flushAsyncQueue (eventService.js:174)
at sentryWrapped (index.js:3244)

Expected behavior
It should just run setColumnState() without throwing the above nasty error. The fact is that setColumnState() does its job and actually does set the state of the columns in the grid. However, it is accompanied by the above error and I believe this error shouldn't be thrown.

Please tell us about your environment:

  • ag-Grid version: 21.0.1
  • Browser: Chrome 75.0.3770.142

  • Language: ES6/7, React

@dougiefresh49
Copy link

i am having the same issue, using

  • ag-Grid version: 21.1.1
  • Browser: Chrome 75.0.3770.142
  • Language: ES6/7, React

I ended up having to throw a try / catch around the setColumnState function. Everything appears to work fine: it sets the columns, logs the error and then the grid acts normal.

I would really like to know what this error means and how to prevent it, especially since the error message references Angular

@AhmedAGadir
Copy link
Contributor

Hi,

Your ticket has been flagged as in_zendesk, it means that we recognize this as an issue worth investigating so we have moved it to our official support channel for customers (zendesk)

We will carry on there with the investigation and we will update you as soon as possible.

Thanks

@AhmedAGadir
Copy link
Contributor

Hi,

Can you provide a reproducible scenario using one of our examples or your source code in a plunker and we will investigate?

Accepted reproducible scenarios are

  • A description of the detailed steps to reproduce your behaviour in one of our examples in the docs.
  • A plunker

If you decide to send us a plunkr, from any example in our website use the plunkr button in there to fork your own code by following the steps below:

  • Select the framework that is appropriate to you from the drop-down
  • Open it in plunker. (Use the button plunker in our example)
  • Add your changes so that the behaviour is reproduced
  • Save and Freeze the plunker(On the top left corner)
  • Send us the link to the plunker(You can copy the URL from the browser)

If reporting a bug make sure to state.

Actual behaviour.
Expected behaviour. If possible back this up with our docs/examples if possible


Note that this issue is getting closed, but you are welcomed to create a new issue if you can provide us with a reproducible scenario

If you are an ag-Grid Enterprise Customer, please raise this in our Zendesk support system - contact info@ag-grid.com for access. This is our primary channel for Support.

@stale
Copy link

stale bot commented Sep 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 8, 2019
@stale stale bot closed this as completed Sep 13, 2019
@gsi-chao
Copy link

This issue occurs when trying to access from gridApi to grid properties and the component is already unmounted. A lot has happened to me at @ ag-grid-community / react

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants