hgourvest / node-firebird

Pure javascript and asynchronous Firebird client for Node.js.
Mozilla Public License 2.0
258 stars 130 forks source link

Migratin to 4.0 error #323

Closed mateusvieites closed 9 months ago

mateusvieites commented 9 months ago

"I performed the configurations mentioned for version 4.0. Upon researching, I found information that it was a '10054' error, which indicates that the client is closing before the communication is completed. Even in my previous 2.5 version, it was working" The username and password are the same as I use to log in through IBExpert.

Firebird.conf:

AuthServer = Srp256, Win_Sspi, Srp, Legacy_Auth UserManager = Legacy_UserManager WireCrypt = Disabled

Firebird Config installation: firebird4cfg

Firebird.log

DESKTOP-P5183N4 Fri Feb 2 10:40:20 2024 INET/inet_error: read errno = 10054, client host = DESKTOP-P5183N4, address = 127.0.0.1/52030, user = Home

Console Error

C:\Users\Home\Desktop\testFirebird\node_modules\node-firebird\lib\index.js:3454
        throw err;
        ^

Error: Error occurred during login, please check server firebird.log for details
    at doCallback (C:\Users\Home\Desktop\testFirebird\node_modules\node-firebird\lib\index.js:1360:21)
    at C:\Users\Home\Desktop\testFirebird\node_modules\node-firebird\lib\index.js:3138:21
    at loop (C:\Users\Home\Desktop\testFirebird\node_modules\node-firebird\lib\index.js:3198:29)
    at parseOpResponse (C:\Users\Home\Desktop\testFirebird\node_modules\node-firebird\lib\index.js:3481:29)
    at decodeResponse (C:\Users\Home\Desktop\testFirebird\node_modules\node-firebird\lib\index.js:3203:24)
    at Socket.<anonymous> (C:\Users\Home\Desktop\testFirebird\node_modules\node-firebird\lib\index.js:3115:13)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5) {
  gdscode: 335545106,
  gdsparams: undefined
}

My code:

import Firebird from "node-firebird";
const attach = {
    host: "localhost",
    port: 3050,
    database: "C:\Nirin\CPDControl\Data\control.FDB",
    user: "SYSDBA",
    password: "masterkey",
    retryConnectionInterval: 1000,
  };

//Yes i am using a test 
Firebird.attach(attach, function(err, db) {
    if (err)
        throw err;
    // db = DATABASE
    db.query('INSERT INTO USERS (ID, ALIAS, CREATED) VALUES(?, ?, ?) RETURNING ID', [1, 'Pe\'ter', new Date()], function(err, result) {
        console.log(result[0].id);
        db.query('SELECT * FROM USERS WHERE Alias=?', ['Peter'], function(err, result) {
            console.log(result);
            db.detach();
        });
    });
});