I noticed that in our
@daml/react based app, the websockets that get opened by the
useStreamQuery hook will typically close with error code
1006 after several minutes (both on Chrome/Firefox). This will happen even without triggering any changes or re-renders to the React components, and just letting the app sit open idly. We’re using SDK version 1.5.0 for DAML and the JS libraries, and I’m seeing this behavior when the frontend is deployed on DABL.
In a local sandbox environment, I noticed that after a few minutes the websocket will close with the console error
WebSocket connection to 'ws://localhost:3000/v1/stream/query' failed: One or more reserved bits are on: reserved1 = 1, reserved2 = 0, reserved3 = 0
I’m not sure if this is related to the error seen when deployed, but thought it worth mentioning. Any ideas for what’s going on?