Skip to content

Electron and oracledb #1050

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

Closed
leschi opened this issue Feb 18, 2019 · 3 comments
Closed

Electron and oracledb #1050

leschi opened this issue Feb 18, 2019 · 3 comments

Comments

@leschi
Copy link

leschi commented Feb 18, 2019

Hi,

I just installed node-oracledb as mentioned in the Qucik startup guide.
I want to get some values from my Oracle DB into my electron app.
At start the error appears (see 4.).
I only use the example file.
Do you have ideas how to solve the problem?

  1. What is your Node.js version: use console.log(process.version)? Is it 64-bit or 32-bit: use console.log(process.arch)?

v6.5.0
x64

  1. What is your node-oracledb version: use console.log(oracledb.versionString)?
    3.1.1

  2. What exact command caused the problem (e.g. what command did you try to install with)? Who were you logged in as?
    It shows up at the start up of the electron app in the development console.

  3. What error(s) you are seeing?

Uncaught Error: NJS-045: cannot load the oracledb add-on binary for Node.js 6.5.0 (win32, x64)
Cannot load C:\Users\poech\OneDrive\Apotheke Terminal\js\oracledb\build\Release\oracledb.node
Eine DLL-Initialisierungsroutine ist fehlgeschlagen.
\?\C:\Users\poech\OneDrive\Apotheke Terminal\js\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.

  1. What OS (and version) is Node.js executing on: use console.log(process.platform)?
    win32

  2. What is your Oracle client (e.g. Instant Client) version: use console.log(oracledb.oracleClientVersionString)? Is it 64-bit or 32-bit? How was it installed? Where is it installed?
    instantclient-basic-windows.x64-18.3.0.0.0

I have copied the folder to my drive and added the folder to the PATH variable.
D:\instantclient_18_3

  1. What is the PATH environment variable (on Windows) or LD_LIBRARY_PATH (on Linux) set to? On macOS, what is in ~/lib?

D:\instantclient_18_3;C:\Program Files\Microsoft MPI\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\AMD\StoreMI\ECmd;C:\Program Files\PuTTY;C:\Program Files\WIDCOMM\Bluetooth Software;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;D:\Windows Kits\10\Microsoft Application Virtualization\Sequencer;C:\Python27;C:\Program Files\nodejs;C:\Program Files\Git\cmd;D:\Windows Kits\10\Windows Performance Toolkit;C:\Users\poech\AppData\Local\Microsoft\WindowsApps;C:\Users\poech\AppData\Roaming\npm;C:\Users\poech\AppData\Local\GitHubDesktop\bin;C:\Users\poech\AppData\Local\Programs\Microsoft VS Code\bin

  1. What Oracle environment variables did you set? How exactly did you set them?
    I just used the example in my electron app.
  2. Do you have a small, single Node.js script that immediately runs to show us the problem?
    It´s the sample.
    https://github.com/oracle/node-oracledb/blob/master/examples/example.js#L32
@cjbj
Copy link
Member

cjbj commented Feb 18, 2019

Install a canonical Node.js binary and run example.js with it to check that you have the VC redistributables, the right Instant Client etc, and that you restarted your shell after updating PATH.

After that, look at #918. A common problem is that Electron is built differently to the standard Node.js binaries. Since node-oracledb was built with those standard binaries you can end up with a non-functional Electron. You might need to rebuild node-oracledb from source code using one of the solutions in #918, e.g. with electron-builder.

@leschi
Copy link
Author

leschi commented Feb 19, 2019

Thanks a lot !! it worked !!!

Do you know if it is posible to run it on a raspberry pi (arm)?

@cjbj
Copy link
Member

cjbj commented Feb 20, 2019

@leschi glad you got it going.

There's no ARM port of the Oracle Client libraries.

@cjbj cjbj closed this as completed Feb 20, 2019
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

2 participants