Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
6.67k stars 860 forks source link

No UI displayed after updating to 0.6.4 #348

Closed JCF-SES closed 1 year ago

JCF-SES commented 1 year ago

Hi everybody,

I was waiting for 0.6.4 update due to a previous fix to be released (Thank you all for your effort on this project).

After updating from 0.6.3 to 0.6.4, and deleting the previous .chainlit folder, I ran the following command and got:

PS C:\Users\xxx\assistant_poc> chainlit run app.py -d
2023-09-01 12:43:38 - Created default config file at C:\Users\xxx\assistant_poc.chainlit\config.toml 2023-09-01 12:43:38 - Loaded .env file INFO: Started server process [1836] INFO: Waiting for application startup. 2023-09-01 12:43:41 - Your app is available at http://localhost:8000 INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) INFO: 127.0.0.1:58486 - "GET / HTTP/1.1" 200 OK INFO: 127.0.0.1:58486 - "GET /index-8a4873d1.js HTTP/1.1" 404 Not Found INFO: 127.0.0.1:58487 - "GET /index-a6e13df6.css HTTP/1.1" 404 Not Found INFO: Shutting down INFO: Waiting for application shutdown.

This seems to run without issues, but when I go to the provided host, I only get a white page.

I tried this already in Chrome, Firefox and Edge, and all of them present the same behavior.

In case it's not clear, this works on 0.6.3 and if I downgrade, everything starts working again.

Additional information

aiofiles==23.2.1 aiohttp==3.8.5 aiosignal==1.3.1 anyio==3.7.1 asttokens==2.2.1 async-timeout==4.0.2 asyncer==0.0.2 attrs==23.1.0 auth0-python==4.4.1 azure-core==1.29.2 azure-identity==1.14.0 azure-storage-blob==12.17.0 backcall==0.2.0 backoff==2.2.1 bcrypt==4.0.1 bidict==0.22.1 certifi==2023.7.22 cffi==1.15.1 chainlit==0.6.4 chardet==5.2.0 charset-normalizer==3.2.0 chroma-hnswlib==0.7.2 chromadb==0.4.8 click==8.1.6 colorama==0.4.6 coloredlogs==15.0.1 cryptography==41.0.3 dataclasses-json==0.5.14 decorator==5.1.1 Deprecated==1.2.14 et-xmlfile==1.1.0 exceptiongroup==1.1.2 executing==1.2.0 fastapi==0.103.0 fastapi-socketio==0.0.10 filetype==1.2.0 flatbuffers==23.5.26 frozenlist==1.4.0 googleapis-common-protos==1.60.0 greenlet==2.0.2 grpcio==1.57.0 h11==0.14.0 httpcore==0.17.3 httptools==0.6.0 httpx==0.24.1 humanfriendly==10.0 idna==3.4 importlib-metadata==6.8.0 importlib-resources==6.0.1 ipython==8.14.0 isodate==0.6.1 jedi==0.19.0 Jinja2==3.1.2 joblib==1.3.1 langchain==0.0.271 langsmith==0.0.26 Lazify==0.4.0 lxml==4.9.3 Markdown==3.4.4 MarkupSafe==2.1.3 marshmallow==3.20.1 matplotlib-inline==0.1.6 monotonic==1.6 mpmath==1.3.0 msal==1.23.0 msal-extensions==1.0.0 msg-parser==1.2.0 multidict==6.0.4 mypy-extensions==1.0.0 nest-asyncio==1.5.7 nltk==3.8.1 nodeenv==1.8.0 numexpr==2.8.5 numpy==1.25.2 olefile==0.46 onnxruntime==1.15.1 openai==0.27.8 openapi-schema-pydantic==1.2.4 openpyxl==3.1.2 opentelemetry-api==1.19.0 opentelemetry-exporter-otlp==1.19.0 opentelemetry-exporter-otlp-proto-common==1.19.0 opentelemetry-exporter-otlp-proto-grpc==1.19.0 opentelemetry-exporter-otlp-proto-http==1.19.0 opentelemetry-instrumentation==0.40b0 opentelemetry-proto==1.19.0 opentelemetry-sdk==1.19.0 opentelemetry-semantic-conventions==0.40b0 overrides==7.4.0 packaging==23.1 pandas==2.0.3 parso==0.8.3 pdf2image==1.16.3 pdfminer.six==20221105 pickleshare==0.7.5 Pillow==10.0.0 polars==0.18.13 portalocker==2.7.0 posthog==3.0.1 prisma==0.10.0 prompt-toolkit==3.0.39 protobuf==4.23.4 pulsar-client==3.2.0 pure-eval==0.2.2 pyarrow==12.0.1 pycparser==2.21 pydantic==1.10.12 Pygments==2.16.1 PyJWT==2.8.0 pyOpenSSL==23.2.0 pypandoc==1.11 pypdf==3.15.0 PyPika==0.48.9 pyreadline3==3.4.1 python-dateutil==2.8.2 python-docx @ git+https://github.com/python-openxml/python-docx.git@36cac78de080d412e9e50d56c2784e33655cad59 python-dotenv==1.0.0 python-engineio==4.6.1 python-graphql-client==0.4.3 python-magic==0.4.27 python-pptx==0.6.21 python-socketio==5.8.0 pytz==2023.3 pywin32==306 PyYAML==6.0.1 regex==2023.6.3 requests==2.31.0 six==1.16.0 sniffio==1.3.0 SQLAlchemy==2.0.19 stack-data==0.6.2 starlette==0.27.0 sympy==1.12 syncer==2.0.3 tabulate==0.9.0 tenacity==8.2.2 tiktoken==0.4.0 tokenizers==0.13.3 tomli==2.0.1 tomlkit==0.12.1 tqdm==4.65.1 traitlets==5.9.0 typing-inspect==0.9.0 typing_extensions==4.7.1 tzdata==2023.3 unstructured==0.8.1 uptrace==1.19.0 urllib3==2.0.4 uvicorn==0.23.2 watchfiles==0.20.0 wcwidth==0.2.6 websockets==11.0.3 wrapt==1.15.0 xlrd==2.0.1 XlsxWriter==3.1.2 yarl==1.9.2 zipp==3.16.2

willydouhard commented 1 year ago

Can you check your browser's console and check if you see any error there?

JCF-SES commented 1 year ago

Thank you for your fast reply :).

The console is showing the following error:

Loading module from “http://localhost:8000/assets/index-8a4873d1.js” was blocked because of a disallowed MIME type (“application/json”).

I am not able to guess what is this related. If it is something from my side, I would really appreciate some guidance.

Thank you in advance.

willydouhard commented 1 year ago

Can you go in your chainlit installation, search for follow_symlink=True and set that value to False? Then try again to start your app.

Run pip show chainlit to find the chainlit installation path.

JCF-SES commented 1 year ago

Changed follow_symlink=False in ~chainlit/server.py and ran my application again. This time it worked as expected.

willydouhard commented 1 year ago

Good to know. Going to revert that change and make this parameter configurable.

JCF-SES commented 1 year ago

Thank you for the guidance. Just to confirm, will this be available for next version? Or do you advise something different?

willydouhard commented 1 year ago

A fix will be released in a few hours