You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "kdemirov (via GitHub)" <gi...@apache.org> on 2025/05/28 14:31:27 UTC

[I] MapBox charts returns 404. [superset]

kdemirov opened a new issue, #33606:
URL: https://github.com/apache/superset/issues/33606

   ### Bug description
   
   Hello Everyone, 
   
   I hope you are doing okay, we are using superset for displaying charts into react application and loopback backend, in local environment everything works fine, the maps are shown in superset frontend also in react application. But in production it works for every charts expect for type MapBox and i tried using several, for example `/api/v1/chart/27` not found on superset log also not found no other errors i check in database the charts exists with the appropriate id and it's connected to the dashboard. The permission can read on Chart can read on Dataset can read on Database, can query on Api, can explore json on Superset are all set and we don't know what might be the issue. Any help will be appreciated.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.11
   
   ### Node version
   
   18 or greater
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] MapBox charts returns 404. [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33606:
URL: https://github.com/apache/superset/issues/33606#issuecomment-3942623985

   Closing this issue due to inactivity. Based on the discussion, this appears to be a deployment/configuration issue (permissions, datasource access, or embedded chart settings) rather than a bug in Superset itself.
   
   If you're still experiencing this issue on Superset 5.x or 6.x, please feel free to open a new issue with:
   - Server logs showing the 404 response
   - Whether the chart works in the Superset UI directly (not embedded)
   - Your embedding configuration details
   
   Thanks for the report!


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] MapBox charts returns 404. [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #33606:
URL: https://github.com/apache/superset/issues/33606#issuecomment-2916592364

   <!-- Greeting -->
   Hi @kdemirov! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.
   
   <!-- Answer -->
   For MapBox charts returning a 404 in production but working locally, here are the most likely causes and steps to troubleshoot:
   
   1. **MAPBOX_API_KEY not set in production**: The MapBox chart requires a valid API key. In Superset, this is configured via the `MAPBOX_API_KEY` environment variable. If this is missing or empty in your production `.env` or environment configuration, MapBox charts will fail to load. Double-check that your production environment has a valid MapBox API key set (not just locally) and that it is accessible to the Superset process. See [here](https://github.com/apache/superset/blob/master/docker/.env) and [here](https://github.com/apache/superset/blob/master/docs/docs/faq.mdx).
   
   2. **Content Security Policy (CSP) restrictions**: Production environments often have stricter CSP settings. MapBox charts need to connect to `https://api.mapbox.com` and `https://events.mapbox.com`. If your CSP does not allow these domains in `connect-src`, MapBox resources will be blocked, resulting in errors or missing maps. You can adjust CSP settings in Superset using `superset_config.py` and Talisman. See [the security docs](https://github.com/apache/superset/blob/master/docs/docs/security/security.mdx).
   
   3. **Network or firewall issues**: Ensure your production server can reach MapBox endpoints. Firewalls, proxies, or outbound network restrictions can block these requests, causing failures that may not appear in Superset logs.
   
   4. **API key usage limits or invalid key**: If your API key is invalid or has exceeded its usage limits, MapBox will return errors. Make sure the key is valid and has sufficient quota.
   
   5. **No errors in Superset logs**: Since you see no errors in the logs and the chart exists in the database, the issue is almost certainly environmental (API key, CSP, or network).
   
   **Action steps:**  
   - Confirm `MAPBOX_API_KEY` is set and non-empty in your production environment.
   - Check your CSP settings to ensure `https://api.mapbox.com` and `https://events.mapbox.com` are allowed.
   - Verify network connectivity from your production server to MapBox endpoints.
   - Make sure your API key is valid and not rate-limited.
   
   If you address these areas and the issue persists, please share any browser console errors or network request failures you see when loading a MapBox chart in production. This can help pinpoint whether the problem is with the frontend, backend, or network configuration.
   
   
   <!-- 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/f9de356c-e99a-471c-864c-93b42662741c?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f9de356c-e99a-471c-864c-93b42662741c?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f9de356c-e99a-471c-864c-93b42662741c?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f9de356c-e99a-471c-864c-93b42662741c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f9de356c-e99a-471c-864c-93b42662741c?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f9de356c-e99a-471c-864c-93b42662741c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f9de356c-e99a-471c-864c-93b42662741c?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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] MapBox charts returns 404. [superset]

Posted by "kdemirov (via GitHub)" <gi...@apache.org>.
kdemirov commented on issue #33606:
URL: https://github.com/apache/superset/issues/33606#issuecomment-2918857744

   @dosu this is my network error `
   27 | 404 | fetch | callApi.ts:113
   -- | -- | -- | --
   
   
   `


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] MapBox charts returns 404. [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #33606: MapBox charts returns 404.
URL: https://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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] MapBox charts returns 404. [superset]

Posted by "kdemirov (via GitHub)" <gi...@apache.org>.
kdemirov commented on issue #33606:
URL: https://github.com/apache/superset/issues/33606#issuecomment-2918586638

   @dosubot @rusackas  @sfirke  I tried all the suggestion from dosu used new public api key, created CSP for allowing api.mapbox but not with taslisman, talistman is disabled with http_headers, i verified the connvectivity from my production server to mapbox endpoints, and still same issue. log ` [29/May/2025:07:31:25 +0000] "GET /api/v1/chart/27 HTTP/1.0" 404 24 "https://example.com/embedded/ab13a66a-9bda-46cb-9a6e-5d240762a2db?uiConfig=11" 
   6 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"`


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] MapBox charts returns 404. [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #33606:
URL: https://github.com/apache/superset/issues/33606#issuecomment-2918862249

   <!-- Answer -->
   The 404 error from your network request to `/api/v1/chart/27` indicates that Superset cannot find the chart or its required resources in production, even though it works locally. Based on the Superset code and recent updates, this can happen if:
   
   - The chart with ID 27 does not exist in the production database, or its datasource is missing or misconfigured. The endpoint will return a 404 if either the chart or its datasource cannot be found or loaded [[source]](https://github.com/apache/superset/blob/master/superset/charts/data/api.py).
   - There are permission issues or missing roles after recent API changes. Superset migrated from `/superset/slice_json/<id>` to `/api/v1/chart/<id>/data/`, and permissions must be updated accordingly. Ensure your production roles have `can read on Chart` [[source]](https://github.com/apache/superset/blob/master/UPDATING.md).
   - The query context for the chart is missing or corrupted in production. If the chart’s saved query context cannot be loaded, the API will not return data [[source]](https://github.com/apache/superset/blob/master/superset/charts/data/api.py).
   - The frontend and backend versions are mismatched, or migrations are incomplete, which can cause endpoints to fail.
   
   Since you confirmed the chart exists in the database, double-check that its datasource (table or dataset) also exists and is accessible in production. Try opening the chart directly in the Superset UI in production—if it fails there, the issue is with the chart or datasource, not embedding.
   
   If you recently upgraded or changed your Superset deployment, ensure all database migrations have run and that your roles/permissions are up to date. If you have custom roles, verify that they include the new permissions for chart access.
   
   If you can, inspect the Superset server logs right after the 404 occurs for any traceback or error message related to chart or datasource lookup. This can help pinpoint if it’s a missing chart, missing datasource, or a permissions/configuration issue.
   
   Let me know if you find any error messages in the logs or if the chart fails to load in the Superset UI itself. That will help narrow down the root cause.
   
   
   <!-- 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/eabcf124-dd44-4d0e-b2a4-dedd2759f20b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/eabcf124-dd44-4d0e-b2a4-dedd2759f20b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/eabcf124-dd44-4d0e-b2a4-dedd2759f20b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/eabcf124-dd44-4d0e-b2a4-dedd2759f20b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/eabcf124-dd44-4d0e-b2a4-dedd2759f20b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/eabcf124-dd44-4d0e-b2a4-dedd2759f20b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/eabcf124-dd44-4d0e-b2a4-dedd2759f20b?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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] MapBox charts returns 404. [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] MapBox charts returns 404. [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #33606:
URL: https://github.com/apache/superset/issues/33606#issuecomment-2917101633

   I was betting on the first suggestion the bot made, but let us know if it is (or we are) mistaken!


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] MapBox charts returns 404. [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #33606:
URL: https://github.com/apache/superset/issues/33606#issuecomment-2916655109

   I don't have expertise on embedded but will say I have public-facing Mapbox charts working fine in production running Superset 4.1.2. What do you think of Dosu's suggestions? That's where I would start too on this one.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org