chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

Why does the window that pops up locally after I specify the ip and port not display any content?

Open lunlu opened this issue 2 years ago • 8 comments
trafficstars

instruction: chainlit run visualization.py --host xxx.xxx.xx.xx --port 8765 -w

Why does the window that pops up locally after I specify the ip and port not display any content?

lunlu avatar Jun 06 '23 03:06 lunlu

Hello, I would need more info:

  • What OS are you running on?
  • Are you using a custom host locally?
  • Is there any error message in the terminal or in the browser console?

willydouhard avatar Jun 06 '23 07:06 willydouhard

this happens in my end. In my case, Try chainlit hello, blank page shows in my brower.

  • Run Chainlit in a local server and access from my local mac.
    1. Chainlit's default port is already used by another app, so I used CHAINLIT_PORT=8999 chainlit hello
    2. Even I stop another app which uses port 8000 and run chainlit hello, results are same.
    3. Reloading does not solve. Test with Chrome, Safari, and Edge, results are all same.
  • Run Chainlit in VSCode devcontainer + Docker with my local mac, chainlit hello works.

My local server: Ubuntu 22.04. Python-3.10.11 with pyenv-virtualenv.

kun432 avatar Jun 06 '23 10:06 kun432

OS: macOS

I use custom host locally

There is no error message in the terminal and the page.

when I adjust the parameter 'async_mode' : ''' socketio = SocketIO( app, cors_allowed_origins="*", async_mode="threading",#here, default = "gevent", max_http_buffer_size=1000000 * 100, ) ''' show as below: image

lunlu avatar Jun 06 '23 11:06 lunlu

OS: macOS

I use custom host locally

There is no error message in the terminal and the page.

when I adjust the parameter 'async_mode' : ''' socketio = SocketIO( app, cors_allowed_origins="*", async_mode="threading",#here, default = "gevent", max_http_buffer_size=1000000 * 100, ) ''' show as below: image

So changing the async mode fixes it? That's weird. Also what happens if you try with the default host (not passing --host)? Can you ping on me on discord? It will be easier to go through the problem if that works for you!

willydouhard avatar Jun 06 '23 16:06 willydouhard

Having the same issue here. Running on a linux server, no error message, just a blank page. Specifying the host and port did not help in any way.

sebderhy avatar Jun 08 '23 15:06 sebderhy

ระบบปฏิบัติการ: macOS

ฉันใช้โฮสต์ที่กำหนดเองในเครื่อง

ไม่มีข้อความแสดงข้อผิดพลาดในเทอร์มินัลและเพจ

เมื่อฉันปรับพารามิเตอร์ 'async_mode' : ''' socketio = SocketIO( app, cors_allowed_origins="*", async_mode="threading",#here, default = "gevent", max_http_buffer_size=1000000 * 100, ) ''' แสดง ดังต่อไปนี้: ภาพ

SurachaiJaisan avatar Jun 08 '23 16:06 SurachaiJaisan

ระบบปฏิบัติการ: macOS ฉันใช้โฮสต์ที่กำหนดเองในเครื่อง ไม่มีข้อความแสดงข้อผิดพลาดในเทอร์มินัลและเพจ เมื่อฉันปรับพารามิเตอร์ 'async_mode' : ''' socketio = SocketIO( app, cors_allowed_origins="*", async_mode="threading",#here, default = "gevent", max_http_buffer_size=1000000 * 100, ) ''' แสดง ดังต่อไปนี้: ภาพ

please use english

willydouhard avatar Jun 08 '23 17:06 willydouhard

Could you try to:

  1. install chainlit from the wheel provided in this PR https://github.com/Chainlit/chainlit/pull/40
  2. run chainlit hello

I would like to see if the rework fix those issues. Note that this version is not merged yet. The infos to install are at the end of the PR's description.

willydouhard avatar Jun 08 '23 17:06 willydouhard

Same issue here as well. Runs fine on my macbook, but once deployed on remote server (Ubuntu 20.04), nothing loads.

marcoszh avatar Jun 13 '23 02:06 marcoszh

@willydouhard I tried and still thave the same issue.

Is there any workaround to deploy an app with Chainlit today? I really liked Chainlit, but if we can't deploy apps, then that's definitely less useful :( ...

sebderhy avatar Jun 13 '23 07:06 sebderhy

Should be fixed in the latest version 0.3.0. Please note that it contains breaking changes. We prepared a migration guide to make it easy for everyone.

willydouhard avatar Jun 13 '23 16:06 willydouhard

I installed it, and chainlit hello is still not working...

sebderhy avatar Jun 14 '23 05:06 sebderhy

Okay, can you DM me on discord so we can debug this live? Will be much easier

willydouhard avatar Jun 14 '23 08:06 willydouhard

Thanks @sebderhy to I figured the issue. You cannot serve chainlit from a subpath like https://MY_DOMAIN.com/SUB_PATH. For now you have to serve it from the root of your domain or subdomain.

willydouhard avatar Jun 14 '23 15:06 willydouhard

Running on a linux server, no error message, just a blank page. Specifying the host and port did not help in any way. beacause auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.

ruidongtd avatar Jun 16 '23 01:06 ruidongtd

This should be fixed with the latest version of package (0.3.0). Run pip uninstall chainlit and then pip install chainlit to make sure you have the latest version installed.

willydouhard avatar Jun 16 '23 07:06 willydouhard

This should be fixed with the latest version of package (0.3.0). Run pip uninstall chainlit and then pip install chainlit to make sure you have the latest version installed.

cool !!!

ruidongtd avatar Jun 16 '23 08:06 ruidongtd

I still have the same issue. 0.5.0

duyongan avatar Jul 05 '23 06:07 duyongan

If you open the console in your blank browser page, does it have any error?

willydouhard avatar Jul 05 '23 07:07 willydouhard

Hello @willydouhard,

Thank you so much for your research in this space. This is so useful.

However we're facing this issue in the latest version as well.

We're using / to access the chainlit app that is hosted on EKS. We're getting the blank page when we open the application url and dynamic index.html is looking for the assets at the root level. Screenshot is attached below.

image

Is this issue fixed ? if not, can you please re-open the issue ?

srihari0606 avatar Jul 26 '23 09:07 srihari0606

I think this is another issue (we can open a fresh one). At the moment, Chainlit has to be served at the root level (as described here.

Until it gets fixed, one workaround is to serve it from a subdomain. For instance if you original url is https://mydomain.com/chainlit/app you could created a subdomain https://chainlit.mydomain.com that points to the original url.

willydouhard avatar Jul 26 '23 11:07 willydouhard