Bug description

Basically the same issue as #24014 and #25171 but I created this new issue as I do not have the permission to re-open closed issues.

I use docker-compose-non-dev.yml. Once it completes, I create a new user via: docker exec -it superset_app superset fab create-admin. It works when I first login and I can see all the example graphs like the COVID-19 graph etc.

But once I reopen the same frontend URL either from the same browser or through the private window, I get the exact same issue in my next login.

I always have to run:

docker compose -f docker/docker-compose.yml down -v --remove-orphans
docker image ls | grep superset | awk '{print $3}' | xargs docker rmi -f

and create the user again, before I can get the frontend working again. So clearly some resource gets corrupted in that second login.

Looking forward to any help you could provide in this direction.

Screenshots/recordings

Image

Superset version

master / latest-dev

Python version

3.9

Node version

16

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.

Comment From: dosubot[bot]

I found a similar closed issue related to installing Superset via Docker-compose, which might be relevant to your problem. The issue was closed by a pull request that added a non-dev Docker-compose workflow [1].

For your specific issue with the 'broken image' icon and 'Close' button appearing on the Superset login page, it seems like there might be a problem with static assets or image loading. Superset handles static assets in Docker by continuing to build assets in the background even after docker-compose indicates completion. To resolve 404 errors for static assets, you should monitor the container logs to confirm when the asset building process is actually finished [2].

Additionally, if you encounter infinite loading issues after login, it may be due to webpack build issues. You can manually ensure that webpack properly builds all frontend assets by executing the following commands:

cd superset-frontend/
npm install -f --no-optional --global webpack webpack-cli
npm install -f --no-optional
npm install -f --global webpack webpack-cli
npm install -f
npm run dev
cd ..
docker compose -f docker-compose-non-dev.yml up
cd superset
docker compose down
docker compose up

This process ensures that all necessary assets are built before running the Docker containers, which should resolve the 404 errors and infinite loading issues [3].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Comment From: kerem-coemert

