JS Crash

Chris Lusby shared this question 2 months ago
Need Answer

v10.0 -- I keep getting a blank screen when using the aggregation builder - devtools stack below


C:\Program Files\dbKoda\resources\electron.asar\renderer\init.js:151 Electron Security Warning This renderer process has Node.js integration enabled and attempted to load remote content. This exposes users of this app to severe security risks.

For more information and help, consult https://electronjs.org/docs/tutorial/security

(anonymous) @ C:\Program Files\dbKoda\resources\electron.asar\renderer\init.js:151

profiles.js:75 Profiles loaded successfully!

index.jsx:47 Last Store Version: 0.10.0

index.jsx:48 Last Ping: undefined

GraphicalBuilder.jsx:127 SyntaxError: Unexpected number in JSON at position 4

at JSON.parse (<anonymous>)

at GraphicalBuilder.jsx:113

at <anonymous>

(anonymous) @ GraphicalBuilder.jsx:127

GraphicalBuilder.jsx:410 Result[ 1 ] is invalid: Array(0)

(anonymous) @ GraphicalBuilder.jsx:410

bootstrap_node.js:1 [{"_id":"ObjectId('5ab023c9c5e89d08dade27d7')"...obfuscated...}]

react-dom.production.min.js:163 TypeError: Cannot read property 'replace' of undefined

at _ (Panel.jsx:63)

at t.value (DataTreeDataNodeDragLayer.jsx:65)

at u (react-dom.production.min.js:129)

at beginWork (react-dom.production.min.js:133)

at o (react-dom.production.min.js:160)

at i (react-dom.production.min.js:160)

at s (react-dom.production.min.js:161)

at y (react-dom.production.min.js:167)

at S (react-dom.production.min.js:167)

at T (react-dom.production.min.js:165)

l @ react-dom.production.min.js:163

react-dom.production.min.js:167 Uncaught TypeError: Cannot read property 'replace' of undefined

at _ (Panel.jsx:63)

at t.value (DataTreeDataNodeDragLayer.jsx:65)

at u (react-dom.production.min.js:129)

at beginWork (react-dom.production.min.js:133)

at o (react-dom.production.min.js:160)

at i (react-dom.production.min.js:160)

at s (react-dom.production.min.js:161)

at y (react-dom.production.min.js:167)

at S (react-dom.production.min.js:167)

at T (react-dom.production.min.js:165)

GraphicalBuilder.jsx:956 SyntaxError: Unexpected token : in JSON at position 10

at JSON.parse (<anonymous>)

at GraphicalBuilder.jsx:946

at v (mobx.module.js:911)

at O (mobx.module.js:1157)

at GraphicalBuilder.jsx:945

at <anonymous>

(anonymous) @ GraphicalBuilder.jsx:956

Comments (4)

photo
1

Hi Chris,


Thanks for lodging this bug!


Looks like the aggregate builder got some output back from the collection that it couldn't handle, I'll try and reproduce this bug and let you know. We'll also add some better error handling around this feature so it doesn't just break when it hits an exception like this.


Cheers, Michael from dbKoda.

photo
1

Hi Chris,


I've been trying over the past couple of days to reproduce your exact issue, but I can't seem to get it to happen with our sample data set. Do you have any special characters or types within your data set as far as you know?


If you could send us a support bundle to help diagnose the issue, that would be fantastic. To create a support bundle, after you encounter the issue, simple restart the product, and in the bottom right corner of the screen press the little '!' button to create a zip file containing the logs for dbKoda.


Cheers,

Mike from dbKoda.

photo
1

I can't send details of what's in the collection sorry, as it's IP. Is there anything I can extract before sending it on? The results don't have special characters.

It does have 8m records though, so the aggr builder isn't usable in it's current form...I want to run a query like:

db.getCollection("trades").aggregate([

{ $match:{ "$or":[

{ "DateTime":{ $gte:new ISODate("2018-03-15") } }

]

}

},

{ $limit: 100 },

],{allowDiskUse: true});

Given I am matching as a first step, I can't use the initial sample size as I might not see any results. I want to match first and then sort/limit.

Depending where you click / open a saved query then it will try and run the 'start' command and load all 8m records. Instead can the output use a cursor and paginate?

Thanks

photo
1

Hi Chris,

We have a build that uses a cursor to pull the first 20 (by default) rows rather than fetch all of the pipeline into an array. You can get windows and mac builds here: https://github.com/SouthbankSoftware/dbkoda/releases/tag/0.10.2 . If you are on Linux let me know.

In testing with sampling turned off, this build is substantially faster, but it can still be laggy when there are "big" preceding steps in the pipeline. In a future build, we'll support having our sampling take place after the first step so that a $match can run before the sampling. In the meantime you could try doing this manually if it would help.

Let me know if this helps.

Regards,

Guy from dbKoda.