Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/__reactor__ URL not found when no ASGI (dev) server is installed. Needs doc++ #50

Open
nerdoc opened this issue Jun 28, 2023 · 1 comment

Comments

@nerdoc
Copy link
Contributor

nerdoc commented Jun 28, 2023

Hi Eddy, I have not used reactor for a long time now (approx. v2 before), and much seems to have changed.

However; I can't setup a test project from your README.md - I use redis with proper RedisChannelLayer, redis is runing, but I always get the error message in the Django logs:

[28/Jun/2023 21:49:33] "GET /__reactor__ HTTP/1.1" 404 2222
Not Found: /__reactor__

And the browser dev console says:

Firefox can’t establish a connection to the server at ws://127.0.0.1:8000/__reactor__.

So this seems weird, as __reactor__ seems to be loaded as websocket pattern.

redis works, ASGI works.
websocket_urlpatterns of reactor.urls is properly added to the ProtocolTypeRouter in asgi.py.

Any hints? Do I have a misconfiguration? Or are there some hints missing in the README.md?

@nerdoc nerdoc changed the title __reactor__ not found /__reactor__ URL not found Jun 28, 2023
@nerdoc
Copy link
Contributor Author

nerdoc commented Jul 1, 2023

Oh, as nearly always, found a solution in Layer 8.
the asgi.py file is completely ignored if you use Django's builtin development server.

You have to install e.g. Daphne and place it into INSTALLED_APPS, then everything works as expected.

While this was my own fault, people who are not that fluent with ASGI should be given a hint in the README, that you need to use a server like daphne or uvicorn etc. to even develop a project using reactor.

Could you add that in the README? Maybe we'll keep this bug open until that?
If you want I can try a PR too.

@nerdoc nerdoc changed the title /__reactor__ URL not found /__reactor__ URL not found when no ASGI (dev) server is installed. Needs doc++ Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant