Getting error when deploying the django channels project in railway
only chat application not work other functionality working perfectly
frontend error: WebSocket encountered an error:
Chat socket closed unexpectedly: backend error: Not Found: /ws/chat/2f2ceffd-d524-4f68-881d-7170ea620c37/ all setup done perfectly but now stuck not getting the solution from anywhere
Chat socket closed unexpectedly: backend error: Not Found: /ws/chat/2f2ceffd-d524-4f68-881d-7170ea620c37/ all setup done perfectly but now stuck not getting the solution from anywhere
38 Replies
Project ID:
2f2ceffd-d524-4f68-881d-7170ea620c37
please do not create duplicate posts or cross post
sorry do you know solution of it
Solution
you need to use Daphne
yes already using
that id doesnt bring me to a project
wait I will send 9626ee7a-574c-4d61-a75c-2d65bf18c4a3
you arent
how to use it?
I have added it in my Procfile
release: python manage.py migrate
worker: daphne -b 0.0.0.0 -p $PORT charity_pro.asgi:application
you are using a Dockerfile, Procfiles are irrelevant
wait
-
check this
docker file
please enclose that in a code block
sorry
you can edit discord messages lol
brother please help its urgent
2 problems.
- you are overwriting that CMD line via the start command in the service settings.
- you are using exec form for that CMD line
not getting properly
other functionality working perfectly just problem in chat module
please fix the two issues i had just brought up
check now
send me your dockerfile
yes
Procfile
again, you are using a Dockerfile, the Procfile is totally irrelevant and unused
so remove the procfile?
and add CMD in dockerfile?
still 2 problems.
- you are missing a CMD line
- you are setting a start command in the service settings
now I am adding CMD in dockerfile and remove the procfile
okay?
so this is my dockerfile updated and removed procfile
still getting this error: Not Found: /ws/chat/2f2ceffd-d524-4f68-881d-7170ea620c37/
2 problems.
- you are overwriting that CMD line via the start command in the service settings.
- you are using exec form for that CMD line
brother can you guide me by filename
filename?
removed start command from railway
what about it? you havent done that yet
no
there are many errors comming related to daphne
after removing the start command from railway
send your dockerfile please
yes
changed made by chatgpt guide
now getting this error:
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
this would be an application level issue
can you help me with that?
solved brother
thank you so much
im glad you where able to solve, but please note we can't offer application level support
yaa no issue
amazing experience with railway