chainlit
chainlit copied to clipboard
Blank page on every app
I've been trying to setup chainlit, but I always only get blank pages.
I tried chainlit hello as well as the example LLama Index integration with chainlit run app.py --host 0.0.0.0 --port 7860, and in both cases I end up with a full blank page.
Anything I should change ?
Are you using WSL?
Thanks for your answer! No, but I'm using a server that I know is probably encountering the same kind of issues.
To give an example, I previously tried to run text-gen-webui, and the definition of the root path was key to make js and css work.
I think I'm facing a similar issue here, because according to the network tab, I get 404 on js files.
can you try to add -h to your run command? You might be encountering a problem where chainlit tries to open a browser where your server might don't have one.
I tried, unfortunately it didn't change much. If I open the page in my browser, I get the exact same blank page. Also, I don't get any Python error in any case.
When I hit refresh this is what I get in the network tab (I run the app on port 7860):
Can you ping on discord so we can have a short call? Will be easier to debug with screen sharing.
As we are trying to use it on Domino Datalabs, and since it's a work laptop, I unfortunately can not screenshare 😅
From our investigation, this comes back to this issue https://github.com/Chainlit/chainlit/issues/275
So rather this one https://github.com/Chainlit/chainlit/issues/521
Encountered similar issue - tried run the app at root directory but still displayed empty screen.
Can you provide more details @AllenJShi ?
Absolutely - so the major issue was due to reverse proxy, which all my requests should have been directed to https://xxx/chainlit_app_base_url/. However, only the initial request was routed correctly and the subsequent requests were submitted to https://xxx/n without the base url. I tried the subdir approach and CHAINLIT_URL env var suggested in other threads but it did not work. Would there be a more detailed solution or guidance for this particular issue?
Just saw a similar post at
Hi. This type of issue also occurs when I'm looking to use chainlit within Sagemaker Studio and using's it's Jupyter URL proxy to redirect traffic to the port.
e.g. an initial request can be sent to https://.studio.ap-southeast-2.sagemaker.aws/jupyter/default/proxy/8505 URL where the base URL is Sagemaker and the proxy.
External dependencies (some CSS and the like) will be rendered, but the subsequent calls to then return 404 errors.
Would it be possible to set something so that Chainlit allows requests to be sent to '/jupyter/default/proxy/8505' or similar so that the requests can be served as needed.
So CHAINLIT_URL is mainly for OAuth redirections. We have no solutions for the subdir approach atm. Easiest way is to setup a subdomain and serve from the root of this subdomain.
Thanks @willydouhard for the clarification! Could we expect to see this as a new feature in the near future though?
Not in the immediate future but yes, down the road for sure
I'm running into the same issue, since I'm deploying it behind an Application Load Balancer on AWS with multiple prefixes for multiple applications. One approach I've implemented for a different FastAPI app is to add middleware that removes the prefix from the path, however I didn't seem to manage to do that here. Are there any tips for that?
This was happening to me and I discovered something was already running on port 8000. I assumed it would error out on that condition.
