Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Websocket Connection failure to Collection #97

Open
professorDante opened this issue Jul 16, 2023 · 2 comments
Open

Websocket Connection failure to Collection #97

professorDante opened this issue Jul 16, 2023 · 2 comments

Comments

@professorDante
Copy link

Cannot open a WS connection to a newly uploaded Collection. On the frontend you see this:

Screen Shot 2023-07-16 at 2 33 57 PM

On the ASGI/WSGI dev server you see this:

Screen Shot 2023-07-16 at 2 36 03 PM

It looks like the API key being used by the WS frontend isn't available in the backend? Searching the docs gives no indication on what to do to set up an API key, aside from the OpenAI one.

@marauder37
Copy link

The situation is a bit messy... first, know that the APIkey "errors" you get on the back are just logspam, they don't indicate the problem. If you want to find where the problem really is, start removing try/catch blocks until the request actually crashes out with a 500 code and a traceback.

Second, there are two token auth systems in use, both only partly implemented. What you have in the log is a JWT token. What the APIKey model expects is a "normal" opaque bearer token. JWT controls access to most of the JSON API, whereas the APIKey controls access to... nothing. If you have or suspect auth problems, rip out the APIKey stuff starting from the part of the code producing all those warnings.

In my private version I've fixed APIKey and fully implemented JWT. If this repo becomes active again maybe the author would be interested in PRs for this stuff.

@professorDante
Copy link
Author

It's frustrating because I like the concepts they've used in this repo - WS to improve index load speed etc etc. I'd like to get this working and look to build from it. But it seems quite buggy and kind of half complete. Allowing the PRs to be in the master branch would help a ton. I fixed a bunch of issues pulling in your PR #85.

Where do I start to fix the JWT issue? Is there an endpoint?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants