Closed opendeluxe closed 6 months ago
It looks like the issue you're encountering with the 403 Forbidden responses is related to server-side authentication or configuration problems. Here's a more focused approach to troubleshoot and potentially resolve the issue:
Server-Side Authentication Logic: Verify that your backend correctly handles authentication for local requests. This includes checking CORS settings and other security configurations that might block local requests.
API Endpoint Accessibility: Ensure that any external APIs or backend services your login functionality depends on are accessible from your local setup. This might involve checking API keys or domain restrictions.
Local Environment Configuration: Double-check your local environment configuration, including environment variables and any necessary settings to ensure they match what's required for successful communication with backend services.
Debug Network Requests: Use browser developer tools to inspect the failed network requests. Pay close attention to request headers and payloads to identify potential misconfigurations.
Frontend Configuration: Review your frontend code for any environment-specific settings that might affect the login process. Ensure that API endpoints and authentication configurations are correctly set for local development.
Backend or API Documentation: If using third-party APIs or backend services, consult their documentation for guidance on setting up for local development, including any development-specific keys or settings.
Middleware or Proxy Configuration: If your setup involves middleware or proxies, ensure they are correctly configured to allow requests to pass through to your application without being blocked.
For a more targeted investigation, review the server-side logic for endpoints returning 403 responses, ensure your .env
file matches the required configurations as outlined in .env.example
, and check for any potential misconfigurations in middleware or proxies that could lead to these responses.
If these steps do not resolve the issue, providing more details about your setup and any additional error messages could help in offering further assistance.
To continue the conversation, mention @dosu.
Having the same issue after pulling the newest version of main branch. It was working previously with a version from ~2 weeks ago.
I have exactly same issue
Same issue here. Came back to test after it not working last time and now this 😂
add /user]
to the end of the URL makes the site attempt loading but goes wild lol
I think the README needs some further adjustments after recent changes
What is the last workable version?
Having the same issue after pulling the newest version of main branch. It was working previously with a version from ~2 weeks ago.
Hi, what is the last workable version, thank you.
I saw some update made a few hours ago and execute git pull and supabase migration up and get the following error.
Connecting to local database... runtime error: slice bounds out of range [1:0] Try rerunning the command with --debug to troubleshoot the error.
The issue is still there.
@StanGirard any ideas?
Add NEXT_PUBLIC_AUTH_MODES=password
to your env file :D
@StanGirard It doesn't help, unfortunately (
Connecting to local database...
runtime error: slice bounds out of range [1:0]
Try rerunning the command with --debug to troubleshoot the error.
This could be a supabase issue that we fixed recently. You can try npx supabase@beta migration up
instead.
Sorry about that, forgot to add the variable to the docker compose too.
Please git pull and docker compose up --build
@sweatybridge you could try a supabase db reset
too :)
@StanGirard Now it works! But I have another error while creating first brain:
backend-core | USER_IDENTITY {'user_id': '39418e3b-0258-4452-af60-7acfcc1263ff', 'openai_api_key': None, 'company': '', 'onboarded': True, 'username': 'www', 'company_size': None, 'usage_purpose': ''}
backend-core | INFO: 172.21.0.1:33786 - "PUT /user/identity HTTP/1.1" 200 OK
backend-core | INFO: 172.21.0.1:33786 - "OPTIONS /brains/ HTTP/1.1" 200 OK
backend-core | INFO: 172.21.0.1:33786 - "POST /brains/ HTTP/1.1" 500 Internal Server Error
backend-core | ERROR: Exception in ASGI application
backend-core | Traceback (most recent call last):
backend-core | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 411, in run_asgi
backend-core | result = await app( # type: ignore[func-returns-value]
backend-core | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-core | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
backend-core | return await self.app(scope, receive, send)
backend-core | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-core | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
backend-core | await super().__call__(scope, receive, send)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
backend-core | await self.middleware_stack(scope, receive, send)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
backend-core | raise exc
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
backend-core | await self.app(scope, receive, _send)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in __call__
backend-core | await self.simple_response(scope, receive, send, request_headers=headers)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 148, in simple_response
backend-core | await self.app(scope, receive, send)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
backend-core | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
backend-core | raise exc
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
backend-core | await app(scope, receive, sender)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
backend-core | await self.middleware_stack(scope, receive, send)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
backend-core | await route.handle(scope, receive, send)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
backend-core | await self.app(scope, receive, send)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
backend-core | await wrap_app_handling_exceptions(app, request)(scope, receive, send)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
backend-core | raise exc
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
backend-core | await app(scope, receive, sender)
backend-core | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
backend-core | response = await func(request)
backend-core | ^^^^^^^^^^^^^^^^^^^
backend-core | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
backend-core | raw_response = await run_endpoint_function(
backend-core | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-core | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
backend-core | return await dependant.call(**values)
backend-core | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-core | File "/code/modules/brain/controller/brain_routes.py", line 103, in create_new_brain
backend-core | new_brain = brain_service.create_brain(
backend-core | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-core | File "/code/modules/brain/service/brain_service.py", line 142, in create_brain
backend-core | return self.create_brain_integration(user_id, brain)
backend-core | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-core | File "/code/modules/brain/service/brain_service.py", line 192, in create_brain_integration
backend-core | created_brain = self.brain_repository.create_brain(brain)
backend-core | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-core | File "/code/modules/brain/repository/brains.py", line 24, in create_brain
backend-core | brain_meaning = embeddings.embed_query(string_to_embed)
backend-core | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-core | File "/usr/local/lib/python3.11/site-packages/langchain_openai/embeddings/base.py", line 530, in embed_query
backend-core | return self.embed_documents([text])[0]
backend-core | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-core | File "/usr/local/lib/python3.11/site-packages/langchain_openai/embeddings/base.py", line 489, in embed_documents
backend-core | return self._get_len_safe_embeddings(texts, engine=engine)
backend-core | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-core | File "/usr/local/lib/python3.11/site-packages/langchain_openai/embeddings/base.py", line 347, in _get_len_safe_embeddings
backend-core | response = self.client.create(
backend-core | ^^^^^^^^^^^^^^^^^^^
backend-core | File "/usr/local/lib/python3.11/site-packages/openai/resources/embeddings.py", line 114, in create
backend-core | return self._post(
backend-core | ^^^^^^^^^^^
backend-core | File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1240, in post
backend-core | return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
backend-core | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
backend-core | File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 921, in request
backend-core | return self._request(
backend-core | ^^^^^^^^^^^^^^
backend-core | File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1020, in _request
backend-core | raise self._make_status_error_from_response(err.response) from None
backend-core | openai.PermissionDeniedError: Error code: 403 - {'error': {'code': 'unsupported_country_region_territory', 'message': 'Country, region, or territory not supported', 'param': None, 'type': 'request_forbidden'}}
backend-core | INFO: 127.0.0.1:53244 - "GET /healthz HTTP/1.1" 200 OK
Fixed previous error wth VPN, thanks
What happened?
I setup the full stack locally on my macbook as described in the README. All docker containers are running well without any issues. However, when opening
http://localhost:3000/login
in a webbrowser, it only shows the logo and the text "Talk to Quivr Unpaid users have access to a free and limited demo of Quivr"According to the log, it seems to call some /user endpoints which respond with 403. I would expect that the login-form would be rendered instead first.
Relevant log output
Twitter / LinkedIn details
No response