Authentication token has expired. The user must authenticate again error
See original GitHub issueIssue description
When left for a period of time without using it, the snowflake driver seems to throw an “Authentication token has expired. The user must authenticate again” exception the next time you go to use it even on a freshly initialised connection. This goes away when restarting the application. I suspect the currently internal connection pool controls may fix this, but I’m not sure. Is there a way we can re-fetch an Authentication token with the driver currently so a fresh connection is actually a new connection?
Example code
N/A
Error log
If you have an error log, please paste it here.
System.Exception: - Error: Authentication token has expired. The user must authenticate again. SqlState: , VendorCode: 390114, QueryId: - Snowflake.Data.Client.SnowflakeDbException
### Configuration
Version: 2.0.16
Framework Version: Dotnet 6
Issue Analytics
- State:
- Created a year ago
- Comments:8
Top Results From Across the Web
Authentication token has expired. The user must ...
I am facing the same session issue in my project. Exception - "Error: Authentication token has expired. The user must authenticate again.
Read more >ERROR: "Authentication token has expired. The user must ...
This issue occurs because the connection remains idle at the Snowflake end before getting timed out. ... 1) For Solution, enter CR with...
Read more >Solved: Authentication token has expired. The user must a...
Hi,. Replication task is throwing below message but the task is not errored out.If any one have idea please let me know how...
Read more >Using Snowflake, get "Authentication token has expired. ...
Using Snowflake, get "Authentication token has expired. The user must authenticate again." after idle time Follow. Answered.
Read more >Snowflake connector fails with error net.snowflake.client. ...
Message : net.snowflake.client.jdbc.SnowflakeReauthenticationRequest: Authentication token has expired. The user must authenticate again.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Unless I am misunderstanding your issues, these are all from the same root problem in that the connection pooling isn’t implemented correctly. We had similar issue and downgraded to 2.0.13 before connection pooling was introduced.
You can see here that your OpenAsync() is really just pulling from the pool and your CloseAsync() is just releasing connections into the pool.
I haven’t seen this error since updating to this version. Combined with others saying this is fixed for them, I think it’s safe to close right now.