chainlit
chainlit copied to clipboard
Thread does not display: `Accessing 'participantIdentifier' is not allowed.`
trafficstars
Describe the bug Clicking thread history fails to show thread. Skeleton shows briefly before going to blank screen. To Reproduce Install Chainlit 1.0.505 start server and click any thread in history.
Expected behavior Thread should display
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Downgrading to 1.0.505 or upgrading to the current RC resolves the issue.
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
await self.middleware_stack(scope, receive, send)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
raise exc
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
await self.app(scope, receive, send)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
await self.middleware_stack(scope, receive, send)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
await route.handle(scope, receive, send)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/chainlit/server.py", line 654, in get_thread
await is_thread_author(current_user.identifier, thread_id)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/chainlit/data/acl.py", line 10, in is_thread_author
thread_author = await data_layer.get_thread_author(thread_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/chainlit/data/__init__.py", line 389, in get_thread_author
thread = await self.get_thread(thread_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/chainlit/data/__init__.py", line 451, in get_thread
thread = await self.client.api.get_thread(id=thread_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/literalai/api/__init__.py", line 1563, in get_thread
return await self.gql_helper(*get_thread_helper(id))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/literalai/api/__init__.py", line 1397, in gql_helper
response = await self.make_gql_call(description, query, variables)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/literalai/api/__init__.py", line 1333, in make_gql_call
raise_error(response.text)
File "/Users/bcm/Library/Caches/pypoetry/virtualenvs/chainlit-template-xtqWlH9c-py3.11/lib/python3.11/site-packages/literalai/api/__init__.py", line 1320, in raise_error
raise Exception(error)
Exception: {"errors":[{"message":"Accessing 'participantIdentifier' is not allowed.","locations":[{"line":23,"column":9}],"path":["threadDetail","steps",0,"participantIdentifier"],"extensions":{"code":"INVALID_SCHEMA"}},{"message":"Accessing 'participantIdentifier' is not allowed.","locations":[{"line":23,"column":9}],"path":["threadDetail","steps",1,"participantIdentifier"],"extensions":{"code":"INVALID_SCHEMA"}},{"message":"Accessing 'participantIdentifier' is not allowed.","locations":[{"line":23,"column":9}],"path":["threadDetail","steps",2,"participantIdentifier"],"extensions":{"code":"INVALID_SCHEMA"}},{"message":"Accessing 'participantIdentifier' is not allowed.","locations":[{"line":23,"column":9}],"path":["threadDetail","steps",3,"participantIdentifier"],"extensions":{"code":"INVALID_SCHEMA"}}],"data":{"threadDetail":{"id":"71f30b28-850c-4c33-829f-3ee67b7b47d0",
...entire thread history follows.