You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "arm-moodys (via GitHub)" <gi...@apache.org> on 2024/11/21 23:45:48 UTC

[I] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

arm-moodys opened a new issue, #31025:
URL: https://github.com/apache/superset/issues/31025

   ### Bug description
   
   Hi
   
   We're running into an issues that happens more often that not,
   
   I have deployed Superset on multiple environments on K8s using the official HelmChart, it's running on AWS EKS behind a Network Load Balancer, for ingress we use the Ngnix Ingress controller Helm chart. 
   
   The Log in page loads correctly every time we access it, no problems there. 
   
   The issue is after we provide the credentials and click on the `SIGN IN` button, most times it hangs and return a `404 NOT FOUND` for the `https://<DOMAIN_NAME>/favicon.ico`
   ![image](https://github.com/user-attachments/assets/9ba4bbe9-4876-4fd9-a64f-12d8c661c266)
   
   on the superset pod logs I can see the following every time it fails:
   
   ```bash
   HTTPException
   Traceback (most recent call last):
     File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1788, in dispatch_request
       self.raise_routing_exception(req)
     File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1770, in raise_routing_exception
       raise request.routing_exception  # type: ignore
     File "/usr/local/lib/python3.10/site-packages/flask/ctx.py", line 351, in match_request
       result = self.url_adapter.match(return_rule=True)  # type: ignore
     File "/usr/local/lib/python3.10/site-packages/werkzeug/routing/map.py", line 624, in match
       raise NotFound() from None
   werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
   2024-10-03 23:06:28,240:WARNING:superset.views.base:HTTPException
   Traceback (most recent call last):
     File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1788, in dispatch_request
       self.raise_routing_exception(req)
     File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1770, in raise_routing_exception
       raise request.routing_exception  # type: ignore
     File "/usr/local/lib/python3.10/site-packages/flask/ctx.py", line 351, in match_request
       result = self.url_adapter.match(return_rule=True)  # type: ignore
     File "/usr/local/lib/python3.10/site-packages/werkzeug/routing/map.py", line 624, in match
       raise NotFound() from None
   werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
   10.173.88.147 - - [03/Oct/2024:23:06:28 +0000] "GET /favicon.ico HTTP/1.1" 404 0 "http://DOMAIN_OBFUSCATED/login/?next=/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
   ```
   
   As far as I understand all modern browser send a request to https://<DOMAIN_NAME>/favicon.ico`, the problem is that the Superset `favicon.ico` is actually under `/static/assets/images/favicon.png` so if you go to `https://<DOMAIN_NAME>//static/assets/images/favicon.png` you will see it, I know that the icon can be modified by adding the following to the superset_config.py and actually having the file in the specified path inside the container:
   
   ```python
   FAVICONS = [
         {"href": "/static/assets/images/favicon.png"},
         {
           "href": "/favicon.ico",  ## This is not accessible although the file exists this is I belive because flask doesn't expose anything but the what is under `/static` which in the container is under `/app/superset/static`
           "rel": "icon",
           "type": "image/x-icon",
         },
         {
           "href": "/static/favicon.ico", ## This accessible through: `https://<DOMAIN_NAME>//static/favicon.png`
           "rel": "icon",
           "type": "image/x-icon",
         }
       ]
   ```
   
   I have already tried all the suggested "workarounds" mentioned on:
   
   - https://superset.apache.org/docs/configuration/configuring-superset/#configuration-behind-a-load-balancer
   - https://github.com/apache/superset/issues/20319
   - https://stackoverflow.com/questions/48863061/favicon-ico-results-in-404-error-in-flask-app 
   - https://flask.palletsprojects.com/en/stable/patterns/favicon/ 
   
   
   The last 2 links above mention a way to a flask route to expose the `favicon.ico` but so far I always ended up with a  `RuntimeError: Working outside of application context.` error.
   
   
   ## Semi "Workaround"
   
   Before continuing I want to clarify that the issue happens even without the AWS NLB, we tested this by simply forwarding the port locally and the same errors happens:
   
   ```bash
   kubectl port-forward service/superset 8088:8088
   ```
   
   My "workaround" so far is the following:
   
   In the superset_config.py I increase the `SUPERSET_WEBSERVER_TIMEOUT ` env variable value
   
   ```pyhon
   SUPERSET_WEBSERVER_TIMEOUT = 180
   ```
   
   In my K8s ingress I add the following annotations:
   
   ```yaml
   annotations: # https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md#custom-timeouts
       nginx.ingress.kubernetes.io/proxy-read-timeout: "200"
       nginx.ingress.kubernetes.io/proxy-connect-timeout: "200"
       nginx.ingress.kubernetes.io/proxy-send-timeout: "200"
   ```
   
   With that the hang issue persists but after approximately 2:30 mins the log in is successful or rejected if the users provides the wrong credentials but it takes a very long time to come back with the proper return.
   
   Besides all the suggestions mentioned above and in the links shared, do you have any other suggestions of what I can try?
   
   
   
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.9
   
   ### Node version
   
   I don't know
   
   ### 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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

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

   <!-- Answer -->
   To address the "404 NOT FOUND" error for "/favicon.ico" in Superset, you might consider creating a custom Flask route to serve the favicon directly. This can help ensure that the favicon is accessible at the root URL. Here's a basic example of how you can add a route in your Flask application:
   
   ```python
   from flask import send_from_directory
   
   @app.route('/favicon.ico')
   def favicon():
       return send_from_directory(os.path.join(app.root_path, 'static/assets/images'),
                                  'favicon.png', mimetype='image/png')
   ```
   
   This route explicitly serves the favicon from the specified directory. Ensure that the path to the favicon is correct and that the file exists at that location.
   
   Additionally, verify your Nginx Ingress configuration to ensure it doesn't interfere with requests to "/favicon.ico". You might need to add specific rules to handle these requests correctly. If the issue persists, consider checking for any caching or proxy settings that might affect the routing of static files.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=other)</sup>
   


-- 
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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

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

   <!-- Answer -->
   If the custom Flask route didn't resolve the issue, consider checking the following:
   
   1. **File Existence and Path**: Double-check that the `favicon.png` file exists at the specified path (`/static/assets/images/`) within your Superset deployment.
   
   2. **Nginx Ingress Configuration**: Ensure that your Nginx Ingress is correctly routing requests to `/favicon.ico`. You might need to add a specific location block in your Nginx configuration to handle these requests. For example:
   
      ```nginx
      location = /favicon.ico {
          alias /path/to/your/static/assets/images/favicon.png;
      }
      ```
   
   3. **Superset Configuration**: Verify that the `FAVICONS` configuration in `superset_config.py` is correctly set to point to the favicon path. Ensure there are no typos or incorrect paths.
   
   4. **Caching and Proxies**: Check if there are any caching layers or proxies that might be affecting the request routing. Clear any caches that might be serving outdated routes.
   
   5. **Application Context**: Ensure that the Flask application context is correctly set up when adding custom routes. This can sometimes cause issues if not properly configured.
   
   If these steps don't resolve the issue, consider reviewing the logs for any additional errors or warnings that might provide more insight into the problem.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=other)</sup>
   


-- 
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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

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

   <!-- Greeting -->
   Hey there, @arm-moodys! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this issue together!
   
   <!-- Answer -->
   I found a similar unsolved discussion that might be relevant to your issue: [Custom Logo with Docker + nginx-proxy not working](https://github.com/apache/superset/discussions/28206) <sup>[[1]](https://github.com/apache/superset/discussions/28206)</sup>.
   
   To address the "404 NOT FOUND" error for "/favicon.ico" in Superset, ensure that the favicon path is correctly configured. According to the `superset/config.py`, the favicon is set as follows:
   
   ```python
   FAVICONS = [{"href": "/static/assets/images/favicon.png"}]
   ```
   
   Make sure the file `/static/assets/images/favicon.png` exists in your Superset deployment. If the file is missing, place the favicon image at the specified path. If the path is incorrect, update the `FAVICONS` configuration with the correct path to your favicon file.
   
   If the file exists and the path is correct, but you are still encountering the error, check your Nginx Ingress configuration to ensure that requests to `/favicon.ico` are correctly routed to the Superset application. You may need to add a location block in your Nginx configuration to handle requests for the favicon <sup>[[2]](https://github.com/apache/superset/blob/master/superset/config.py)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

Posted by "arm-moodys (via GitHub)" <gi...@apache.org>.
arm-moodys closed issue #31025: Random "/favicon.ico 404 NOT FOUND" error only when login in 
URL: https://github.com/apache/superset/issues/31025


-- 
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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

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

   <!-- Answer -->
   Since the issue occurs only when LDAP is enabled, it might be related to how Superset handles authentication and static file requests under LDAP. Here are a few additional steps to consider:
   
   1. **LDAP Configuration**: Double-check your LDAP settings in `superset_config.py` to ensure they are correctly configured. Any misconfiguration might affect the application's behavior, including static file handling.
   
   2. **Flask Application Context**: Ensure that the Flask application context is correctly set up when LDAP is enabled. This might affect how routes are handled, including static files like favicons.
   
   3. **Debugging Logs**: Increase the logging level to debug in your Superset configuration to capture more detailed logs. This might provide insights into what happens during the authentication process and why the favicon request fails.
   
   4. **Network and Firewall Rules**: Verify that there are no network or firewall rules that might be affecting requests when LDAP is enabled. Sometimes, additional security layers can interfere with requests.
   
   5. **Superset and Flask Updates**: Ensure that you are using the latest versions of Superset and Flask, as updates might include fixes for issues related to LDAP and static file handling.
   
   If these steps don't resolve the issue, consider isolating the problem by testing with a minimal configuration to see if the issue persists, which might help identify the root cause.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/d1c0571b-8f04-4d53-9994-aa67c609bb83?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d1c0571b-8f04-4d53-9994-aa67c609bb83?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d1c0571b-8f04-4d53-9994-aa67c609bb83?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d1c0571b-8f04-4d53-9994-aa67c609bb83?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d1c0571b-8f04-4d53-9994-aa67c609bb83?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/d1c0571b-8f04-4d53-9994-aa67c609bb83?feedback_type=other)</sup>
   


-- 
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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

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

   > I reckon you can remove this part as [`STATIC_ASSETS_PREFIX` option](https://github.com/apache/superset/blob/master/superset/config.py#L1697-L1699) might be not yet configured on your side. Fetching a non-existent `/favicon.ico` would yield 404 as expected.
   > 
   > FAVICONS = [
   >       {"href": "/static/assets/images/favicon.png"},
   > -      {
   > -        "href": "/favicon.ico",  ## This is not accessible although the file exists this is I belive because flask doesn't expose anything but the what is under `/static` which in the container is under `/app/superset/static`
   > -        "rel": "icon",
   > -        "type": "image/x-icon",
   > -      },
   >       {
   >         "href": "/static/favicon.ico", ## This accessible through: `https://<DOMAIN_NAME>//static/favicon.png`
   >         "rel": "icon",
   >         "type": "image/x-icon",
   >       }
   >     ]
   
   
   We found out that the issue was related to our ldap server not responding in time to the load balancer endpoint and the LB would response with a page that didn't have the `favicon.ico`, if we increased the time eventually, we had a response, but this was a not a good solution so we had to address the issue on the ldap side so it replied in time.


