Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker compose up --build is broken, fails with werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. #31890

Open
2 of 3 tasks
ludaxiansheng opened this issue Jan 16, 2025 · 32 comments
Labels
install:docker Installation - docker container validation:validated A committer has validated / submitted the issue or it was reported by multiple users

Comments

@ludaxiansheng
Copy link

ludaxiansheng commented Jan 16, 2025

Bug description

Bug description

docker 构建正常,启动并登录后跳转页面错误,并且superset_app出现错误,错误如下
2025-01-16 11:35:39,016: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 <lambda>
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          | 10.100.5.188 - - [16/Jan/2025:11:35:39 +0000] "GET /static/assets/images/loading.gif HTTP/1.1" 404 334 "http://10.100.5.77:8088/superset/welcome/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0"

![Image](https://github.com/user-attachments/assets/94d92982-7fcc-4973-bc31-071643f53f88)

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

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • 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.
@ludaxiansheng
Copy link
Author

docker构建命令如下
docker compose up --build

@dosubot dosubot bot added the install:docker Installation - docker container label Jan 16, 2025
Copy link

dosubot bot commented Jan 16, 2025

Hey @ludaxiansheng! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this docker issue together!

I found a similar closed issue related to a 404 error for static assets in Superset, but no solution was found in the comments [1]. Additionally, there are two unsolved discussions that might be relevant:

  1. Custom Logo with Docker + nginx-proxy not working [2].
  2. Docker for testing Superset Failed in local [3].

For your specific issue, the 404 error for the static asset loading.gif suggests that the static files might not be correctly built or served. Here are a few steps you can take to troubleshoot and potentially resolve the issue:

  1. Verify Static Asset Build: Ensure that the static assets are correctly built during the Docker image creation. The assets should be located in the /app/superset/static/assets directory within the Docker container [4].

  2. Check Nginx Configuration: If you are using Nginx to serve static files, verify that the Nginx configuration is correctly set up to serve files from the static assets directory. The nginx.conf file should have the correct paths and permissions to access these files [5].

  3. STATIC_ASSETS_PREFIX Configuration: Check the STATIC_ASSETS_PREFIX configuration in your Superset setup. This configuration determines the path for static assets. Ensure it is set correctly to match the location where your static files are served [6].

  4. Docker Volumes: Ensure that the Docker volumes are correctly mounted and that the paths for static files are accessible within the container. This includes verifying the docker-compose.yml file for correct volume mappings [5].

By following these steps, you should be able to identify and resolve the issue with missing static assets in your Superset Docker deployment.

To continue talking to Dosu, mention @dosu.


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

@ludaxiansheng
Copy link
Author

ludaxiansheng commented Jan 17, 2025

@dosubot
super_init容器运行失败, 但是docker logs 日志并未发现异常

docker logs superset_init
Reinstalling the app in editable mode
Resolved 147 packages in 1m 22s
Prepared 1 package in 4.61s
Uninstalled 1 package in 295ms
Installed 1 package in 4ms
~ apache-superset==0.0.0.dev0 (from file:///app)
Installing postgres requirements
Audited 1 package in 63ms
Skipping local overrides
Unknown Operation!!!

######################################################################

Init Step 1/4 [Starting] -- Applying DB migrations

######################################################################

Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
2025-01-17 01:47:38,112:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
INFO [alembic.env] Starting the migration scripts.
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.env] Migration scripts completed. Duration: 00:00:00

######################################################################

Init Step 1/4 [Complete] -- Applying DB migrations

######################################################################

######################################################################

Init Step 2/4 [Starting] -- Setting up admin user ( admin / admin )

######################################################################

Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
2025-01-17 01:47:49,171:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
Recognized Database Authentications.
Error! User already exists admin

######################################################################

Init Step 2/4 [Complete] -- Setting up admin user

######################################################################

######################################################################

Init Step 3/4 [Starting] -- Setting up roles and perms

######################################################################

Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
2025-01-17 01:47:56,818:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
2025-01-17 01:48:02,475:INFO:superset.security.manager:Syncing role definition
2025-01-17 01:48:02,543:INFO:superset.security.manager:Syncing Admin perms
2025-01-17 01:48:02,551:INFO:superset.security.manager:Syncing Alpha perms
2025-01-17 01:48:02,562:INFO:superset.security.manager:Syncing Gamma perms
2025-01-17 01:48:02,572:INFO:superset.security.manager:Syncing sql_lab perms
2025-01-17 01:48:02,578:INFO:superset.security.manager:Fetching a set of all perms to lookup which ones are missing
2025-01-17 01:48:02,588:INFO:superset.security.manager:Creating missing datasource permissions.
2025-01-17 01:48:02,752:INFO:superset.security.manager:Creating missing database permissions.
2025-01-17 01:48:02,758:INFO:superset.security.manager:Cleaning faulty perms

######################################################################

Init Step 3/4 [Complete] -- Setting up roles and perms

######################################################################

######################################################################

Init Step 4/4 [Starting] -- Loading examples

######################################################################

Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
2025-01-17 01:48:08,233:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
2025-01-17 01:48:10,909:INFO:superset.cli.examples:Loading examples metadata and related data into examples
2025-01-17 01:48:10,935:INFO:superset.cli.examples:Loading [World Bank's Health Nutrition and Population Stats]
2025-01-17 01:48:14,893:INFO:superset.cli.examples:Loading [Birth names]
2025-01-17 01:48:15,889:INFO:superset.cli.examples:Loading [Random long/lat data]
2025-01-17 01:48:16,264:INFO:superset.cli.examples:Loading [Country Map data]
2025-01-17 01:48:16,644:INFO:superset.cli.examples:Loading [San Francisco population polygons]
2025-01-17 01:48:17,020:INFO:superset.cli.examples:Loading [Flights data]
2025-01-17 01:48:17,493:INFO:superset.cli.examples:Loading [BART lines]
2025-01-17 01:48:17,804:INFO:superset.cli.examples:Loading [Misc Charts] dashboard
2025-01-17 01:48:17,844:INFO:superset.cli.examples:Loading DECK.gl demo

######################################################################

Init Step 4/4 [Complete] -- Loading examples

######################################################################

root@itgemini-ubuntu:/docker-share/superset# docker ps

@imamfchrj
Copy link

I have the exact same problem as you @ludaxiansheng. Please provide me with a solution to resolve this issue.

Copy link

dosubot bot commented Jan 17, 2025

The "Unknown Operation" message you encountered during the Superset initialization process doesn't seem to be causing any critical issues, as the subsequent steps in the initialization process completed successfully. Here's a breakdown of what happened:

  1. DB Migrations: The database migrations were applied without any issues.
  2. Admin User Setup: The process attempted to create an admin user, but it found that the user already exists. This is not an error; it simply means the user setup step was skipped because the user is already present.
  3. Roles and Permissions: The roles and permissions were set up correctly, as indicated by the logs showing the syncing of role definitions and permissions.
  4. Loading Examples: The example data was loaded successfully, which includes various datasets and dashboards.

The "Unknown Operation" message might be a benign log entry that doesn't affect the overall functionality. If everything else is working as expected, you can likely ignore this message. If you encounter any specific issues related to this message, further investigation might be needed, but based on the logs, the initialization process completed successfully.

To continue talking to Dosu, mention @dosu.


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

@imamfchrj
Copy link

@dosubot an then How to ignore this error and proceed to access the Superset dashboard?

@sfirke sfirke changed the title docker 构建正常,启动并登录后跳转页面错误,并且superset_app出现错误 docker compose up --build is broken, fails with werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. Jan 31, 2025
@sfirke
Copy link
Member

sfirke commented Jan 31, 2025

I am experiencing this too, it seems like the workflow from the instructions is broken. I cloned the repo, made no changes, and ran docker compose up --build - I was able to login as admin, then got the same mostly-blank screen as in the issue here. Lots of this in the error logs:

superset_app          | 2025-01-31 20:37:11,427: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 <lambda>
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.

@sfirke sfirke added the validation:validated A committer has validated / submitted the issue or it was reported by multiple users label Jan 31, 2025
Copy link

dosubot bot commented Jan 31, 2025

To proceed and access the Superset dashboard despite the "Unknown Operation" message, you can simply continue using Superset as the initialization process appears to have completed successfully. The message doesn't seem to impact the functionality, so you should be able to access the dashboard by navigating to http://<your-docker-host>:8088 in your web browser. If you encounter any specific issues while using the dashboard, those would need to be addressed separately, but based on the logs, you should be able to proceed without any problems.

To continue talking to Dosu, mention @dosu.


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

@sfirke
Copy link
Member

sfirke commented Jan 31, 2025

Possible fix here: #18262 (comment), haven't tried it yet but noting for later

@hughhhh
Copy link
Member

hughhhh commented Jan 31, 2025

@sfirke what port do you goto to see the UI portion?

@sfirke
Copy link
Member

sfirke commented Jan 31, 2025

Port 8088

@drummerwolli
Copy link
Contributor

drummerwolli commented Feb 6, 2025

i have the same issue. i had a look at the possible fix from @sfirke but i can see in my docker build that the npm build is actually running and finishing without problems. so i somehow doubt that this is the problem. also, the comment does not specify which commands exactly to run, so hard to execute this workaround, maybe i was misunderstanding something.

@sfirke
Copy link
Member

sfirke commented Feb 6, 2025

@drummerwolli how long is your npm build taking to finish? In my broken new dev environment affected by this problem, it is taking 10 seconds. In my existing functioning environment on another machine, it takes more like 2000 seconds (30 minutes). I'm still stuck, but that feels like a clue.

@drummerwolli
Copy link
Contributor

@sfirke i tried now downgrading to 4.1.1, and then the build took 567.6s ... which was definately longer than on the latest master branch. but the issue unfortunately still persists, i still get no static assets 🤔

@drummerwolli
Copy link
Contributor

drummerwolli commented Feb 6, 2025

okay, good news: i just noticed that the docker container was still spitting out logs. and now it finished way later and i can see assets. so the actual build is taking longer than the docker-compose build.

i will retry this once more with the latest master branch and will try to be more patient.

@sfirke
Copy link
Member

sfirke commented Feb 6, 2025

Eager to hear what you experience on master!

Is there an npm command I can/should run first to build those front-end assets? In my case, the docker-compose up --build wasn't streaming logs anymore related to the front-end build.

@drummerwolli
Copy link
Contributor

@sfirke i found this recent PR: #32017 ... this looked suspicious to me. so i tried the commit before that PR, and that still works. can you try as well? wondering if this PR broke this, as it also touches caching with Docker and other things with the Docker build.

@mistercrunch
Copy link
Member

mistercrunch commented Feb 6, 2025

Oh! gotta hit up port 9000 now that we use npm run dev-server in the main docker-compose.yml. I think 8088 is still exposed, but may serve an older/lingering build (?)

@sfirke
Copy link
Member

sfirke commented Feb 6, 2025

@mistercrunch are you saying we should be visiting Superset at localhost:9000? When I try that I get this error:

superset_node         | [HPM] Error occurred while proxying request localhost:9000/ to http://host.docker.internal:8088/ [ENOTFOUND] (https://nodejs.org/api/errors.html#errors_common_system_errors)

@sfirke
Copy link
Member

sfirke commented Feb 6, 2025

@drummerwolli I tried git checkout a87a13c3abeb162b70e7f4db807f5ea223346f41 to take my repo state back to Jan 29, then docker compose up --build and that did not change things for me. The npm build finishes in ten seconds and I get the original error experienced by OP here.

@mistercrunch
Copy link
Member

Yes, for the main/default dev environment docker-compose.yml, the official port is 9000 now and it should be reflected in the docs. Now if you're getting [HPM] Error occurred while proxying request localhost:9000/ it seems that the app might not be served (or maybe the container is just not ready yet). Recently I changed some of the logic/dependencies so that the app doesn't start until superset-init (loading examples, creating admin user) needs to finish and succeed first.

Any error messages in the docker-compose logs prior to the proxy error message?

@drummerwolli
Copy link
Contributor

@mistercrunch unfortunately not:

docker logs -f superset_node
Building Superset frontend in dev mode inside docker container
npm notice
npm notice New major version of npm available! 10.8.2 -> 11.1.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.1.0
npm notice To update run: npm install -g npm@11.1.0
npm notice
Running 
up to date, audited 3980 packages in 14s

658 packages are looking for funding
  run `npm fund` for details

33 vulnerabilities (22 moderate, 10 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

up to date, audited 3980 packages in 4s

658 packages are looking for funding
  run `npm fund` for details

33 vulnerabilities (22 moderate, 10 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
Start webpack dev server

> superset@0.0.0-dev dev-server
> cross-env NODE_ENV=development BABEL_ENV=development node --max_old_space_size=4096 ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode=development

[Superset Plugin] Use symlink source for @superset-ui/chart-controls @ ./packages/superset-ui-chart-controls
[Superset Plugin] Use symlink source for @superset-ui/core @ ./packages/superset-ui-core
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-calendar @ ./plugins/legacy-plugin-chart-calendar
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-chord @ ./plugins/legacy-plugin-chart-chord
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-country-map @ ./plugins/legacy-plugin-chart-country-map
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-horizon @ ./plugins/legacy-plugin-chart-horizon
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-map-box @ ./plugins/legacy-plugin-chart-map-box
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-paired-t-test @ ./plugins/legacy-plugin-chart-paired-t-test
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-parallel-coordinates @ ./plugins/legacy-plugin-chart-parallel-coordinates
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-partition @ ./plugins/legacy-plugin-chart-partition
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-rose @ ./plugins/legacy-plugin-chart-rose
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-world-map @ ./plugins/legacy-plugin-chart-world-map
[Superset Plugin] Use symlink source for @superset-ui/legacy-preset-chart-deckgl @ ./plugins/legacy-preset-chart-deckgl
[Superset Plugin] Use symlink source for @superset-ui/legacy-preset-chart-nvd3 @ ./plugins/legacy-preset-chart-nvd3
[Superset Plugin] Use symlink source for @superset-ui/plugin-chart-cartodiagram @ ./plugins/plugin-chart-cartodiagram
[Superset Plugin] Use symlink source for @superset-ui/plugin-chart-echarts @ ./plugins/plugin-chart-echarts
[Superset Plugin] Use symlink source for @superset-ui/plugin-chart-handlebars @ ./plugins/plugin-chart-handlebars
[Superset Plugin] Use symlink source for @superset-ui/plugin-chart-pivot-table @ ./plugins/plugin-chart-pivot-table
[Superset Plugin] Use symlink source for @superset-ui/plugin-chart-table @ ./plugins/plugin-chart-table
[Superset Plugin] Use symlink source for @superset-ui/plugin-chart-word-cloud @ ./plugins/plugin-chart-word-cloud
[Superset Plugin] Use symlink source for @superset-ui/switchboard @ ./packages/superset-ui-switchboard

[HPM] Proxy created: /  -> http://host.docker.internal:8088
<s> [webpack.Progress] 3% setup watch run
<s> [webpack.Progress] 3% setup watch run webpack-cli
<s> [webpack.Progress] 3% setup watch run webpack-dev-middleware
<s> [webpack.Progress] 3% setup watch run WebpackManifestPlugin
<s> [webpack.Progress] 3% setup watch run
<s> [webpack.Progress] 4% setup normal module factory
<s> [webpack.Progress] 4% setup normal module factory
<s> [webpack.Progress] 5% setup context module factory
<s> [webpack.Progress] 5% setup context module factory
<s> [webpack.Progress] 6% setup before compile
<s> [webpack.Progress] 6% setup before compile ProgressPlugin
<s> [webpack.Progress] 6% setup before compile
<s> [webpack.Progress] 7% setup compile
<s> [webpack.Progress] 7% setup compile ExternalsPlugin
<s> [webpack.Progress] 7% setup compile ExternalsPlugin
<s> [webpack.Progress] 7% setup compile
<s> [webpack.Progress] 8% setup compilation
<s> [webpack.Progress] 8% setup compilation CopyPlugin
<s> [webpack.Progress] 8% setup compilation HtmlWebpackPlugin
<s> [webpack.Progress] 8% setup compilation HtmlWebpackPlugin
<s> [webpack.Progress] 8% setup compilation ArrayPushCallbackChunkFormatPlugin
<s> [webpack.Progress] 8% setup compilation JsonpChunkLoadingPlugin
<s> [webpack.Progress] 8% setup compilation StartupChunkDependenciesPlugin
<s> [webpack.Progress] 8% setup compilation ImportScriptsChunkLoadingPlugin
<s> [webpack.Progress] 8% setup compilation WorkerPlugin
<s> [webpack.Progress] 8% setup compilation SplitChunksPlugin
<s> [webpack.Progress] 8% setup compilation ResolverCachePlugin
<s> [webpack.Progress] 8% setup compilation WebpackManifestPlugin
<s> [webpack.Progress] 8% setup compilation
<s> [webpack.Progress] 9% setup compilation
<s> [webpack.Progress] 9% setup compilation ProvidePlugin
<s> [webpack.Progress] 9% setup compilation DefinePlugin
<s> [webpack.Progress] 9% setup compilation ProgressPlugin
<s> [webpack.Progress] 9% setup compilation ChunkPrefetchPreloadPlugin
<s> [webpack.Progress] 9% setup compilation ModuleInfoHeaderPlugin
<s> [webpack.Progress] 9% setup compilation EvalSourceMapDevToolPlugin
<s> [webpack.Progress] 9% setup compilation JavascriptModulesPlugin
<s> [webpack.Progress] 9% setup compilation JsonModulesPlugin
<s> [webpack.Progress] 9% setup compilation AssetModulesPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation RuntimePlugin
<s> [webpack.Progress] 9% setup compilation InferAsyncModulesPlugin
<s> [webpack.Progress] 9% setup compilation DataUriPlugin
<s> [webpack.Progress] 9% setup compilation FileUriPlugin
<s> [webpack.Progress] 9% setup compilation CompatibilityPlugin
<s> [webpack.Progress] 9% setup compilation HarmonyModulesPlugin
<s> [webpack.Progress] 9% setup compilation AMDPlugin
<s> [webpack.Progress] 9% setup compilation RequireJsStuffPlugin
<s> [webpack.Progress] 9% setup compilation CommonJsPlugin
<s> [webpack.Progress] 9% setup compilation LoaderPlugin
<s> [webpack.Progress] 9% setup compilation LoaderPlugin
<s> [webpack.Progress] 9% setup compilation NodeStuffPlugin
<s> [webpack.Progress] 9% setup compilation APIPlugin
<s> [webpack.Progress] 9% setup compilation ExportsInfoApiPlugin
<s> [webpack.Progress] 9% setup compilation WebpackIsIncludedPlugin
<s> [webpack.Progress] 9% setup compilation ConstPlugin
<s> [webpack.Progress] 9% setup compilation UseStrictPlugin
<s> [webpack.Progress] 9% setup compilation RequireIncludePlugin
<s> [webpack.Progress] 9% setup compilation RequireEnsurePlugin
<s> [webpack.Progress] 9% setup compilation RequireContextPlugin
<s> [webpack.Progress] 9% setup compilation ImportPlugin
<s> [webpack.Progress] 9% setup compilation ImportMetaContextPlugin
<s> [webpack.Progress] 9% setup compilation SystemPlugin
<s> [webpack.Progress] 9% setup compilation ImportMetaPlugin
<s> [webpack.Progress] 9% setup compilation URLPlugin
<s> [webpack.Progress] 9% setup compilation DefaultStatsFactoryPlugin
<s> [webpack.Progress] 9% setup compilation DefaultStatsPresetPlugin
<s> [webpack.Progress] 9% setup compilation DefaultStatsPrinterPlugin
<s> [webpack.Progress] 9% setup compilation JavascriptMetaInfoPlugin
<s> [webpack.Progress] 9% setup compilation EnsureChunkConditionsPlugin
<s> [webpack.Progress] 9% setup compilation RemoveEmptyChunksPlugin
<s> [webpack.Progress] 9% setup compilation MergeDuplicateChunksPlugin
<s> [webpack.Progress] 9% setup compilation SideEffectsFlagPlugin
<s> [webpack.Progress] 9% setup compilation FlagDependencyExportsPlugin
<s> [webpack.Progress] 9% setup compilation FlagDependencyUsagePlugin
<s> [webpack.Progress] 9% setup compilation NamedModuleIdsPlugin
<s> [webpack.Progress] 9% setup compilation NamedChunkIdsPlugin
<s> [webpack.Progress] 9% setup compilation DefinePlugin
<s> [webpack.Progress] 9% setup compilation TemplatedPathPlugin
<s> [webpack.Progress] 9% setup compilation RecordIdsPlugin
<s> [webpack.Progress] 9% setup compilation WarnCaseSensitiveModulesPlugin
<s> [webpack.Progress] 9% setup compilation AddBuildDependenciesPlugin
<s> [webpack.Progress] 9% setup compilation AddBuildDependenciesPlugin
<s> [webpack.Progress] 9% setup compilation AddBuildDependenciesPlugin
<s> [webpack.Progress] 9% setup compilation IgnoreWarningsPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation EntryPlugin
<s> [webpack.Progress] 9% setup compilation ProvidePlugin
<s> [webpack.Progress] 9% setup compilation HotModuleReplacementPlugin
<s> [webpack.Progress] 9% setup compilation WebpackManifestPlugin
<s> [webpack.Progress] 9% setup compilation
<s> [webpack.Progress] 10% building
<s> [webpack.Progress] 10% building 0/1 entries 0/0 dependencies 0/0 modules
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:9000/
<i> [webpack-dev-server] Content not from webpack is served from '/app/static/assets' directory
<i> [webpack-dev-server] 404s will fallback to '/index.html'
<s> [webpack.Progress] 10% building 0/14 entries 1/14 dependencies 0/0 modules
<s> [webpack.Progress] 10% building 1/14 entries 302/799 dependencies 32/168 modules
<s> [webpack.Progress] 10% building 2/14 entries 753/923 dependencies 60/448 modules
<s> [webpack.Progress] 10% building 3/14 entries 753/923 dependencies 60/448 modules
<s> [webpack.Progress] 10% building 4/14 entries 753/923 dependencies 60/448 modules
<s> [webpack.Progress] 10% building 5/14 entries 753/923 dependencies 60/448 modules
<s> [webpack.Progress] 10% building 6/14 entries 753/923 dependencies 61/448 modules
<s> [webpack.Progress] 21% building 7/14 entries 9003/16516 dependencies 1329/3914 modules
<s> [webpack.Progress] 38% building 7/14 entries 26200/27114 dependencies 6343/7883 modules
<s> [webpack.Progress] 45% building 7/14 entries 32789/33248 dependencies 7879/10100 modules
<s> [webpack.Progress] 63% building 8/14 entries 42529/42576 dependencies 12072/12280 modules
<s> [webpack.Progress] 63% building 9/14 entries 42529/42576 dependencies 12072/12280 modules
<s> [webpack.Progress] 63% building 10/14 entries 42529/42576 dependencies 12072/12280 modules
<s> [webpack.Progress] 63% building 11/14 entries 42529/42576 dependencies 12072/12280 modules
<s> [webpack.Progress] 63% building 12/14 entries 42529/42576 dependencies 12073/12280 modules
<s> [webpack.Progress] 64% building 13/14 entries 42697/42698 dependencies 12304/12323 modules
<s> [webpack.Progress] 65% building 14/14 entries 42699/42699 dependencies 12324/12324 modules
<s> [webpack.Progress] 65% building
<s> [webpack.Progress] 69% building finish
<s> [webpack.Progress] 69% building finish
<s> [webpack.Progress] 70% sealing finish module graph
<s> [webpack.Progress] 70% sealing finish module graph ResolverCachePlugin
<s> [webpack.Progress] 70% sealing finish module graph InferAsyncModulesPlugin
<s> [webpack.Progress] 70% sealing finish module graph FlagDependencyExportsPlugin
<s> [webpack.Progress] 70% sealing finish module graph
<s> [webpack.Progress] 70% sealing plugins
<s> [webpack.Progress] 70% sealing plugins WarnCaseSensitiveModulesPlugin
<s> [webpack.Progress] 70% sealing plugins
<s> [webpack.Progress] 71% sealing dependencies optimization
<s> [webpack.Progress] 71% sealing dependencies optimization SideEffectsFlagPlugin
<s> [webpack.Progress] 71% sealing dependencies optimization FlagDependencyUsagePlugin
<s> [webpack.Progress] 71% sealing dependencies optimization
<s> [webpack.Progress] 71% sealing after dependencies optimization
<s> [webpack.Progress] 71% sealing after dependencies optimization
<s> [webpack.Progress] 72% sealing chunk graph
<s> [webpack.Progress] 72% sealing chunk graph
<s> [webpack.Progress] 73% sealing after chunk graph
<s> [webpack.Progress] 73% sealing after chunk graph
<s> [webpack.Progress] 73% sealing optimizing
<s> [webpack.Progress] 73% sealing optimizing
<s> [webpack.Progress] 74% sealing module optimization
<s> [webpack.Progress] 74% sealing module optimization
<s> [webpack.Progress] 75% sealing after module optimization
<s> [webpack.Progress] 75% sealing after module optimization
<s> [webpack.Progress] 75% sealing chunk optimization
<s> [webpack.Progress] 75% sealing chunk optimization EnsureChunkConditionsPlugin
<s> [webpack.Progress] 75% sealing chunk optimization RemoveEmptyChunksPlugin
<s> [webpack.Progress] 75% sealing chunk optimization MergeDuplicateChunksPlugin
<s> [webpack.Progress] 75% sealing chunk optimization SplitChunksPlugin
<s> [webpack.Progress] 75% sealing chunk optimization RemoveEmptyChunksPlugin
<s> [webpack.Progress] 75% sealing chunk optimization
<s> [webpack.Progress] 76% sealing after chunk optimization
<s> [webpack.Progress] 76% sealing after chunk optimization
<s> [webpack.Progress] 77% sealing module and chunk tree optimization
<s> [webpack.Progress] 77% sealing module and chunk tree optimization PersistentChildCompilerSingletonPlugin
<s> [webpack.Progress] 77% sealing module and chunk tree optimization
<s> [webpack.Progress] 77% sealing after module and chunk tree optimization
<s> [webpack.Progress] 77% sealing after module and chunk tree optimization
<s> [webpack.Progress] 78% sealing chunk modules optimization
<s> [webpack.Progress] 78% sealing chunk modules optimization
<s> [webpack.Progress] 78% sealing after chunk modules optimization
<s> [webpack.Progress] 78% sealing after chunk modules optimization
<s> [webpack.Progress] 79% sealing module reviving
<s> [webpack.Progress] 79% sealing module reviving RecordIdsPlugin
<s> [webpack.Progress] 79% sealing module reviving
<s> [webpack.Progress] 80% sealing before module ids
<s> [webpack.Progress] 80% sealing before module ids
<s> [webpack.Progress] 80% sealing module ids
<s> [webpack.Progress] 80% sealing module ids NamedModuleIdsPlugin
<s> [webpack.Progress] 80% sealing module ids
<s> [webpack.Progress] 81% sealing module id optimization
<s> [webpack.Progress] 81% sealing module id optimization
<s> [webpack.Progress] 82% sealing module id optimization
<s> [webpack.Progress] 82% sealing module id optimization
<s> [webpack.Progress] 82% sealing chunk reviving
<s> [webpack.Progress] 82% sealing chunk reviving RecordIdsPlugin
<s> [webpack.Progress] 82% sealing chunk reviving
<s> [webpack.Progress] 83% sealing before chunk ids
<s> [webpack.Progress] 83% sealing before chunk ids
<s> [webpack.Progress] 84% sealing chunk ids
<s> [webpack.Progress] 84% sealing chunk ids NamedChunkIdsPlugin
<s> [webpack.Progress] 84% sealing chunk ids
<s> [webpack.Progress] 84% sealing chunk id optimization
<s> [webpack.Progress] 84% sealing chunk id optimization
<s> [webpack.Progress] 85% sealing after chunk id optimization
<s> [webpack.Progress] 85% sealing after chunk id optimization
<s> [webpack.Progress] 86% sealing record modules
<s> [webpack.Progress] 86% sealing record modules RecordIdsPlugin
<s> [webpack.Progress] 86% sealing record modules
<s> [webpack.Progress] 86% sealing record chunks
<s> [webpack.Progress] 86% sealing record chunks RecordIdsPlugin
<s> [webpack.Progress] 86% sealing record chunks
<s> [webpack.Progress] 87% sealing module hashing
<s> [webpack.Progress] 87% sealing module hashing
<s> [webpack.Progress] 87% sealing code generation
<s> [webpack.Progress] 87% sealing code generation
<s> [webpack.Progress] 88% sealing runtime requirements
<s> [webpack.Progress] 88% sealing runtime requirements
<s> [webpack.Progress] 89% sealing hashing
<s> [webpack.Progress] 89% sealing hashing
<s> [webpack.Progress] 89% sealing after hashing
<s> [webpack.Progress] 89% sealing after hashing
<s> [webpack.Progress] 90% sealing record hash
<s> [webpack.Progress] 90% sealing record hash
<s> [webpack.Progress] 91% sealing module assets processing
<s> [webpack.Progress] 91% sealing module assets processing
<s> [webpack.Progress] 91% sealing chunk assets processing
<s> [webpack.Progress] 91% sealing chunk assets processing
<s> [webpack.Progress] 92% sealing asset processing
<s> [webpack.Progress] 92% sealing asset processing copy-webpack-plugin
<s> [webpack.Progress] 92% sealing asset processing HotModuleReplacementPlugin
<s> [webpack.Progress] 92% sealing asset processing PersistentChildCompilerSingletonPlugin
<s> [webpack.Progress] 92% sealing asset processing HtmlWebpackPlugin
<s> [webpack.Progress] 92% sealing asset processing HtmlWebpackPlugin
<s> [webpack.Progress] 92% sealing asset processing WebpackManifestPlugin
<s> [webpack.Progress] 92% sealing asset processing
<s> [webpack.Progress] 93% sealing after asset optimization
<s> [webpack.Progress] 93% sealing after asset optimization
<s> [webpack.Progress] 93% sealing recording
<s> [webpack.Progress] 93% sealing recording HotModuleReplacementPlugin
<s> [webpack.Progress] 93% sealing recording
<s> [webpack.Progress] 94% sealing after seal
<s> [webpack.Progress] 94% sealing after seal
<s> [webpack.Progress] 95% emitting emit
<s> [webpack.Progress] 95% emitting emit
<s> [webpack.Progress] 98% emitting after emit
<s> [webpack.Progress] 98% emitting after emit SizeLimitsPlugin
<s> [webpack.Progress] 98% emitting after emit
<s> [webpack.Progress] 99% done plugins
<s> [webpack.Progress] 99% done plugins IdleFileCachePlugin
<s> [webpack.Progress] 99% done plugins webpack-dev-server
<s> [webpack.Progress] 99% done plugins webpack-dev-middleware
<s> [webpack.Progress] 99% done plugins
<s> [webpack.Progress] 99% 

<s> [webpack.Progress] 99% cache store build dependencies
<s> [webpack.Progress] 99% cache store build dependencies IdleFileCachePlugin
<s> [webpack.Progress] 99% cache store build dependencies
<s> [webpack.Progress] 99% cache begin idle
<s> [webpack.Progress] 99% cache begin idle IdleFileCachePlugin
<s> [webpack.Progress] 99% cache begin idle
<s> [webpack.Progress] 100% 

1057 assets
12425 modules
webpack 5.97.1 compiled successfully in 6897 ms
[HPM] Proxy created: /  -> http://host.docker.internal:8088
[HPM] Error occurred while proxying request localhost:9000/ to http://host.docker.internal:8088/ [ENOTFOUND] (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Error occurred while proxying request localhost:9000/favicon.ico to http://host.docker.internal:8088/ [ENOTFOUND] (https://nodejs.org/api/errors.html#errors_common_system_errors)

@drummerwolli
Copy link
Contributor

drummerwolli commented Feb 6, 2025

@sfirke mh, strange, i thought i was onto something with the PR 😄 ... but the original bug post here is also older than this PR, so that is also an indication that it's not caused by the PR mentioned.

@mistercrunch
Copy link
Member

could look at docker logs -f superset_init and/or docker logs -f superset_app , the superset_app depends on the superset_init completing successfully

@sfirke
Copy link
Member

sfirke commented Feb 7, 2025

Looks like superset_init finished successfully, the last line of its logs is Init Step 4/4 [Complete] -- Loading examples

@drummerwolli
Copy link
Contributor

nothing suspicious in the container logs.

one thing i noticed today (which does not make sense to me but posting here anyways, maybe it helps someone else): everything works with a git clone of apache/superset repo, but it does not work when cloning my fork drummerwolli/superset ... same branch, same commit, just different folders. very strange ...

@mistercrunch
Copy link
Member

@drummerwolli that's super key information, it points in the direction that there's something in the filesystem that's throwing off your environment. That's as opposed to something funky happening in your docker state for instance (bad images, ...)

Trying to think through what might be in the filesystem...

  • a .env or .env-local file that's been modified (I think .env-local are ".gitignored")
  • similarly, something under superset_config_docker.py or similar
  • something that has to do with env vars (though that one should be easy to rule out by starting a new terminal/shell, or comparing the output of env)
  • something around numerous frontend build caches, running npm run prune will clean up node_modules/ and other frontend-related caches

Troubleshooting ideas:

  • compare the output of env
  • look for local superset_config getting loaded up
  • comparing the filesystem between the two cloned git repos (?) some sort of filesystem diffing tool or crafty shell commands
  • maybe some git-fu like running some git clean git reset-type commands to identify or clean up some local files that are git-ignored.

@mistercrunch
Copy link
Member

@rusackas and I were talking about publishing an FAQ entry around cleaning up / fixing up a dev environment, things around docker prune-type commands, git clean, npm run prune, nuking the local docker postgres DB, ...

It's a bit tricky as any of these commands can also removed desired states/local-env stuff, but maybe we just write a bit of a disclaimer "RUNNING SOME OF THESE COMMANDS MAY BREAK LOCAL CONFIGURATIONS"...

In any case, a fresh git clone may be the most sensible recommendation here. Like when people report "my dev env is broken", maybe the first step is to ask if they can recreated the issue from a fresh git clone

@mistercrunch
Copy link
Member

@dosubot any thoughts around breaking up some of my recommendations into actionable steps that will lead to identify/fix issues?

Copy link

dosubot bot commented Feb 7, 2025

To address the issue with missing static assets in the Apache Superset Docker environment, consider the following steps:

  1. Ensure Complete Build Process: The build process for static assets might still be running even after docker-compose seems to have finished. Monitor the container logs to confirm when the asset building process is actually complete. This can take significantly longer than expected, so patience is key [1].

  2. Access the Correct Port: For the main/default development environment, Superset's frontend is now served on port 9000 using npm run dev-server. Ensure you are accessing http://localhost:9000 to view the UI. If you encounter proxy errors, it might indicate that the app isn't fully ready yet [2].

  3. Check for Environment Differences: If the issue persists, consider differences between your working and non-working environments. This could include differences in .env files, local configurations like superset_config_docker.py, or cached frontend build artifacts. Running npm run prune can help clean up frontend-related caches.

  4. Re-clone the Repository: If troubleshooting doesn't resolve the issue, try starting fresh by cloning the repository again. This can help eliminate any local file system issues that might be affecting the build process.

These steps should help in identifying and resolving the issue with missing static assets in your Superset Docker setup.

To continue talking to Dosu, mention @dosu.


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

@drummerwolli
Copy link
Contributor

some more updates: i tried cloning now into a new fresh empty directory, and there i have now the same problem. i have now 3 directories (2x times apache org, 1x time my fork) and only one (apache org) works, the other two dont.

@mistercrunch if you clone the latest master into a completely empty dir and just run docker compose up -d, does http://localhost:8088 work for you as expected?

@mistercrunch
Copy link
Member

it's http://localhost:9000 now for docker compose up --build since we use the interactive webpack proxy (allows auto-refresh while you touch frontend files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install:docker Installation - docker container validation:validated A committer has validated / submitted the issue or it was reported by multiple users
Projects
None yet
Development

No branches or pull requests

6 participants