TypeError: Uncaught error: Cannot read property 'length' of undefined
sagdelen opened this issue · 3 comments
I am using version node-neo4j 2.0.0-RC2 and very pleased with it, thanks for your efforts but last night i got interesting error on random requests like the following.
Debug: internal, implementation, error
TypeError: Uncaught error: Cannot read property 'length' of undefined
at /app/node_modules/neo4j/lib-new/GraphDatabase.js:268:44
at /app/node_modules/neo4j/lib-new/GraphDatabase.js:286:13
at Request._callback (/app/node_modules/neo4j/lib-new/GraphDatabase.js:92:20)
at Request.self.callback (/app/node_modules/request/request.js:200:22)
at emitTwo (events.js:100:13)
at Request.emit (events.js:185:7)
at Request.<anonymous> (/app/node_modules/request/request.js:1067:10)
at emitOne (events.js:95:20)
at Request.emit (events.js:182:7)
at IncomingMessage.<anonymous> (/app/node_modules/request/request.js:988:12)
at emitNone (events.js:85:20)
at IncomingMessage.emit (events.js:179:7)
at endReadableNT (_stream_readable.js:913:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
There is no further stack trace.
I could not regenerate the same problem on my local machine but easily regenerating on heroku hosted web application (node version: 5.11.1 and neo4j instance is hosted on graph story by the way)
The same query runs and returns result for example 3 times perfectly and then it starts giving this error 2 times then runs 4 times without any problems, etc. To sum up, it is giving this error randomly.
The query is pretty large, about 50 lines with 3 unions.
I know this information is not enough to identify and fix a bug but this is all i got :)
Can you help me on this one?
@agdelen: Great that you closed this, which I assume means it resolved for you.
Do you mind sharing what the resolution was? Thanks!
Actually it was very difficult for me to find the source but i manage to find it after a while.
There was an uncaught exception happening just before the query execution and it was affecting query parameters. Since it was hidden in the promise block without a catch block the actual stack trace was invisible which makes it very hard to locate.
To make it short it was not related to your framework, thats why i did not make any comment on the issue and closed it.
Thanks for the info! Glad you got it figured out.