SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
249 stars 73 forks source link

The specified procedure could not be found error is thrown from 2.4.3 version onwards #229

Closed AnkitSomani22 closed 2 years ago

AnkitSomani22 commented 2 years ago
Error: The specified procedure could not be found.
\\?\C:\test\node_modules\node-rfc\lib\binding\sapnwrfc.node

 The SAP NW RFC SDK could not be loaded, check the installation: https://github.com/SAP/node-rfc/blob/master/doc/installation.md#sap-nwrfc-sdk-installation
environment: {
  "platform": {
    "name": "win32",
    "arch": "ia32",
    "release": "10.0.19042"
  },
  "env": {
    "SAPNWRFC_HOME": "C:\\nwrfcsdk",
    "RFC_INI": "",
    "nwrfcsdk_lib_on_path": true
  },
  "versions": {
    "node": "14.16.1",
    "v8": "8.4.371.19-node.18",
    "uv": "1.40.0",
    "zlib": "1.2.11",
    "brotli": "1.0.9",
    "ares": "1.16.1",
    "modules": "83",
    "nghttp2": "1.41.0",
    "napi": "7",
    "llhttp": "2.1.3",
    "openssl": "1.1.1k",
    "cldr": "37.0",
    "icu": "67.1",
    "tz": "2020a",
    "unicode": "13.0"
  }
}

    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)

Above exception is thrown while calling require('node-rfc').This exception is thrown in latest version 2.5.1.Things are working fine in version 2.4.2 and below.

This issue is machine specific as well. We could reproduce this issue in 3 systems. Below is the environment info of the system.

System: OS: Windows 10 10.0.19042 CPU: (8) ia32 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz Memory: 19.61 GB / 31.84 GB Binaries: Node: 14.16.1 - C:\Program Files\nodejs\node.EXE npm: 6.14.12 - C:\Program Files\nodejs\npm.CMD

bsrdjan commented 2 years ago

Which SAP NWRFC SDK version is used?

AnkitSomani22 commented 2 years ago

latest version of NWRFCSDK which is 7.50.8.

bsrdjan commented 2 years ago

Thanks Ankit. And the node-rfc is locally installed, by npm install node-rfc, correct?

AnkitSomani22 commented 2 years ago

Yes Srdjan

bsrdjan commented 2 years ago

The issue looks similar to #226 but could not reproduce it either.

Could you please activate Windows Process Monitor trace on affected system, to track down which library exactly fails to load (example: https://github.com/SAP/node-rfc/issues/127#issuecomment-600020359) ?

bsrdjan commented 2 years ago

Could you please check if this solution of the similar (same?) issue helps on your system https://github.com/SAP/node-rfc/issues/226#issuecomment-902165661 ?

bsrdjan commented 2 years ago

The log shows:

There should be one copy of SAP NWRFC SDK Libs on PATH and removing the "copies" should fix the issues, similar to https://github.com/SAP/node-rfc/issues/226#issuecomment-902165661

Perhaps some recently installed package installed these additional copies of RFC SDK? Can you eventually found out which one?

bsrdjan commented 2 years ago

Please reopen if support still needed.