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

Cannot read property 'serialize' of undefined #11

Open
arriflex opened this issue Nov 14, 2018 · 2 comments
Open

Cannot read property 'serialize' of undefined #11

arriflex opened this issue Nov 14, 2018 · 2 comments

Comments

@arriflex
Copy link

I feel like I'm doing something wrong. The map is being rendered appropriately, and the polygon features I placed in a geoJSON file are being rendered on top properly. Each of the features has a property labeled "serial" and strings such as "MIBB018795" which are known values for the same tag I'm grouping on from InfluxDB metric. My metric query does not include any aliasing.

In the GeoLoop tab within Grafana I've defined the GeoJSON ID Path as properties.serial and typed serial into the Series GeoID Tag field.

I have another panel on the same dashboard with the same exact query to verify that data is being returned and using the legend to make sure the tag values are correct.

Nevertheless, the panel containing the GeoLoop is showing a red alert triangle in the top left corner that provides the following JS error with further information. Any ideas what I might be doing wrong?

This plugin looks so perfect for what I want to do I really want to get it working!

TypeError: Cannot read property 'serialize' of undefined at eval (http://site.com/public/plugins/citilogics-geoloop-panel/libs/mapbox-gl.js:305:12364) at Array.map (<anonymous>) at t.serialize (http://site.com/public/plugins/citilogics-geoloop-panel/libs/mapbox-gl.js:305:12328) at t._validate (http://site.com/public/plugins/citilogics-geoloop-panel/libs/mapbox-gl.js:305:14488) at t.addSource (http://site.com/public/plugins/citilogics-geoloop-panel/libs/mapbox-gl.js:305:7248) at e.addSource (http://site.com/public/plugins/citilogics-geoloop-panel/libs/mapbox-gl.js:391:10376) at GeoLoopCtrl.updateGeoDataFeatures (http://site.com/public/plugins/citilogics-geoloop-panel/geoloop_ctrl.js:432:28) at GeoLoopCtrl.onDataReceived (http://site.com/public/plugins/citilogics-geoloop-panel/geoloop_ctrl.js:340:18) at s.emit (http://site.com/public/build/vendor.d1f313cb0bbe86ea2d5f.js:85:14583) at t.emit (http://site.com/public/build/app.d1f313cb0bbe86ea2d5f.js:13:276422)

@samhatchett
Copy link
Member

could you post a screen shot of this, so we can just check the returned data format?

I have another panel on the same dashboard with the same exact query to verify that data is being returned and using the legend to make sure the tag values are correct.

@arriflex
Copy link
Author

I think I figured out what is happening, roughly. It seems to be fixed by a browser refresh assuming all of the pieces are appropriately configured. I've been able to reproduce the problem a couple of times where, if I misconfigure Series GeoID Tag, I get that error and it is unable to recover even when I reconfigure it properly and hit the Grafana refresh icon. Only a browser refresh or a duplication of the panel is able to reset the error as seen by the last screenshot which was post browser refresh.

The most recent thing to cause it was resizing my browser window. Here are a couple screenshots resulting. This was working before I resized the window and I was able to get it working again without resizing the window but with a couple browser refreshes.

screenshot 2018-11-14 09 17 59
screenshot 2018-11-14 09 18 23
screenshot 2018-11-14 09 24 29

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

2 participants