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

   <!-- Answer -->
   Based on your description and the research into recent Superset changes, 
here are the most likely causes and next steps for the persistent 404 error on 
`/api/v1/chart/27` for MapBox charts in production:
   
   1. **Embedded Chart Domain Restrictions**: Superset now enforces allowed 
domains for embedded charts. If your production domain is not explicitly 
allowed, embedded chart API requests (like `/api/v1/chart/27`) can return a 404 
even if the chart exists and permissions are correct. Make sure your production 
domain is included in the allowed domains configuration for embedded Superset 
charts. See the relevant change 
[here](https://github.com/apache/superset/blob/master/superset-frontend/CHANGELOG.md).
   
   2. **Embedded Feature Flag**: Ensure that 
`SUPERSET_FEATURE_EMBEDDED_SUPERSET=true` is set in your production `.env` 
file. This enables embedded chart functionality, which is required for embedded 
chart endpoints to work as expected. See the documentation 
[here](https://github.com/apache/superset/blob/master/docs/docs/configuration/networking-settings.mdx).
   
   3. **CSRF and Feature Flags**: Double-check that your CSRF settings are 
correct. Recommended settings are `WTF_CSRF_ENABLED = True`, 
`WTF_CSRF_EXEMPT_LIST = []`, and `WTF_CSRF_TIME_LIMIT = 60*60*24*365`. Also, 
ensure `FEATURE_FLAGS` includes both `DASHBOARD_CACHE: True` and 
`EMBEDDED_SUPERSET: True` 
[source](https://github.com/apache/superset/discussions/33507).
   
   4. **API Endpoint Changes**: There have been recent changes to API endpoints 
and embedded dashboard configuration. If your production environment is not 
fully up-to-date or has mismatched frontend/backend versions, this could cause 
404s for certain endpoints. Make sure both frontend and backend are running the 
same Superset version and all migrations have been applied.
   
   5. **Browser Console and Network Tab**: Since the logs show a 404 but no 
other errors, check the browser console and network tab for failed requests or 
CORS errors when loading the embedded MapBox chart. This can help pinpoint if 
the request is being blocked or misrouted.
   
   If you have confirmed all the above and the issue persists, please share any 
errors from the browser console or network tab when you attempt to load the 
MapBox chart in production. This will help further isolate whether the problem 
is with Superset's backend, the embedding configuration, or the frontend 
request.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/b2e6655c-60e0-421b-a772-20fa87f9c291?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/b2e6655c-60e0-421b-a772-20fa87f9c291?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/b2e6655c-60e0-421b-a772-20fa87f9c291?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/b2e6655c-60e0-421b-a772-20fa87f9c291?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/b2e6655c-60e0-421b-a772-20fa87f9c291?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/b2e6655c-60e0-421b-a772-20fa87f9c291?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/b2e6655c-60e0-421b-a772-20fa87f9c291?feedback_type=other)</sup>&nbsp;&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/33606)


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