hgourvest / node-firebird

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

bug in node-firebird 1.1.5 package #306

Open FranReza opened 1 year ago

FranReza commented 1 year ago

Approximately 1 month ago I was assigned a web project that would work with Firebird SQL and Node JS, when I started the development of the project everything was going quite well, I installed the dependencies that I needed, including node-firebird (latest version 1.1.5) and configured the connection to Firebird, I created the queries and the design of the views of my application, I developed a login interface and a main panel, everything was perfect, I had GET and POST type routes that brought me some employee information among other things, until I notice something very strange.

Every time my backend received GET and POST requests when updating the page, it worked fine, but sometimes, the web server stopped showing the following error: Your user name and password are not defined. Ask your database administrator to set up a Firebird login node-firebird this error seemed quite strange to me since I configured a file called config.js where I created a javascript object and defined the values ​​of the connection (username, password, path database, etc.), and exported it as a module to my controllers, I didn't quite understand what was happening, I looked if someone presented these errors in forums or sites like stackoverflow and github and I didn't find anything. Every time I updated a component of my page with a query to the database it worked fine, but sometimes it didn't render and my server stopped because it showed the same error over and over again, sometimes when I started the session it worked, I made a query in my application as client list and it worked, then I went back to that part of my application and the server stopped showing the same error as always.

I tried to change the database to use in my project but it was not allowed, I read the node-firebird documentation on npm.io and I didn't find any problem until I saw the versions of this package, I found out that the most popular and downloaded version of node-firebird was the 0.9.9 of the year 2020, this version was the most downloaded while those of the year 2022-2023 were not so famous, I took a risk and downloaded the 0.9.9 and it was solved. My application was no longer stopping and everything was working correctly and without problems.

I consider it to be a bug since all my development was done locally, http://localhost:5000/ both the database and the web application. It was not a damaged or old database either (they use firebird 3.0.9) I configured CORS on more than one occasion for POST requests, I edited my files on more than one occasion and the only thing that occurred to me was to live with the error and look for solutions so that when the error is caught, the server will update the view again and reload the data.

If someone has the same problem as me, then this is the solution... thanks.

hot-taut commented 11 months ago

@mariuz @hgourvest

We have the same issue and this is still an issue with the latest version in 1.1.8 and it occurs for us in production. Are you willing to investigate and fix this as there has been no update on this issue since months?

FranReza commented 11 months ago

A long time ago I left the project I was doing with node-firebird, but the truth is that it would be interesting to solve the problem, how could I investigate? Are you talking about inspecting the source code?

hot-taut commented 3 months ago

@mariuz @hgourvest Is there any chance to get support for this issue?

FranReza commented 3 months ago

@hot-taut In my case, I decided to switch to C# and ASP.NET to create a REST API with the FirebirdSql.Data.FirebirdClient package