apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
61.7k stars 13.49k forks source link

Application not loading correctly after following quick start guide #25144

Open karatekaneen opened 1 year ago

karatekaneen commented 1 year ago

When trying to launch the docker compose env everything looks ok until after I log in. Then I'm greeted with a welcome page with an image that does not load and two buttons that doesn't do anything.

How to reproduce the bug

  1. git clone https://github.com/apache/superset.git
  2. touch ./docker/requirements-local.txt && echo "mysqlclient" >> ./docker/requirements-local.txt
  3. docker compose up
  4. Go to localhost:8088 and log in with admin/admin
  5. Get stuck on semi-blank page

Expected results

I expect the application to load

Actual results

Get stuck on welcome screen. The console only logs errors about the missing gifs shown in the screenshots below.

Logs

There are errors in a couple of the containers.

Superset_app:

2023-08-31 08:26:20,442:INFO:werkzeug:192.168.0.1 - - [31/Aug/2023 08:26:20] "GET /static/appbuilder/datepicker/bootstrap-datepicker.js HTTP/1.1" 200 -
2023-08-31 08:26:20,443:WARNING:superset.views.base:HTTPException
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 713, in <lambda>
    view_func=lambda **kw: self_ref().send_static_file(**kw),  # type: ignore # noqa: B950
  File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file
    return send_from_directory(
  File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory
    return werkzeug.utils.send_from_directory(  # type: ignore[return-value]
  File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory
    raise NotFound()
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.
2023-08-31 08:26:20,457:INFO:werkzeug:192.168.0.1 - - [31/Aug/2023 08:26:20] "GET /static/appbuilder/js/ab.js HTTP/1.1" 200 -
2023-08-31 08:26:20,458:INFO:werkzeug:192.168.0.1 - - [31/Aug/2023 08:26:20] "GET /static/appbuilder/select2/select2.js HTTP/1.1" 200 -
2023-08-31 08:26:20,473:INFO:werkzeug:192.168.0.1 - - [31/Aug/2023 08:26:20] "GET /static/assets/images/superset-logo-horiz.png HTTP/1.1" 404 -

Superset_node (Exit status 251):

npm ERR! code EIO
npm ERR! syscall rename
npm ERR! path /app/superset-frontend/node_modules/sha.js
npm ERR! dest /app/superset-frontend/node_modules/.sha.js-sPyHcmzN
npm ERR! errno -5
npm ERR! EIO: i/o error, rename '/app/superset-frontend/node_modules/sha.js' -> '/app/superset-frontend/node_modules/.sha.js-sPyHcmzN'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-08-31T08_25_51_287Z-debug-0.log

Superset_websocket (exit status 1):

> superset-websocket@0.0.1 start
> node dist/index.js start

config.json file not found
{"date":"Thu Aug 31 2023 08:50:14 GMT+0000 (Coordinated Universal Time)","error":{},"exception":true,"level":"error","message":"uncaughtException: Please provide a JWT secret at least 32 bytes long\nError: Please provide a JWT secret at least 32 bytes long\n    at Object.<anonymous> (/home/superset-websocket/dist/index.js:75:11)\n    at Module._compile (node:internal/modules/cjs/loader:1198:14)\n    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)\n    at Module.load (node:internal/modules/cjs/loader:1076:32)\n    at Function.Module._load (node:internal/modules/cjs/loader:911:12)\n    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)\n    at node:internal/main/run_main_module:22:47","os":{"loadavg":[0.99,0.7,1.14],"uptime":3751308.32},"process":{"argv":["/usr/local/bin/node","/home/superset-websocket/dist/index.js","start"],"cwd":"/home/superset-websocket","execPath":"/usr/local/bin/node","gid":1000,"memoryUsage":{"arrayBuffers":340227,"external":1561581,"heapTotal":21270528,"heapUsed":15773984,"rss":58896384},"pid":19,"uid":1000,"version":"v16.20.2"},"stack":"Error: Please provide a JWT secret at least 32 bytes long\n    at Object.<anonymous> (/home/superset-websocket/dist/index.js:75:11)\n    at Module._compile (node:internal/modules/cjs/loader:1198:14)\n    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)\n    at Module.load (node:internal/modules/cjs/loader:1076:32)\n    at Function.Module._load (node:internal/modules/cjs/loader:911:12)\n    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)\n    at node:internal/main/run_main_module:22:47","trace":[{"column":11,"file":"/home/superset-websocket/dist/index.js","function":null,"line":75,"method":null,"native":false},{"column":14,"file":"node:internal/modules/cjs/loader","function":"Module._compile","line":1198,"method":"_compile","native":false},{"column":10,"file":"node:internal/modules/cjs/loader","function":"Module._extensions..js","line":1252,"method":".js","native":false},{"column":32,"file":"node:internal/modules/cjs/loader","function":"Module.load","line":1076,"method":"load","native":false},{"column":12,"file":"node:internal/modules/cjs/loader","function":"Module._load","line":911,"method":"_load","native":false},{"column":12,"file":"node:internal/modules/run_main","function":"Function.executeUserEntryPoint [as runMain]","line":81,"method":"executeUserEntryPoint [as runMain]","native":false},{"column":47,"file":"node:internal/main/run_main_module","function":null,"line":22,"method":null,"native":false}]}

Screenshots

Here's how the page looks. The url is http://localhost:8088/superset/welcome/

Skärmavbild 2023-08-31 kl  10 28 52

And the network log. The url for the missing gif is http://localhost:8088/static/assets/images/loading.gif.

Skärmavbild 2023-08-31 kl  10 42 55

Environment

(please complete the following information):

Checklist

Make sure to follow these steps before submitting your issue - thank you!

karatekaneen commented 1 year ago

Workaround for me here was to extend the pre-built docker image instead which did not have the same problem.

toch commented 1 year ago

I have the same issue.

I've found issues with similar log: #24014 #23304 #20319

ningaro commented 1 year ago

I also faced with such problem, but deleting the old node_modules folders helped in my case. You may use one of this commands:

  • git clean -xdf
  • git reset --hard <- 🛑 DANGER, COMMIT LOCAL CHANGES BEFORE!
ForecastHealth commented 11 months ago

I have the same problem, building from ubuntu 20.04

ForecastHealth commented 11 months ago

I don't have the same issue with

learntimes commented 11 months ago

I have the same issue

Traceback (most recent call last): superset_app | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request superset_app | rv = self.dispatch_request() superset_app | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request superset_app | return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) superset_app | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 713, in superset_app | view_func=lambda kw: self_ref().send_static_file(**kw), # type: ignore # noqa: B950 superset_app | File "/usr/local/lib/python3.9/site-packages/flask/scaffold.py", line 331, in send_static_file superset_app | return send_from_directory( superset_app | File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 590, in send_from_directory superset_app | return werkzeug.utils.send_from_directory( # type: ignore[return-value] superset_app | File "/usr/local/lib/python3.9/site-packages/werkzeug/utils.py", line 578, in send_from_directory superset_app | raise NotFound()

learntimes commented 11 months ago

1695644171932

jdilger commented 8 months ago

Same problem on Mac M1 Pro, 14.1.1 (23B81).

ajitchahal commented 7 months ago

Use following superset image on M1,M2 or M3 image: apache/superset:latest-py310-arm replace it with *superset-image in docker-compose-non-dev.yml THEN run: docker-compose -f docker-compose-non-dev.yml pull docker-compose -f docker-compose-non-dev.yml up

tmnvanderberg commented 5 months ago

Same thing on Ubuntu 22.04 / i7-14700K

UsenPang commented 3 months ago

I have the same issue,you may need to wait a bit, after starting superset_node there are some packages to download.

image

rusackas commented 3 months ago

Yes indeed, you have to wait for webpack to build the frontend assets before you can serve the webpack assets :)

alivalizadakaseya commented 3 weeks ago

I needed to wait around 20 mins before it started working, @rusackas was right, thank you :)