oTree Forum >

Live page WebSocket issues

#1 by clintmckenna

I'm experiencing an issue where WebSocket connections appear to establish successfully, but messages sent via liveSend() never reach the server's async live_method. This affects some participants randomly, causing them to get stuck. 
- Affects ~5% of participants intermittently
- Using oTree 6 on Heroku with standard Dyno.
- Page loads successfully (HTTP 200)
- WebSocket connects successfully (HTTP 101 in Heroku logs)
- JavaScript calls liveSend({ event: 'pageLoad' }) without throwing errors
- Server's live_method is never invoked (no logs appear, even with logging at the very first line)
- 20 person session with groups of 2
- I have added retry logic of 5 attempts with 2-second intervals, all fail silently
- Added initial delay (200ms) before first liveSend to let WebSocket fully establish
- Closing tab and reopening sometimes fixes it (fresh connection), especially if waiting a couple minutes

Would appreciate any advice if anyone has any insight in reducing this happening. Thanks!

#2 by Chris_oTree

Hi, thanks for reporting! These are really useful details. I'll investigate as soon as I can.

Write a reply

Set forum username