You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a surreal connection "open" with the HTTPStrategy will work fine for 1 hour as it was recently authed via /login, and returns a token that lives for 1 hour.
But then once using the "connection" for a hour with the first auth attempt the queries will start failing with
Failed to parse JSON
at json (native)
at processTicksAndRejections (:61:39) { originalLine: 61, originalColumn: 39 }
^^ Error from bun but from what I can see its a general issue for node too? But less likly to apply to node as the WebSocketStrategy works in node.
After 1 hour it will fail with Failed to parse JSON
Expected behaviour
Either
5 minutes before the token expires it would reauth for a new token as the login details are still stored, either as a background task or at the point of use(and wait until reauthed)
On auth failure of a query then reauth and reattempt.
First handle it as method 1, but then also handle it safely as method 2 as well.
Describe the bug
Having a surreal connection "open" with the HTTPStrategy will work fine for 1 hour as it was recently authed via /login, and returns a token that lives for 1 hour.
But then once using the "connection" for a hour with the first auth attempt the queries will start failing with
^^ Error from bun but from what I can see its a general issue for node too? But less likly to apply to node as the WebSocketStrategy works in node.
Steps to reproduce
After 1 hour it will fail with
Failed to parse JSON
Expected behaviour
Either
Out of the above I would say method 3.
SurrealDB version
1.0.0+20230913.54aedcd for linux on x86_64
SurrealDB.js version
0.11.0
Contact Details
lucy.e@aspirecomps.co.uk
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: