Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oracledb electron crashes on execution #917

Closed
Chinmoy-globalIds opened this issue May 21, 2018 · 7 comments
Closed

oracledb electron crashes on execution #917

Chinmoy-globalIds opened this issue May 21, 2018 · 7 comments

Comments

@Chinmoy-globalIds
Copy link

Chinmoy-globalIds commented May 21, 2018

I am trying to run some Oracle query on an Electron project. When I just run the script alone everything works, but when I run it into my Electron project I keep having this error :

App threw an error during load
Error: NJS-045: cannot load the oracledb add-on binary for Node.js 8.9.3 (win32, x64)
Cannot load C:\Users\Chinmoy Samanta\Desktop\try-it-now\node_modules\oracledb\build\Release\oracledb.node
The system cannot find message text for message number 0x%1 in the message file for %2.
\\?\C:\Users\Chinmoy Samanta\Desktop\try-it-now\node_modules\oracledb\build\Release\oracledb.node
Node-oracledb installation instructions: https://oracle.github.io/node-oracledb/INSTALL.html
You must have 64-bit Oracle client libraries in your PATH environment variable.
If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from
http://www.oracle.com/technetwork/topics/winx64soft-089540.html
A Microsoft Visual Studio Redistributable suitable for your Oracle client library version must be available.

    at Object.<anonymous> (C:\Users\Chinmoy Samanta\Desktop\try-it-now\node_modules\oracledb\lib\oracledb.js:69:13)
    at Object.<anonymous> (C:\Users\Chinmoy Samanta\Desktop\try-it-now\node_modules\oracledb\lib\oracledb.js:602:3)
    at Module._compile (module.js:642:30)
    at Object.require.extensions.(anonymous function) [as .js] (C:\Users\Chinmoy Samanta\Desktop\try-it-now\node_modules\electron-compile\lib\require-hook.js:77:14)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (module.js:586:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\Chinmoy Samanta\Desktop\try-it-now\node_modules\oracledb\index.js:1:173)
@dmcghan
Copy link

dmcghan commented May 21, 2018

@Chinmoy-globalIds See these notes regarding Electron: #881 (comment)

Electron uses custom versions of Node.js (modified V8) so you need to compile the driver for that version. The notes there explain one way to do this and have a link to the details.

@n-riesco
Copy link

n-riesco commented May 23, 2018

I'm affected by the same issue. See plotly/falcon#437 (comment) .

@dmcghan I've tried .\node_modules\.bin\electron-rebuild.cmd --version=2.0.1 --arch=x64 --only=oracledb as suggested, and I get NAN-related errors like these already reported by @lealhugui in #862 (comment) .

@cjbj
Copy link
Member

cjbj commented May 24, 2018

@n-riesco The NAN issues we saw & fixed on the master branch with NAN 2.10 were only warnings. The errors in https://gist.github.com/lealhugui/3020caa8b961618c9bf48aa34f1c437c are something different; I noted that iojs-1.7.6 seemed to be used!?

@n-riesco
Copy link

@cjbj It's getting late here. I'll explain in more detail tomorrow, but briefly here are the solutions I found:

  • solution 1: use electron-rebuild (it requires to add nan as a devDependence)
  • solution 2: use the source package from github (npm install https://github.com/oracle/node-oracledb/releases/download/v2.2.0/oracledb-src-2.2.0.tgz)

@cjbj
Copy link
Member

cjbj commented May 24, 2018

@n-riesco That's great. Can you open a new issue and give your steps? That will make it easier to reference and for future Electron readers to find - they will love you.

@n-riesco
Copy link

@cjbj See #918

@cjbj
Copy link
Member

cjbj commented May 25, 2018

@n-riesco thank you. Since the original poster here hasn't been active, I'll close this.

@cjbj cjbj closed this as completed May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants