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

   <!-- Answer -->
   That error means Superset tried to add a Flask LocalProxy object (like 
g.user) to the SQLAlchemy session, but only real ORM model instances are 
allowed—so SQLAlchemy raised a mapping error. This usually happens as a side 
effect of session or user context issues, not as a direct cause of 404/405 
routing errors, but it can signal underlying problems with session management, 
authentication, or version mismatches in your environment. 
   
   This warning is often triggered by version mismatches (Superset now requires 
Python 3.10/3.11 and Node.js 20.x), incomplete asset builds, or misconfigured 
authentication/session context. It can also be caused by Redis/cache 
misconfiguration or missing reCAPTCHA keys if you use LDAP with 
AUTH_USER_REGISTRATION enabled. In Helm/cloud setups, double-check your Redis 
and authentication configs, and make sure all dependencies are on supported 
versions [reference](https://github.com/apache/superset/issues/35823) 
[reference](https://github.com/apache/superset/discussions/35997) 
[reference](https://github.com/apache/superset/discussions/36296).
   
   A fix for this was merged in April 2025 (PR #33025), which unwraps the 
LocalProxy before adding the user to the session, so if your image is 
up-to-date, you should not see this error anymore 
[reference](https://github.com/apache/superset/pull/33025). If you still see 
it, it’s likely a sign of a session or context mismatch—sometimes triggered by 
ingress rewrites, missing cookies, or CSRF/session token issues, which can also 
cause 404s on certain endpoints.
   
   If you can correlate these errors with specific request paths or actions, 
that will help pinpoint whether a session/auth issue is causing both the 
LocalProxy warning and the routing errors. Otherwise, focus on verifying your 
runtime versions, asset builds, and session/auth configs. Let me know if you 
spot a pattern in the logs or need help digging into a specific path or action.
   
   
   <!-- 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/edb22955-26a6-4216-83ac-a9a9d5151452?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/edb22955-26a6-4216-83ac-a9a9d5151452?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/edb22955-26a6-4216-83ac-a9a9d5151452?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/edb22955-26a6-4216-83ac-a9a9d5151452?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/edb22955-26a6-4216-83ac-a9a9d5151452?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/edb22955-26a6-4216-83ac-a9a9d5151452?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/edb22955-26a6-4216-83ac-a9a9d5151452?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=That%20error%20means%20Superset%20tried%20to%20add%20a%20Flask%20LocalProxy%20object%20%28like%20g.user%29%20to%20the%20SQLAlchemy%20session%2C%20but%20only%20real%20ORM%20model%20instances%20are%20allowed%E2%80%94so%20SQLAlchemy%20raised%20a%20mapping%20error.%20This%20usually%20happens%20as%20a%20side%20effect%20of%20session%20or%20user%20context%20issues%2C%20not%20as%20a%20direct%20cause%20of%20404/405%20routing%20errors%2C%20but%20it%20can%20signal%20underlying%20problems%20with%20session%20management%2C%20authentication%2C%20or%20version%20mismatches%20in%20your%20environment.%20%0A%0AThis%20warning%20is%20often%20triggered%20by%20version%20mismatches%20%28Superset%20now%20requires%20Python%203.10/3.11%20and%20Node.js%2020.x%29%2C%20incomplet
 
e%20asset%20builds%2C%20or%20misconfigured%20authentication/session%20context.%20It%20can%20also%20be%20caused%20by%20Redis/cache%20misconfiguration%20or%20missing%20reCAPTCHA%20keys%20if%20you%20use%20LDAP%20with%20AUTH_USER_REGISTRATION%20enabled.%20In%20Helm/cloud%20setups%2C%20double-check%20your%20Redis%20and%20authentication%20configs%2C%20and%20make%20sure%20all%20dependencies%20are%20on%20supported%20versions%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/issues/35823%29%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/discussions/35997%29%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/discussions/36296%29.%0A%0AA%20fix%20for%20this%20was%20merged%20in%20April%202025%20%28PR%20%2333025%29%2C%20which%20unwraps%20the%20LocalProxy%20before%20adding%20the%20user%20to%20the%20session%2C%20so%20if%20your%20image%20is%20up-to-date%2C%20you%20should%20not%20see%20this%20error%20anymore%C2%A0%5Breference%5D%28https%3A//github.com/apache/superset/p
 
ull/33025%29.%20If%20you%20still%20see%20it%2C%20it%E2%80%99s%20likely%20a%20sign%20of%20a%20session%20or%20context%20mismatch%E2%80%94sometimes%20triggered%20by%20ingress%20rewrites%2C%20missing%20cookies%2C%20or%20CSRF/session%20token%20issues%2C%20which%20can%20also%20cause%20404s%20on%20certain%20endpoints.%0A%0AIf%20you%20can%20correlate%20these%20errors%20with%20specific%20request%20paths%20or%20actions%2C%20that%20will%20help%20pinpoint%20whether%20a%20session/auth%20issue%20is%20causing%20both%20the%20LocalProxy%20warning%20and%20the%20routing%20errors.%20Otherwise%2C%20focus%20on%20verifying%20your%20runtime%20versions%2C%20asset%20builds%2C%20and%20session/auth%20configs.%20Let%20me%20know%20if%20you%20spot%20a%20pattern%20in%20the%20logs%20or%20need%20help%20digging%20into%20a%20specific%20path%20or%20action.)&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://im
 
g.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/36602)


-- 
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