Skip to content

fix(server): Await web socket room entry#794

Merged
arhowe00 merged 2 commits into
Kitware:mainfrom
arhowe00:fix-backend
Oct 6, 2025
Merged

fix(server): Await web socket room entry#794
arhowe00 merged 2 commits into
Kitware:mainfrom
arhowe00:fix-backend

Conversation

@arhowe00
Copy link
Copy Markdown
Collaborator

@arhowe00 arhowe00 commented Oct 1, 2025

Some of the io-bound functions in the rpc server are async and must be awaited.

Before:

  1. Enable the server by adding the path to VITE_REMOTE_SERVER_URL to .env
  2. Go to "REMOTE" module
  3. Choose numbers (e.g. "3" and "5") to add and click "=>"
  4. The backend never returns the result with the following message:
/Users/andrew.howe/projects/vvi/2025-nvidiagtcdc-vvi/server % poetry run python -m volview_server -P 4014 ./examples/example_api.py
The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead.
======== Running on http://localhost:4014 ========
(Press CTRL+C to quit)
coroutine 'AsyncServer.enter_room' was never awaited

After:

  1. Apply patch
  2. Repeat steps 1-3 from above
  3. The addition above returns "8" within the app, with no log messages in backend

Note:

The deps for the python server might need to be upgraded but that's more trivial so I didn't push the changes I made to pyproject.toml as I wasn't sure if they were the right choices.

@netlify
Copy link
Copy Markdown

netlify Bot commented Oct 1, 2025

Deploy Preview for volview-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8452749
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/68df1fbbbaef17000812aa7b
😎 Deploy Preview https://deploy-preview-794--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@PaulHax
Copy link
Copy Markdown
Collaborator

PaulHax commented Oct 1, 2025

If you want to include the Python server deps changes you know works, that would be great.

@PaulHax PaulHax self-requested a review October 1, 2025 13:14
arhowe00 and others added 2 commits October 2, 2025 20:57
Could not install dependencies on `Darwin user 24.5.0 Darwin Kernel
Version 24.5.0: Tue Apr 22 19:53:27 PDT 2025;
root:xnu-11417.121.6~2/RELEASE_ARM64_T6041 arm64` due to numpy build
failure. Version bump has fixed the problem.

```
$ poetry install
The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead.
Updating dependencies
Resolving dependencies... (3.7s)

Package operations: 46 installs, 0 updates, 0 removals

  - Installing numpy (1.24.4): Failed

PEP517 build of a dependency failed

Backend 'setuptools.build_meta:__legacy__' is not available.

Note: This error originates from the build backend, and is likely not a problem with poetry but one of the following issues with numpy (1.24.4)

  - not supporting PEP 517 builds
  - not specifying PEP 517 build requirements correctly
  - the build requirements are incompatible with your operating system or Python version
  - the build requirements are missing system dependencies (eg: compilers, libraries, headers).

You can verify this by running pip wheel --no-cache-dir --use-pep517 "numpy (==1.24.4)".
```
Some of the io-bound functions in the rpc server are async and must be
awaited.

Co-authored-by: Forrest Li <forrest.li@kitware.com>
@arhowe00
Copy link
Copy Markdown
Collaborator Author

arhowe00 commented Oct 3, 2025

If you want to include the Python server deps changes you know works, that would be great.

I was able to resolve this with a minimal numpy upgrade to latest, let me know if things work with that.

@PaulHax
Copy link
Copy Markdown
Collaborator

PaulHax commented Oct 3, 2025

+1 Python floor at 3.11 is key =)

Works for me tho "randon number triva" button fails probably because numbersapi.com is dead.

I gave you permission to merge if you think this is ready

@arhowe00 arhowe00 added this pull request to the merge queue Oct 6, 2025
Merged via the queue into Kitware:main with commit 052c8ba Oct 6, 2025
6 of 7 checks passed
@arhowe00 arhowe00 changed the title fix(server): Await web socket room entry (must be async) fix(server): Await web socket room entry Nov 11, 2025
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

Successfully merging this pull request may close these issues.

2 participants