# "Cannot read property 'group' of undefined" with MongoDB

**URL:** <https://discuss.elastic.co/t/cannot-read-property-group-of-undefined-with-mongodb/27048>\
**Category:** Beats\
**Created:** [August 7, 2015, 1:13pm UTC](https://discuss.elastic.co/t/cannot-read-property-group-of-undefined-with-mongodb/27048 "2015-08-07T13:13:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keylor42](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@Keylor42](https://discuss.elastic.co/u/Keylor42)\
**Post date:** [August 7, 2015, 1:13pm UTC](https://discuss.elastic.co/t/cannot-read-property-group-of-undefined-with-mongodb/27048/1 "2015-08-07T13:13:15Z")

</div>

Hi everyone, I'm currently testing Packetbeat, elasticsearch and Kibana with MongoDB queries. Everything seems to work fine, except that I have a fair amount of unexcpected "otherCommand" queries, and when I try to launch the "MongoDB Performance" dashboard nothing appears, except an error message : "Cannot read property 'group' of undefined". The problem appears even when there is no data in the "Discover" tab. Any help is welcomed.  
Here's the log :

```
TypeError: Cannot read property 'group' of undefined
    at http://myserver:5601/index.js?_b=5930:118288:26
    at http://myserver:5601/index.js?_b=5930:35382:47
    at forEach (http://myserver:5601/index.js?_b=5930:34649:15)
    at Function.sortBy (http://myserver:5601/index.js?_b=5930:35377:7)
    at AggConfigsFactory.AggConfigs.getRequestAggs (http://myserver:5601/index.js?_b=5930:118287:16)
    at VisFactory.Vis.requesting (http://myserver:5601/index.js?_b=5930:118424:26)
    at http:/myserver:5601/index.js?_b=5930:148579:20
    at SearchSourceFactory.SearchSource._mergeProp (http://myserver:5601/index.js?_b=5930:44624:29)
    at ittr (http://myserver:5601/index.js?_b=5930:43445:27)
    at http://myserver:5601/index.js?_b=5930:34865:29
```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 8, 2015, 1:39am UTC](https://discuss.elastic.co/t/cannot-read-property-group-of-undefined-with-mongodb/27048/2 "2015-08-08T01:39:37Z")

</div>

I'll move this over to Beats for now, hopefully the team there can help 🙂

---

<div class="post-metadata">

**Author:** ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)\
**Post date:** [August 10, 2015, 12:48pm UTC](https://discuss.elastic.co/t/cannot-read-property-group-of-undefined-with-mongodb/27048/3 "2015-08-10T12:48:45Z")

</div>

Can you somehow send us a sample of those "otherCommand"? I'd be curious to see what they are. We might be able to do a better job at figuring out what command it is.

I'm not sure about the JS error. Is it happening when you set a filter that doesn't match anything?

---

<div class="post-metadata">

**Author:** ![Keylor42](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@Keylor42](https://discuss.elastic.co/u/Keylor42)\
**Post date:** [August 10, 2015, 2:02pm UTC](https://discuss.elastic.co/t/cannot-read-property-group-of-undefined-with-mongodb/27048/4 "2015-08-10T14:02:12Z")

</div>

Hi tudor,

never mind about the otherCommands, they were created by a GUI client I was using with MongoDB.  
The JS error appears when I try to load the full "MongoDB performance" dashboard that is available here : [https://github.com/elastic/packetbeat-dashboards](https://github.com/elastic/packetbeat-dashboards)

I didn't set any filters, I just tried to load the dashboard.

EDIT : I found the panes that were causing the problem. Those are the panes "MongoDB response times by collection" and "Number of MongoDB transactions with writeConcern w=0". If I remove them from the dashboard, the data is displayed and I have no more errors.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 9:59pm UTC](https://discuss.elastic.co/t/cannot-read-property-group-of-undefined-with-mongodb/27048/5 "2017-07-05T21:59:00Z")

</div>