-- 
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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

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

   @dosu as mentioned in the PR description I already tried this and didn't address the issue.


-- 
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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

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

   Is this effectively closed then? If there's anything you think should be added to the docs to help others, that's always welcomed :) 


-- 
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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

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

   > If the custom Flask route didn't resolve the issue, consider checking the following:
   > 
   > 1. **File Existence and Path**: Double-check that the `favicon.png` file exists at the specified path (`/static/assets/images/`) within your Superset deployment.
   > 2. **Nginx Ingress Configuration**: Ensure that your Nginx Ingress is correctly routing requests to `/favicon.ico`. You might need to add a specific location block in your Nginx configuration to handle these requests. For example:
   >    ```nginx
   >    location = /favicon.ico {
   >        alias /path/to/your/static/assets/images/favicon.png;
   >    }
   >    ```
   > 3. **Superset Configuration**: Verify that the `FAVICONS` configuration in `superset_config.py` is correctly set to point to the favicon path. Ensure there are no typos or incorrect paths.
   > 4. **Caching and Proxies**: Check if there are any caching layers or proxies that might be affecting the request routing. Clear any caches that might be serving outdated routes.
   > 5. **Application Context**: Ensure that the Flask application context is correctly set up when adding custom routes. This can sometimes cause issues if not properly configured.
   > 
   > If these steps don't resolve the issue, consider reviewing the logs for any additional errors or warnings that might provide more insight into the problem.
   > 
   > _To continue talking to [Dosu](https://dosu.dev), mention @dosu._
   > 
   > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/f58a211e-31ec-45fa-adae-ac0726ffe882?feedback_type=other)
   
   @dosu We've identified that this error only occurs when LDAP is enabled, with local auth this never occurs.


