Dash app Deployment on Heroku successful but app not loading

I’m trying to to deploy this app on heroku and it says build and deployment successful but app is not loading and error shown.

my Procfile contains : web: gunicorn app:app

log file says :
2018-01-24T08:51:16.929255+00:00 heroku[web.1]: Starting process with command gunicorn app:app
2018-01-24T08:51:19.679269+00:00 app[web.1]: [2018-01-24 08:51:19 +0000] [4] [INFO] Starting gunicorn 19.7.1
2018-01-24T08:51:19.679974+00:00 app[web.1]: [2018-01-24 08:51:19 +0000] [4] [INFO] Listening at: http://0.0.0.0:20825 (4)
2018-01-24T08:51:19.680078+00:00 app[web.1]: [2018-01-24 08:51:19 +0000] [4] [INFO] Using worker: sync
2018-01-24T08:51:19.685246+00:00 app[web.1]: [2018-01-24 08:51:19 +0000] [8] [INFO] Booting worker with pid: 8
2018-01-24T08:51:19.735783+00:00 app[web.1]: [2018-01-24 08:51:19 +0000] [9] [INFO] Booting worker with pid: 9
2018-01-24T08:51:20.654199+00:00 heroku[web.1]: State changed from starting to up
2018-01-24T08:51:21.180362+00:00 app[web.1]: Application object must be callable.
2018-01-24T08:51:21.182665+00:00 app[web.1]: [2018-01-24 08:51:21 +0000] [9] [INFO] Worker exiting (pid: 9)
2018-01-24T08:51:21.270729+00:00 app[web.1]: Application object must be callable.
2018-01-24T08:51:21.273835+00:00 app[web.1]: [2018-01-24 08:51:21 +0000] [8] [INFO] Worker exiting (pid: 8)

What i’m missing ? Please suggest me what to do :frowning:

1 Like

Assuming you have the line server = app.server in your app.py file as in that link, I think your Procfile should have web: gunicorn app:server

3 Likes

got it ! thanks @baris

Worked for me too.
I’d multiple page dash app with index.py as main page which iscalling other layout pages.

Changing from : web: gunicorn app
to : web: gunicorn index:server

Appreciated.

Everything works fine locally but not on Heroku
only title, favicon is loaded on heroku web app

