oracle / oracle/node-oracledb

NJS-505: unable to initiate TLS connection

Open
#1,767 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
JavaScript
Stars
2.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

  1. What versions are you using?
    node-oracledb : 6.10.0
  1. Describe the problem

I am facing an issue establishing a connection to the Oracle DB through node-oracledb, while the connection works successfully using tools like SQL Developer and JetBrains DataGrip with the same walletLocation.

[Nest] 36856  - 20/02/2026, 12:20:52 pm   ERROR [TypeOrmModule] Unable to connect to the database (oracleConnection). Retrying (1)...
Error: NJS-505: unable to initiate TLS connection. Please check if wallet credentials are valid
error:1C800064:Provider routines::bad decrypt
    at Object.throwErr (root\node_modules\oracledb\lib\errors.js:776:10)
    at NTTCP.connect (root\node_modules\oracledb\lib\thin\sqlnet\ntTcp.js:246:18)
    at async NetworkSession.transportConnect (root\node_modules\oracledb\lib\thin\sqlnet\networkSession.js:182:5)
    at async NetworkSession.connect2 (root\node_modules\oracledb\lib\thin\sqlnet\networkSession.js:222:7)
    at async NetworkSession.connect1 (root\node_modules\oracledb\lib\thin\sqlnet\networkSession.js:336:23)
    at async NetworkSession.connect (root\node_modules\oracledb\lib\thin\sqlnet\networkSession.js:623:5)
    at async ThinConnectionImpl.connect (root\node_modules\oracledb\lib\thin\connection.js:859:5)
    at async ThinPoolImpl.bgThreadFunc (root\node_modules\oracledb\lib\thin\pool.js:470:11)
  1. Include a runnable Node.js script that shows the problem.
TypeOrmModule.forRootAsync({
            name: 'oracleConnection',
            imports: [ConfigModule],
            useFactory: (configService: ConfigService) => {
                const walletLocation = path.resolve(configService.getOrThrow<string>('ORACLE_WALLET_LOCATION'));
                return {
                    type: 'oracle',
                    username: configService.getOrThrow('ORACLE_DB_USERNAME'),
                    password: configService.getOrThrow('ORACLE_DB_PASSWORD'),
                    connectString: configService.getOrThrow('ORACLE_DB_TNS_ALIAS'),
                    extra: {
                        configDir: walletLocation,
                        walletLocation: walletLocation,
                        queueTimeout: 120000,
                    },
                    logging: true,
                } as OracleConnectionOptions;
            },
            inject: [ConfigService],
        })

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 supplied TypeOrmModule configuration and node-oracledb 6.10.0 setup, then inspect lib/errors.js and lib/thin/sqlnet/ntTcp.js around the reported NJS-505 stack. Reproduce the TLS failure with the provided wallet and connection settings; done requires a confirmed cause and a documented fix or regression coverage, but the report lacks the required environment and database details.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.