-- 
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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

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

   > To address the "404 NOT FOUND" error for "/favicon.ico" in Superset, you might consider creating a custom Flask route to serve the favicon directly. This can help ensure that the favicon is accessible at the root URL. Here's a basic example of how you can add a route in your Flask application:
   > 
   > ```python
   > from flask import send_from_directory
   > 
   > @app.route('/favicon.ico')
   > def favicon():
   >     return send_from_directory(os.path.join(app.root_path, 'static/assets/images'),
   >                                'favicon.png', mimetype='image/png')
   > ```
   > 
   > This route explicitly serves the favicon from the specified directory. Ensure that the path to the favicon is correct and that the file exists at that location.
   > 
   > Additionally, verify your Nginx Ingress configuration to ensure it doesn't interfere with requests to "/favicon.ico". You might need to add specific rules to handle these requests correctly. If the issue persists, consider checking for any caching or proxy settings that might affect the routing of static files.
   > 
   > _To continue talking to [Dosu](https://dosu.dev), mention @dosu._
   > 
   > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/8135075d-40d6-4fd4-86c7-82e252e91698?feedback_type=other)
   
   @dosu I already tried that and didn't work.


-- 
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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

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

   I reckon you can remove this part as [`STATIC_ASSETS_PREFIX` option](https://github.com/apache/superset/blob/master/superset/config.py#L1697-L1699) might be not yet configured on your side. Fetching a non-existent `/favicon.ico` would yield 404 as expected.
   
   
   ```diff
   FAVICONS = [
         {"href": "/static/assets/images/favicon.png"},
   -      {
   -        "href": "/favicon.ico",  ## This is not accessible although the file exists this is I belive because flask doesn't expose anything but the what is under `/static` which in the container is under `/app/superset/static`
   -        "rel": "icon",
   -        "type": "image/x-icon",
   -      },
         {
           "href": "/static/favicon.ico", ## This accessible through: `https://<DOMAIN_NAME>//static/favicon.png`
           "rel": "icon",
           "type": "image/x-icon",
         }
       ]
   ```


-- 
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] Random "/favicon.ico 404 NOT FOUND" error only when login in [superset]

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

   > Is this effectively closed then? If there's anything you think should be added to the docs to help others, that's always welcomed :)
   
   I just updated the issue description with our findings so other users can review in case they come across a similar issue.


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