@dosu as soon as I load the login page, I get: ``` superset_worker | [2025-03-28 14:23:22,573: INFO/MainProcess] mingle: searching for neighbors superset_app | Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py] superset_app | 2025-03-28 14:23:22,993:INFO:superset.initialization:Setting database isolation level to READ COMMITTED superset_worker | [2025-03-28 14:23:23,579: INFO/MainProcess] mingle: all alone superset_worker | [2025-03-28 14:23:23,586: INFO/MainProcess] celery@b756248ed89d ready. superset_app | 2025-03-28 14:23:23,646:WARNING:werkzeug: * Debugger is active! superset_app | 2025-03-28 14:23:23,646:INFO:werkzeug: * Debugger PIN: 847-942-031 superset_app | 2025-03-28 14:23:43,150:INFO:werkzeug:127.0.0.1 - - [28/Mar/2025 14:23:43] "GET /health HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:50,863:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:50] "GET / HTTP/1.1" 302 - superset_app | 2025-03-28 14:23:50,928:WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped superset_app | 2025-03-28 14:23:50,945:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:50] "GET /superset/welcome/ HTTP/1.1" 302 - superset_app | 2025-03-28 14:23:51,074:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect superset: No module named 'pip' superset_app | 2025-03-28 14:23:51,372:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect gsheets: No module named 'pip' superset_app | 2025-03-28 14:23:51,373:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect shillelagh: No module named 'pip' superset_app | 2025-03-28 14:23:51,373:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect shillelagh.apsw: No module named 'pip' superset_app | 2025-03-28 14:23:51,387:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect shillelagh.safe: No module named 'pip' superset_app | 2025-03-28 14:23:51,409:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect hive: No module named 'thrift' superset_app | 2025-03-28 14:23:51,410:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect hive.http: No module named 'thrift' superset_app | 2025-03-28 14:23:51,411:WARNING:superset.db_engine_specs:Unable to load SQLAlchemy dialect hive.https: No module named 'thrift' superset_app | 2025-03-28 14:23:51,471:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /login/ HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,644:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/fontawesome/regular.min.css HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,644:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/fontawesome/fontawesome.min.css HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,645:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/bootstrap.min.css HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,652:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/fontawesome/solid.min.css HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,654:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/fontawesome/brands.min.css HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,655:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/fontawesome/v4-shims.min.css HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,752:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/bootstrap-datepicker/bootstrap-datepicker3.min.css HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,754:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/select2/select2.min.css HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,755:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/select2/select2-bootstrap.min.css HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,755:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/flags/flags16.css HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,769:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/ab.css HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,771:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/js/jquery-latest.js HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,826:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/js/ab_filters.js HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,826:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/js/ab_actions.js HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,829:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/js/bootstrap.min.js HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,837:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/js/bootstrap-datepicker/bootstrap-datepicker.min.js HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,856:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/js/select2/select2.min.js HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,880:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/js/ab.js HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,945:WARNING:superset.views.error_handling:HTTPException superset_app | Traceback (most recent call last): superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request superset_app | rv = self.dispatch_request() superset_app | ^^^^^^^^^^^^^^^^^^^^^^^ superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request superset_app | return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) superset_app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 502, in superset_app | view_func=lambda kw: self_ref().send_static_file(**kw), # type: ignore # noqa: B950 superset_app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/scaffold.py", line 317, in send_static_file superset_app | return send_from_directory( superset_app | ^^^^^^^^^^^^^^^^^^^^ superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/helpers.py", line 557, in send_from_directory superset_app | return werkzeug.utils.send_from_directory( # type: ignore[return-value] superset_app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ superset_app | File "/app/.venv/lib/python3.11/site-packages/werkzeug/utils.py", line 575, in send_from_directory superset_app | raise NotFound() superset_app | 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. superset_app | 2025-03-28 14:23:51,946:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/appbuilder/css/webfonts/fa-solid-900.woff2 HTTP/1.1" 200 - superset_app | 2025-03-28 14:23:51,947:INFO:werkzeug:10.212.134.205 - - [28/Mar/2025 14:23:51] "GET /static/assets/images/superset-logo-horiz.png HTTP/1.1" 404 - superset_worker_beat | [2025-03-28 14:24:00,004: INFO/MainProcess] Scheduler: Sending due task reports.scheduler (reports.scheduler) superset_worker | [2025-03-28 14:24:00,016: INFO/MainProcess] Task reports.scheduler[31360f9c-a4b3-49ad-ac8f-52e44b3ad4f8] received superset_worker | [2025-03-28 14:24:00,032: INFO/ForkPoolWorker-1] Task reports.scheduler[31360f9c-a4b3-49ad-ac8f-52e44b3ad4f8] succeeded in 0.014393437653779984s: None ````

and the superset logo asset on the top left corner is not loaded either.

Image

Comment From: dosubot[bot]

The 404 error for the Superset logo asset and other static files suggests that the static assets might not be fully built or accessible. Here are a few steps to address this issue:

  1. Ensure Complete Asset Build: After running docker-compose, the asset building process might still be ongoing in the background. Monitor the container logs to confirm when the asset building is complete. This is crucial because the static assets need to be fully built and available for the application to function correctly [1].

  2. Access Through Correct Port: Make sure you are accessing Superset through the correct port. Superset uses the auto-reload webpack feature, which runs on port 9000. Access your instance via http://localhost:9000 (or your server's address with port 9000) to ensure that frontend changes and assets are correctly loaded [1].

  3. Check Docker Configuration: Verify that your Docker setup is configured correctly for building static assets. Ensure that DEV_MODE is set appropriately in your Dockerfile, as this affects whether the frontend assets are built. If DEV_MODE is set to "true", the build process is skipped, which could lead to missing assets [2].

  4. Manual Webpack Build: If issues persist, manually ensure that webpack builds all frontend assets. You can do this by navigating to the superset-frontend directory and running the necessary npm commands to build the assets, as previously outlined [3].

These steps should help resolve the 404 errors and ensure that all static assets, including the Superset logo, are properly loaded.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Comment From: lariskovski

did you have ny luck? I'm having the same issue

Comment From: rusackas

The bot is correct, you probably just need to wait for webpack to finish building the frontend application, and access it on port 9000 (in case you're still using 8088).

Comment From: rusackas

Assuming all is well now... closing, but happy to revisit :D