cube icon indicating copy to clipboard operation
cube copied to clipboard

ElasticSearch Driver: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type undefined

Open chadfaurie opened this issue 6 years ago • 5 comments

Describe the bug When Running the elasticsearch driver in the latest version I get the following: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type undefined

To Reproduce Steps to reproduce the behavior: Use ElasticSearch Cloud driver with demo data and CubeJS playground

Expected behavior No error on requesting data from elastic

Screenshots If applicable, add screenshots to help explain your problem.

Version: 0.19.13

Additional context

chadfaurie avatar Apr 24 '20 06:04 chadfaurie

This issue is caused by passing empty strings in Client initializer for ElasticSearch

chadfaurie avatar Apr 24 '20 09:04 chadfaurie

Should maybe have a graceful way of notifying the user?

chadfaurie avatar Apr 24 '20 09:04 chadfaurie

@chad-codeworkshop Hey Chad! Do you mean we need add sanity check to see if arguments passed? I believe it'd be helpful.

paveltiunov avatar Apr 24 '20 22:04 paveltiunov

@chad-codeworkshop Hey Chad! Do you mean we need add sanity check to see if arguments passed? I believe it'd be helpful.

Yeah, i spent about an hour tracking down the issue and it was something as simple as environment variables not being set, so the elastic Client failed

I will start having a look at how to implement this in the coming week

chadfaurie avatar Apr 25 '20 08:04 chadfaurie

If you are interested in working on this issue, please leave a comment below and we will be happy to assign the issue to you. If this is the first time you are contributing a Pull Request to Cube.js, please check our contribution guidelines. You can also post any questions while contributing in the #contributors channel in the Cube.js Slack.

github-actions[bot] avatar Dec 05 '20 06:12 github-actions[bot]