freenet-core icon indicating copy to clipboard operation
freenet-core copied to clipboard

River WebSocket hardcoded to port 50509 instead of using serving port

Open sanity opened this issue 5 months ago • 0 comments

Summary

The River app WebSocket connection is hardcoded to connect to port 50509, but it should dynamically connect to whatever port the HTTP page was served from.

Current Behavior

  • River app served on any port (e.g., 55509)
  • WebSocket tries to connect to hardcoded port 50509
  • Connection fails if Freenet is not running on port 50509

Expected Behavior

  • WebSocket should connect to the same port that served the HTTP page
  • Use window.location.port or similar to dynamically determine the correct port

Test Case

  1. Start Freenet on non-default port: freenet network --port 55509
  2. Navigate to River app: http://127.0.0.1:55509/v1/contract/web/BcfxyjCH4snaknrBoCiqhYc9UFvmiJvhsp5d4L5DuvRa/
  3. Observe WebSocket connection error trying to connect to port 50509

🤖 Generated with Claude Code

sanity avatar Jun 17 '25 20:06 sanity