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

WS/ASGI “no route found for path” #221

Open
secsonthebeach opened this issue Oct 9, 2024 · 5 comments
Open

WS/ASGI “no route found for path” #221

secsonthebeach opened this issue Oct 9, 2024 · 5 comments
Labels
bug Something isn't working EMBArk

Comments

@secsonthebeach
Copy link

Hello,

The websocket connection seems to be broken. I keep seeing the error mentioned above.

I notice that embark/embark/routing.py mentions being the equivalent of urls.py but it is not the same.

embark/embark/urls.py shows the inclusion of embark/reporter/urls.py which then contains the variable EMBA_LOG_URL containing the proper file location. Is this missing from ASGI?

I cannot otherwise seem to find where the file location is being passed to Daphne when executing run-server.sh.

Please let me know what you think.

@BenediktMKuehne
Copy link
Member

Sorry I only saw this now.

I recognize this from some issues with the contents of the log-directory
If you find some content you can not access while clicking through the html report, you could mark the request here and I'll try and adjust the routing

@BenediktMKuehne BenediktMKuehne added bug Something isn't working EMBArk labels Oct 21, 2024
@secsonthebeach
Copy link
Author

secsonthebeach commented Oct 22, 2024

I have not had trouble viewing the HTML report by going to the “Reports” and selecting it from the drop down menu. Similarly, I can view the “raw log”.

The problem I am seeing is with the websockets (I think). I can’t be sure, because this is all my first time with Embark, but I think the expected behavior is a live stream of /ws/progress from the “Progress” UI tab, or a live stream of the logging data /ws/logs/<id> from the “Reports -> View Log” UI.

In my case, every call to a websocket returns an error message of “No route found for path”.

I think my initial question may have misguided, but I do think the issue lies within Daphne and the application passed to it, and the ASGI stuff.

Also, I removed and reinstalled yesterday, just to ensure that I hadn’t made some change that introduced the error.

Below is the error output observed from run-server.sh when a websocket connection is attempted:

2024-10-22 15:36:56,106 ERROR Exception inside application: No route found for path '/ws/progress/'.
Traceback (most recent call last):
  File "/var/www/.venv/lib/python3.10/site-packages/channels/routing.py", line 62, in __call__
    return await application(scope, receive, send)
  File "/var/www/.venv/lib/python3.10/site-packages/channels/sessions.py", line 47, in __call__
    return await self.inner(dict(scope, cookies=cookies), receive, send)
  File "/var/www/.venv/lib/python3.10/site-packages/channels/sessions.py", line 263, in __call__
    return await self.inner(wrapper.scope, receive, wrapper.send)
  File "/var/www/.venv/lib/python3.10/site-packages/channels/auth.py", line 185, in __call__
    return await super().__call__(scope, receive, send)
  File "/var/www/.venv/lib/python3.10/site-packages/channels/middleware.py", line 24, in __call__
    return await self.inner(scope, receive, send)
  File "/var/www/.venv/lib/python3.10/site-packages/channels/routing.py", line 116, in __call__
    raise ValueError("No route found for path %r." % path)
ValueError: No route found for path '/ws/progress/'.
2024-10-22 15:37:56,182 ERROR Exception inside application: No route found for path '/ws/logs/63d76550-96e4-4f77-83e0-6c3e4c352dba'.
Traceback (most recent call last):
  File "/var/www/.venv/lib/python3.10/site-packages/channels/routing.py", line 62, in __call__
    return await application(scope, receive, send)
  File "/var/www/.venv/lib/python3.10/site-packages/channels/sessions.py", line 47, in __call__
    return await self.inner(dict(scope, cookies=cookies), receive, send)
  File "/var/www/.venv/lib/python3.10/site-packages/channels/sessions.py", line 263, in __call__
    return await self.inner(wrapper.scope, receive, wrapper.send)
  File "/var/www/.venv/lib/python3.10/site-packages/channels/auth.py", line 185, in __call__
    return await super().__call__(scope, receive, send)
  File "/var/www/.venv/lib/python3.10/site-packages/channels/middleware.py", line 24, in __call__
    return await self.inner(scope, receive, send)
  File "/var/www/.venv/lib/python3.10/site-packages/channels/routing.py", line 116, in __call__
    raise ValueError("No route found for path %r." % path)
ValueError: No route found for path '/ws/logs/63d76550-96e4-4f77-83e0-6c3e4c352dba'.

@BenediktMKuehne
Copy link
Member

So far I haven't been able to reproduce the issue on my machines.

Can you give me more info?
installation log / server logs

@secsonthebeach
Copy link
Author

Hello. ‘Unable to reproduce’ makes me hopeful that it’s just something on my end. I have a network proxy to contend with too.
Below are a couple of screenshots from relevant logs that I could find. I could not find an installation log. Do I need to run the installer again and tee it to a file?

  • This one is from /var/www/logs/daphne.log
    var-www-logs-daphne-log

  • This one is from /var/www/embark/embark.log
    var-www-embark-embark-log

@secsonthebeach
Copy link
Author

Hello, I decided to uninstall and then reinstall. Everything seems to run smoothly, but I still encounter errors for the websockets. I exported the output for the install and run_server to rich text, but had to convert to pdf to upload. Please let me know what you think.

embark-run-server-log.pdf
embark-install-log.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working EMBArk
Projects
None yet
Development

No branches or pull requests

2 participants