"Cannot read property 'then' of null" since 7.14.0
See original GitHub issue💥 Regression Report
Since 7.14.0, we’re seing Cannot read property 'then' of null
errors in @elastic/elasticsearch/lib/Transport.js:167:18
.
May be related with #1516 ? (errors are both nullrefs, but not thrown from the same place)
Last working version
Worked up to version: 7.13.0
(fyi we mistakenly did not pin elasticsearch package minor version in our build pipeline, and we’ve seen that regression in prod, so i’m pretty sure that it has been OK with every version <= 7.13.0 for the past ~2 years)
Stopped working in version: 7.14.0
To Reproduce
I’m not sure… I dont have tried to reproduce it locally.
But call .search()
? (that is the only thing that our code does, and our prod logs suggest that it was failing systematically)
[edit] See snipped here to reproduce
Expected behavior
No errors 😃
Your Environment
Elastic Beanstalk running Node 10 (everything is else default)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top GitHub Comments
Closed in #1594.
That is arguable, in my opinion.
When using a callback philosophy, you are implicitely asked to call the given callback. But it is not supposed to be mandatory to return something. Else, you are effectively forcing the use of promises, and then I dont see the point of passing a callback as an argument of
request()
.Anyway, that is how the lib we use (30k weekly downloads) is doing things, and it was working fine until 7.14.0.
Since this was working before, this looked like a regression to me 😃
Moreover, the incriminated code I linked looked sufficiently smelly to me to think that something was going on here. Thus, I felt compeled to report this.
That is kind of a sterile debate, but if your lib supports what you consider to be buggy implementations, then I think most people will expect it to keep supporting them in following minor versions.
That said, I’m perfectly happy to be stuck with 7.13.0, my point was only to warn you that this version had potential breaking changes 😃