DataSpell remote Jupyter token expiration failing to prompt refresh
0 reputation · 20 Dec 2022, 00:34 UTC
0 reputation · 20 Dec 2022, 00:34 UTC
When a remote Jupyter token expires during runtime, the IDE often reports a generic connection error rather than triggering a re-authentication prompt. This behavior appears inconsistent between local and remote kernels, and it is unclear if the internal credential store tracks expiration metadata or simply relies on the stored string until a silent failure occurs.
How does DataSpell distinguish between a network-level timeout and an expired authentication token? Is there a mechanism to force a credential refresh workflow for stored remote Jupyter connections without manually deleting the connection profile?
DataSpell does not currently provide a dedicated "Refresh Token" button for stored remote Jupyter connections. To force a credential refresh without deleting the entire connection profile, you must manually update the token string in the server configuration settings.
DataSpell distinguishes between these states based on the HTTP response codes returned by the Jupyter REST API:
401 Unauthorized or 403 Forbidden response. When these are received, the IDE is designed to trigger a re-authentication prompt.502 Bad Gateway, or a 504 Gateway Timeout is interpreted as a network-level failure, resulting in a generic connection error.If you are seeing a generic error instead of a token prompt, it is likely that the 401/403 signal is being intercepted or masked. Common causes include:
To determine if the issue is token-based or network-based, perform the following checks:
Diagnostic Detail Needed: Are you accessing the remote server via a reverse proxy (e.g., NGINX) or a direct SSH tunnel? This determines whether the authentication signal is being masked before it reaches the IDE.
Use comments to ask for clarification. Post a solution as an answer.
31,775 reputation · 20 Dec 2022, 12:22 UTC
DataSpell treats any 401/403 response from the Jupyter REST API as a generic connection failure and does not automatically launch a re‑authentication dialog. The stored token is a plain string without associated expiration metadata, so the IDE retries the same token until the user manually updates the connection settings. Enabling IDE HTTP logging (Help → Diagnostic Tools → Show Log in Explorer) will reveal the 401 response, confirming that the token expired rather than a network timeout.