dosubot[bot] commented on issue #37753:
URL: https://github.com/apache/superset/issues/37753#issuecomment-3861348189

   <!-- Answer -->
   The async-token cookie is set by Superset only if the async queries feature 
is enabled, the after_request handler is registered, and the backend is running 
with supported versions. Here are the most likely reasons you aren't seeing the 
cookie:
   
   1. **Python/Node version**: Superset's async queries and websocket features 
require Python 3.10 or 3.11 and Node.js 20.x. Using Python 3.9 and Node 16 (as 
in your setup) is not supported and will prevent the async-token cookie from 
being set and break websocket connections. Upgrade both to the required 
versions and rebuild your containers.  
      [Reference](https://github.com/apache/superset/issues/36069)
   
   2. **Backend must emit Set-Cookie**: In the browser's Network tab, check the 
response headers for a Set-Cookie: async-token=... header after logging in or 
loading /superset/welcome/. If it's missing, the backend isn't issuing the 
cookie—likely due to feature flag or version issues. If it's present but not 
stored, it's a browser/cookie attribute issue.
   
   3. **Config and restart**: Make sure GLOBAL_ASYNC_QUERIES = True, 
GLOBAL_ASYNC_QUERIES_TRANSPORT = "ws", and all JWT/cookie settings match in 
both Superset and websocket config. After any config change, restart the Flask 
server and do a hard refresh in your browser to ensure the frontend uses the 
latest settings.  
      [Reference](https://github.com/apache/superset/issues/36069)
   
   4. **/superset/welcome/ is normal**: Superset's default URL structure 
includes /superset/ as a prefix; this does not indicate a subpath deployment or 
cause cookie issues unless you have set SUPERSET_APP_ROOT.
   
   5. **Websocket server health**: The 502 Bad Gateway means nginx can't reach 
the websocket server. Make sure the superset-websocket service is running and 
accessible at the expected address and port.
   
   If you upgrade Python and Node, confirm the Set-Cookie header is present, 
and ensure both backend and websocket server are running with matching config, 
the async-token cookie should be set and websocket auth should work.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/27619a85-9a19-4e59-8813-78e73ed91ffe?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/27619a85-9a19-4e59-8813-78e73ed91ffe?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/27619a85-9a19-4e59-8813-78e73ed91ffe?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/27619a85-9a19-4e59-8813-78e73ed91ffe?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/27619a85-9a19-4e59-8813-78e73ed91ffe?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/27619a85-9a19-4e59-8813-78e73ed91ffe?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/27619a85-9a19-4e59-8813-78e73ed91ffe?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20async-token%20cookie%20is%20set%20by%20Superset%20only%20if%20the%20async%20queries%20feature%20is%20enabled%2C%20the%20after_request%20handler%20is%20registered%2C%20and%20the%20backend%20is%20running%20with%20supported%20versions.%20Here%20are%20the%20most%20likely%20reasons%20you%20aren%27t%20seeing%20the%20cookie%3A%0A%0A1.%20%2A%2APython/Node%20version%2A%2A%3A%20Superset%27s%20async%20queries%20and%20websocket%20features%20require%20Python%203.10%20or%203.11%20and%20Node.js%2020.x.%20Using%20Python%203.9%20and%20Node%2016%20%28as%20in%20your%20setup%29%20is%20not%20supported%20and%20will%20prevent%20the%20async-token%20cookie%20from%20being%20set%20and%20break%20websocket%20connections.%20Upgrade%20both%20to%20the%20required%20versions%
 
20and%20rebuild%20your%20containers.%20%20%0A%20%20%20%5BReference%5D%28https%3A//github.com/apache/superset/issues/36069%29%0A%0A2.%20%2A%2ABackend%20must%20emit%20Set-Cookie%2A%2A%3A%20In%20the%20browser%27s%20Network%20tab%2C%20check%20the%20response%20headers%20for%20a%20Set-Cookie%3A%20async-token%3D...%20header%20after%20logging%20in%20or%20loading%20/superset/welcome/.%20If%20it%27s%20missing%2C%20the%20backend%20isn%27t%20issuing%20the%20cookie%E2%80%94likely%20due%20to%20feature%20flag%20or%20version%20issues.%20If%20it%27s%20present%20but%20not%20stored%2C%20it%27s%20a%20browser/cookie%20attribute%20issue.%0A%0A3.%20%2A%2AConfig%20and%20restart%2A%2A%3A%20Make%20sure%20GLOBAL_ASYNC_QUERIES%20%3D%20True%2C%20GLOBAL_ASYNC_QUERIES_TRANSPORT%20%3D%20%22ws%22%2C%20and%20all%20JWT/cookie%20settings%20match%20in%20both%20Superset%20and%20websocket%20config.%20After%20any%20config%20change%2C%20restart%20the%20Flask%20server%20and%20do%20a%20hard%20refresh%20in%20your%20browser%20
 
to%20ensure%20the%20frontend%20uses%20the%20latest%20settings.%20%20%0A%20%20%20%5BReference%5D%28https%3A//github.com/apache/superset/issues/36069%29%0A%0A4.%20%2A%2A/superset/welcome/%20is%20normal%2A%2A%3A%20Superset%27s%20default%20URL%20structure%20includes%20/superset/%20as%20a%20prefix%3B%20this%20does%20not%20indicate%20a%20subpath%20deployment%20or%20cause%20cookie%20issues%20unless%20you%20have%20set%20SUPERSET_APP_ROOT.%0A%0A5.%20%2A%2AWebsocket%20server%20health%2A%2A%3A%20The%20502%20Bad%20Gateway%20means%20nginx%20can%27t%20reach%20the%20websocket%20server.%20Make%20sure%20the%20superset-websocket%20service%20is%20running%20and%20accessible%20at%20the%20expected%20address%20and%20port.%0A%0AIf%20you%20upgrade%20Python%20and%20Node%2C%20confirm%20the%20Set-Cookie%20header%20is%20present%2C%20and%20ensure%20both%20backend%20and%20websocket%20server%20are%20running%20with%20matching%20config%2C%20the%20async-token%20cookie%20should%20be%20set%20and%20websocket%20auth%20sh
 ould%20work.)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37753)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to