Surrealdb js sdk disconnect and reconnect again but fail to authenticate
Steps to reproduce
I have a process which listen to a live query using this library and I'm hosting the DB inside docker on an vps, after around 1 day it tried to reconnect and failed to authenticate. My internet connection was ok all the time so I don't know why it disconnected and tried to reconnect.
Here is the code I'm using to connect to my db
const db = new Surreal();
async function initDb() {
logger.info(`Connecting to ${process.env.SURREAL_URL} with NS ${process.env.ROOT_NS}, DB ${process.env.ROOT_DB}`);
await db.connect(process.env.SURREAL_URL, {
auth: {
username: "root",
password: "mypassword",
},
namespace: process.env.ROOT_NS,
database: process.env.ROOT_DB,
});
}
Expected behaviour
The connection should be consistent, and if it disconnect, it should be able to authenticate again
SurrealDB version
v1.3.1
SurrealDB.js version
0.11.0
Contact Details
triracle@gmail.com
Is there an existing issue for this?
[X] I have searched the existing issues
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Describe the bug
Surrealdb js sdk disconnect and reconnect again but fail to authenticate
Steps to reproduce
I have a process which listen to a live query using this library and I'm hosting the DB inside docker on an vps, after around 1 day it tried to reconnect and failed to authenticate. My internet connection was ok all the time so I don't know why it disconnected and tried to reconnect.
Here is the code I'm using to connect to my db
Expected behaviour
The connection should be consistent, and if it disconnect, it should be able to authenticate again
SurrealDB version
v1.3.1
SurrealDB.js version
0.11.0
Contact Details
triracle@gmail.com
Is there an existing issue for this?
Code of Conduct