Heroku logs:
2019-07-08T04:59:10.110841+00:00 app[api]: Initial release by user ajinkya.pathak@infogen-labs.com
2019-07-08T04:59:10.304367+00:00 app[api]: Release v2 created by user ajinkya.pathak@infogen-labs.com
2019-07-08T04:59:10.304367+00:00 app[api]: Enable Logplex by user ajinkya.pathak@infogen-labs.com
2019-07-08T04:59:10.110841+00:00 app[api]: Release v1 created by user ajinkya.pathak@infogen-labs.com
2019-07-08T05:00:24.000000+00:00 app[api]: Build started by user ajinkya.pathak@infogen-labs.com
2019-07-08T05:02:18.241328+00:00 app[api]: Release v3 created by user ajinkya.pathak@infogen-labs.com
2019-07-08T05:02:18.241328+00:00 app[api]: Deploy 36a29cab by user ajinkya.pathak@infogen-labs.com
2019-07-08T05:02:18.254713+00:00 app[api]: Scaled to web@1:Free by user ajinkya.pathak@infogen-labs.com
2019-07-08T05:02:30.825103+00:00 heroku[web.1]: Starting process with command gunicorn app:server
2019-07-08T05:02:32.552220+00:00 app[web.1]: [2019-07-08 05:02:32 +0000] [4] [INFO] Starting gunicorn 19.9.0
2019-07-08T05:02:32.552715+00:00 app[web.1]: [2019-07-08 05:02:32 +0000] [4] [INFO] Listening at: http://0.0.0.0:9535 (4)
2019-07-08T05:02:32.552816+00:00 app[web.1]: [2019-07-08 05:02:32 +0000] [4] [INFO] Using worker: sync
2019-07-08T05:02:32.556529+00:00 app[web.1]: [2019-07-08 05:02:32 +0000] [10] [INFO] Booting worker with pid: 10
2019-07-08T05:02:32.559004+00:00 app[web.1]: [2019-07-08 05:02:32 +0000] [11] [INFO] Booting worker with pid: 11
2019-07-08T05:02:33.136445+00:00 heroku[web.1]: State changed from starting to up
2019-07-08T05:02:46.000000+00:00 app[api]: Build succeeded
2019-07-08T05:02:56.131143+00:00 heroku[router]: at=info method=GET path="/" host=price-estimate.herokuapp.com request_id=b683e19b-bed1-4781-a57a-deebd8d62a5d fwd=“114.143.107.170” dyno=web.1 conn
ect=1ms service=3ms status=200 bytes=882 protocol=https
2019-07-08T05:02:56.131737+00:00 app[web.1]: 10.65.121.147 - - [08/Jul/2019:05:02:56 +0000] “GET / HTTP/1.1” 200 674 “-” “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like G
ecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:02:56.365598+00:00 app[web.1]: 10.7.184.104 - - [08/Jul/2019:05:02:56 +0000] “GET /dev HTTP/1.1” 200 674 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64;
x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:02:56.367864+00:00 app[web.1]: 10.65.121.147 - - [08/Jul/2019:05:02:56 +0000] “GET /prod HTTP/1.1” 200 674 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64
; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:02:56.366195+00:00 heroku[router]: at=info method=GET path="/dev" host=price-estimate.herokuapp.com request_id=f0eb20ed-f502-4374-9b83-cb70a1e7b780 fwd=“114.143.107.170” dyno=web.1 c
onnect=1ms service=3ms status=200 bytes=882 protocol=https
2019-07-08T05:02:56.367352+00:00 heroku[router]: at=info method=GET path="/prod" host=price-estimate.herokuapp.com request_id=5e0ca89b-8f38-4bd0-8db5-47336eeb8404 fwd=“114.143.107.170” dyno=web.1
connect=1ms service=4ms status=200 bytes=882 protocol=https
2019-07-08T05:02:56.592189+00:00 heroku[router]: at=info method=GET path="/_dash-component-suites/dash_core_components/highlight.pack.js?v=1.0.0&m=1560782792" host=price-estimate.herokuapp.com req
uest_id=4b4148af-b94c-4dd9-a295-39c2382f1cfd fwd=“114.143.107.170” dyno=web.1 connect=1ms service=4ms status=200 bytes=33175 protocol=https
2019-07-08T05:02:56.590315+00:00 app[web.1]: 10.7.184.104 - - [08/Jul/2019:05:02:56 +0000] “GET /_dash-component-suites/dash_core_components/highlight.pack.js?v=1.0.0&m=1560782792 HTTP/1.1” 200 32
974 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:02:56.590600+00:00 app[web.1]: 10.65.121.147 - - [08/Jul/2019:05:02:56 +0000] “GET /_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.min.js?v=0.
6.3&m=1561667553 HTTP/1.1” 200 283634 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:02:56.602624+00:00 heroku[router]: at=info method=GET path="/_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.min.js?v=0.6.3&m=1561667553" host=
price-estimate.herokuapp.com request_id=df5db99c-3118-4bb4-a0cf-2e953d2f8342 fwd=“114.143.107.170” dyno=web.1 connect=1ms service=15ms status=200 bytes=283836 protocol=https
2019-07-08T05:02:59.426284+00:00 app[web.1]: 10.65.121.147 - - [08/Jul/2019:05:02:59 +0000] “GET /assets/favicon.ico?m=1562562023.0 HTTP/1.1” 200 0 “https://price-estimate.herokuapp.com/” “Mozilla
/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:02:59.426655+00:00 heroku[router]: at=info method=GET path="/assets/favicon.ico?m=1562562023.0" host=price-estimate.herokuapp.com request_id=f058d8c7-fe60-43e6-ad95-21719edf0de9 fwd=
“114.143.107.170” dyno=web.1 connect=1ms service=4ms status=200 bytes=30937 protocol=https
2019-07-08T05:03:30.374450+00:00 heroku[router]: at=info method=GET path="/" host=price-estimate.herokuapp.com request_id=5e76ebd4-1315-486c-ae9b-502e1549db2f fwd=“114.143.107.170” dyno=web.1 conn
ect=1ms service=3ms status=200 bytes=882 protocol=https
2019-07-08T05:03:30.375034+00:00 app[web.1]: 10.65.121.147 - - [08/Jul/2019:05:03:30 +0000] “GET / HTTP/1.1” 200 674 “-” “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like G
ecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:03:30.586567+00:00 app[web.1]: 10.7.184.104 - - [08/Jul/2019:05:03:30 +0000] “GET /dev HTTP/1.1” 200 674 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64;
x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:03:30.586967+00:00 app[web.1]: 10.65.121.147 - - [08/Jul/2019:05:03:30 +0000] “GET /prod HTTP/1.1” 200 674 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64
; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:03:30.586791+00:00 heroku[router]: at=info method=GET path="/dev" host=price-estimate.herokuapp.com request_id=5e695c11-563f-4162-b9c1-6462d7d38f95 fwd=“114.143.107.170” dyno=web.1 c
onnect=1ms service=3ms status=200 bytes=882 protocol=https
2019-07-08T05:03:30.586509+00:00 heroku[router]: at=info method=GET path="/prod" host=price-estimate.herokuapp.com request_id=127bbb60-7cb1-46c8-8e34-040ba7ccdf75 fwd=“114.143.107.170” dyno=web.1
connect=1ms service=3ms status=200 bytes=882 protocol=https
2019-07-08T05:03:31.231567+00:00 heroku[router]: at=info method=GET path="/assets/favicon.ico?m=1562562023.0" host=price-estimate.herokuapp.com request_id=8bb43b48-7cf4-4b20-8a1f-cf44a6b891b8 fwd=
“114.143.107.170” dyno=web.1 connect=1ms service=3ms status=200 bytes=30937 protocol=https
2019-07-08T05:03:31.230638+00:00 app[web.1]: 10.7.184.104 - - [08/Jul/2019:05:03:31 +0000] “GET /assets/favicon.ico?m=1562562023.0 HTTP/1.1” 200 0 “https://price-estimate.herokuapp.com/” “Mozilla/
5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:04:08.301593+00:00 heroku[router]: at=info method=GET path="/" host=price-estimate.herokuapp.com request_id=1d44a6b8-7adf-406d-86f5-ed9718584a96 fwd=“114.143.107.170” dyno=web.1 conn
ect=1ms service=3ms status=200 bytes=882 protocol=https
2019-07-08T05:04:08.300917+00:00 app[web.1]: 10.7.184.104 - - [08/Jul/2019:05:04:08 +0000] “GET / HTTP/1.1” 200 674 “-” “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Ge
cko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:04:08.518621+00:00 app[web.1]: 10.7.184.104 - - [08/Jul/2019:05:04:08 +0000] “GET /prod HTTP/1.1” 200 674 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64;
x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:04:08.520006+00:00 app[web.1]: 10.65.121.147 - - [08/Jul/2019:05:04:08 +0000] “GET /dev HTTP/1.1” 200 674 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64;
x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:04:08.519672+00:00 heroku[router]: at=info method=GET path="/dev" host=price-estimate.herokuapp.com request_id=4406b978-bfaa-4717-bf4e-0aa89e01540e fwd=“114.143.107.170” dyno=web.1 c
onnect=1ms service=3ms status=200 bytes=882 protocol=https
2019-07-08T05:04:08.518565+00:00 heroku[router]: at=info method=GET path="/prod" host=price-estimate.herokuapp.com request_id=14621ed8-5351-4f40-97e6-103428e32f00 fwd=“114.143.107.170” dyno=web.1
connect=0ms service=2ms status=200 bytes=882 protocol=https
2019-07-08T05:04:08.872280+00:00 heroku[router]: at=info method=GET path="/assets/favicon.ico?m=1562562023.0" host=price-estimate.herokuapp.com request_id=9abf6470-1a3b-49f7-8f6f-77b0452a4832 fwd=
“114.143.107.170” dyno=web.1 connect=0ms service=3ms status=200 bytes=30937 protocol=https
2019-07-08T05:04:08.872022+00:00 app[web.1]: 10.7.184.104 - - [08/Jul/2019:05:04:08 +0000] “GET /assets/favicon.ico?m=1562562023.0 HTTP/1.1” 200 0 “https://price-estimate.herokuapp.com/” “Mozilla/
5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36”
2019-07-08T05:09:18.903054+00:00 app[web.1]: 10.158.137.35 - - [08/Jul/2019:05:09:18 +0000] “GET / HTTP/1.1” 200 674 “-” “Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:67.0) Gecko/20100101 Firefox/6
7.0”
2019-07-08T05:09:19.124571+00:00 app[web.1]: 10.158.137.35 - - [08/Jul/2019:05:09:19 +0000] “GET /prod HTTP/1.1” 200 674 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64
; x64; rv:67.0) Gecko/20100101 Firefox/67.0”
2019-07-08T05:09:18.902277+00:00 heroku[router]: at=info method=GET path="/" host=price-estimate.herokuapp.com request_id=236b92af-1e75-4875-8459-2410cc5ef5dd fwd=“114.143.107.170” dyno=web.1 conn
ect=0ms service=2ms status=200 bytes=882 protocol=https
2019-07-08T05:09:19.123860+00:00 heroku[router]: at=info method=GET path="/prod" host=price-estimate.herokuapp.com request_id=3753efe2-2586-44fc-a5d3-b21bcdd6fa0f fwd=“114.143.107.170” dyno=web.1
connect=0ms service=2ms status=200 bytes=882 protocol=https
2019-07-08T05:09:19.538983+00:00 heroku[router]: at=info method=GET path="/_dash-component-suites/dash_core_components/highlight.pack.js?v=1.0.0&m=1560782792" host=price-estimate.herokuapp.com req
uest_id=d4000f4f-3756-4517-9379-08f19bcbdc63 fwd=“114.143.107.170” dyno=web.1 connect=1ms service=5ms status=200 bytes=33175 protocol=https
2019-07-08T05:09:19.540966+00:00 heroku[router]: at=info method=GET path="/dev" host=price-estimate.herokuapp.com request_id=8ee3ead4-9f64-4235-bacd-ddff1eb4aaef fwd=“114.143.107.170” dyno=web.1 c
onnect=2ms service=2ms status=200 bytes=882 protocol=https
2019-07-08T05:09:19.536839+00:00 app[web.1]: 10.13.240.178 - - [08/Jul/2019:05:09:19 +0000] “GET /_dash-component-suites/dash_core_components/highlight.pack.js?v=1.0.0&m=1560782792 HTTP/1.1” 200 3
2974 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0”
2019-07-08T05:09:19.540402+00:00 app[web.1]: 10.35.232.188 - - [08/Jul/2019:05:09:19 +0000] “GET /dev HTTP/1.1” 200 674 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64;
x64; rv:67.0) Gecko/20100101 Firefox/67.0”
2019-07-08T05:09:19.542196+00:00 app[web.1]: 10.109.197.170 - - [08/Jul/2019:05:09:19 +0000] “GET /_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.min.js?v=0
.6.3&m=1561667553 HTTP/1.1” 200 283634 “https://price-estimate.herokuapp.com/” “Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0”
2019-07-08T05:09:19.551548+00:00 heroku[router]: at=info method=GET path="/_dash-component-suites/dash_bootstrap_components/_components/dash_bootstrap_components.min.js?v=0.6.3&m=1561667553" host=
price-estimate.herokuapp.com request_id=ec2860cb-4c41-4312-940f-509659fe6b88 fwd=“114.143.107.170” dyno=web.1 connect=0ms service=10ms status=200 bytes=283836 protocol=https
2019-07-08T05:09:21.036116+00:00 app[web.1]: 10.109.197.170 - - [08/Jul/2019:05:09:21 +0000] “GET /assets/favicon.ico?m=1562562023.0 HTTP/1.1” 200 0 “-” “Mozilla/5.0 (Windows NT 6.1; Win64; x64; r
v:67.0) Gecko/20100101 Firefox/67.0”
2019-07-08T05:09:21.038820+00:00 heroku[router]: at=info method=GET path="/assets/favicon.ico?m=1562562023.0" host=price-estimate.herokuapp.com request_id=ebe734bc-fc59-42ad-9576-406985da358c fwd=
“114.143.107.170” dyno=web.1 connect=0ms service=4ms status=200 bytes=30937 protocol=https

@aidlml Did you find a solution to this?

I am currently facing the same issues.