SAP / SAP/node-hdb

Unable to get property 'tcp' of undefined or null reference

Open
#139 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
322
Forks
99
PR merge metrics
No merged PRs in 30d

Description

I followed few prerequisites steps from https://github.com/SAP/node-hdb/wiki/Develop-Chrome-Apps-for-SAP-HANA and also followed Readme.md from https://github.com/SAP/node-hdb

I will list down the steps here -

  1. npm install hdb
  2. npm install browserify
  3. npm install chrome-net
  4. node ./node_modules/browserify/bin/cmd.js -r buffer -r ./node_modules/hdb/lib:hdb -o ./hdb.js
    Step 4 so that hdb.js is created in root directory where my main.js (that contains connection code and query) and index.html are present.

Now my index.html has below scripts -

<script src="hdb.js"></script> <script src="main.js"></script>

And my main.js has below code--

var hdb = require('hdb');
var client = hdb.createClient({
host: HOSTNAME,
port: PORT,
user: DBUSER,
password: DBPASSWORD
});
client.connect(function (err) {
if (err) {
return console.error('Error:', err);
}
console.log(client.readyState); // connected
});

In above code, createClient works fine but when client.connect is called I am getting "Unable to get property 'tcp' of undefined or null reference" error in console.

Now for above error, when I referred https://github.com/SAP/node-hdb/wiki/Develop-Chrome-Apps-for-SAP-HANA, I could see they added an entry for tcp in manifest.json. But I am not developing chrome extension.

Can you please help, what am I missing here?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the listed browserify command, hdb.js, main.js, index.html, and manifest.json, then compare the setup with the Develop Chrome Apps for SAP HANA wiki. Reproduce the client.connect call and determine whether the tcp entry is required; done means the connection no longer throws the reported undefined-or-null tcp error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.