raimohanska / ourboard

An online whiteboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.

jcubic opened this issue · comments

It seems that this project doesn't work at all for me.

Browser Chrome, Fedora GNU/Linux.

board

Not even a single board works, I was testing the default one here.

Maybe it's a hacker news effect.

There's indeed something wrong with the "default" board. Will see into that.

If you create a new board from the front page, it should work fine.

I reseted the default shared board.

Took database backup b013 before reset.

From the logs:

Oct 17 13:44:53 r-board app/web.1 Loading board default into memory
Oct 17 13:44:53 r-board app/web.1 Serial skip 4553 -> 4610
Oct 17 13:44:53 r-board app/web.1 Moving unknown item 26d10c97-1cc5-4ccb-aa0a-07fc69248c78
Oct 17 13:44:53 r-board app/web.1 /app/common/src/domain.ts:476
Oct 17 13:44:53 r-board app/web.1 if (!item) throw Error("Item not found: " + id)
Oct 17 13:44:53 r-board app/web.1 ^
Oct 17 13:44:53 r-board app/web.1 Error: Item not found: 26d10c97-1cc5-4ccb-aa0a-07fc69248c78
Oct 17 13:44:53 r-board app/web.1 at null. (/app/common/src/domain.ts:476:22)
Oct 17 13:44:53 r-board app/web.1 at null. (/app/common/src/board-reducer.ts:160:52)
Oct 17 13:44:53 r-board app/web.1 at Array.map ()
Oct 17 13:44:53 r-board app/web.1 at Object.boardReducer (/app/common/src/board-reducer.ts:159:40)
Oct 17 13:44:53 r-board app/web.1 at null. (/app/backend/src/board-store.ts:45:48)
Oct 17 13:44:53 r-board app/web.1 at Array.reduce ()
Oct 17 13:44:53 r-board app/web.1 at null.updateBoardWithEventChunk (/app/backend/src/board-store.ts:45:31)
Oct 17 13:44:53 r-board app/web.1 at null. (/app/backend/src/board-store.ts:190:17)
Oct 17 13:44:53 r-board app/web.1 at QueryStream. (/app/backend/src/board-store.ts:147:17)
Oct 17 13:44:53 r-board app/web.1 at QueryStream.emit (node:events:369:20)
Oct 17 13:44:53 r-board app/web.1 Item not found: 26d10c97-1cc5-4ccb-aa0a-07fc69248c78
Oct 17 13:44:53 r-board app/web.1 Error fetching board history for snapshot update for board default. Rebooting snapshot...
Oct 17 13:44:53 r-board app/web.1 Serial skip 4553 -> 4610
Oct 17 13:44:53 r-board app/web.1 Moving unknown item 4a425b8b-f3ca-4868-b69e-f392d5236c7f
Oct 17 13:44:53 r-board app/web.1 /app/common/src/domain.ts:476
Oct 17 13:44:53 r-board app/web.1 if (!item) throw Error("Item not found: " + id)
Oct 17 13:44:53 r-board app/web.1 ^
Oct 17 13:44:53 r-board app/web.1 Error: Item not found: 4a425b8b-f3ca-4868-b69e-f392d5236c7f
Oct 17 13:44:53 r-board app/web.1 at null. (/app/common/src/domain.ts:476:22)
Oct 17 13:44:53 r-board app/web.1 at null. (/app/common/src/board-reducer.ts:160:52)
Oct 17 13:44:53 r-board app/web.1 at Array.map ()
Oct 17 13:44:53 r-board app/web.1 at Object.boardReducer (/app/common/src/board-reducer.ts:159:40)
Oct 17 13:44:53 r-board app/web.1 at null. (/app/backend/src/board-store.ts:45:48)
Oct 17 13:44:53 r-board app/web.1 at Array.reduce ()
Oct 17 13:44:53 r-board app/web.1 at null.updateBoardWithEventChunk (/app/backend/src/board-store.ts:45:31)
Oct 17 13:44:53 r-board app/web.1 at QueryStream. (/app/backend/src/board-store.ts:147:17)
Oct 17 13:44:53 r-board app/web.1 at QueryStream.emit (node:events:369:20)
Oct 17 13:44:53 r-board app/web.1 at QueryStream.emit (node:domain:470:12)
Oct 17 13:44:53 r-board app/web.1 Board load failed for board default. Running compact/fix.
Oct 17 13:44:54 r-board app/web.1 History discontinuity: 0 -> 4610 for board default
Oct 17 13:44:54 r-board app/web.1 Aborting compaction of board default due to inconsistent history
Oct 17 13:44:54 r-board app/web.1 Found snapshot at serial 4553
Oct 17 13:44:54 r-board app/web.1 Cannot find a consecutive event for snapshot. First event is 4610
Oct 17 13:44:54 r-board app/web.1 Error while handling event from client. Closing connection. /app/common/src/domain.ts:476
Oct 17 13:44:54 r-board app/web.1 if (!item) throw Error("Item not found: " + id)
Oct 17 13:44:54 r-board app/web.1 ^
Oct 17 13:44:54 r-board app/web.1 Error: Item not found: 4a425b8b-f3ca-4868-b69e-f392d5236c7f
Oct 17 13:44:54 r-board app/web.1 at null. (/app/common/src/domain.ts:476:22)
Oct 17 13:44:54 r-board app/web.1 at null. (/app/common/src/board-reducer.ts:160:52)
Oct 17 13:44:54 r-board app/web.1 at Array.map ()
Oct 17 13:44:54 r-board app/web.1 at Object.boardReducer (/app/common/src/board-reducer.ts:159:40)
Oct 17 13:44:54 r-board app/web.1 at null. (/app/backend/src/board-store.ts:45:48)
Oct 17 13:44:54 r-board app/web.1 at Array.reduce ()
Oct 17 13:44:54 r-board app/web.1 at null.updateBoardWithEventChunk (/app/backend/src/board-store.ts:45:31)
Oct 17 13:44:54 r-board app/web.1 at QueryStream. (/app/backend/src/board-store.ts:147:17)
Oct 17 13:44:54 r-board app/web.1 at QueryStream.emit (node:events:369:20)
Oct 17 13:44:54 r-board app/web.1 at QueryStream.emit (node:domain:470:12)

Because of the limited log retention we have on Heroku, I cannot get to see the logs for the time when things started to go wrong. Based on the aftermath pictured in the log it seems that some events are missing from the database.

Hmm, here might be a related log snippet...

Purging board default from memory
Oct 17 02:41:29 r-board app/web.1 Compacting 50 bundles into one for board default
Oct 17 02:41:29 r-board app/web.1 Loading board default into memory
Oct 17 02:41:29 r-board app/web.1 Loaded board default at serial 4666 from snapshot at serial 4553 and 113 events after snapshot
Oct 17 02:41:29 r-board app/web.1 Board loaded into memory: default
Oct 17 02:41:29 r-board app/web.1 Loading board history for board default session at serial 4666
Oct 17 02:41:29 r-board app/web.1 Got board history for board default session at serial 4666
Oct 17 02:41:29 r-board app/web.1 Compacting 14 bundles into one for board default
Oct 17 02:41:31 r-board app/web.1 Saving board default
Oct 17 02:41:32 r-board app/web.1 Saving board default
Oct 17 02:41:32 r-board app/web.1 Statistics: active boards 3, sessions 4
Oct 17 02:41:33 r-board app/web.1 Saving board default
Oct 17 02:41:35 r-board app/web.1 Saving board default
Oct 17 02:41:36 r-board app/web.1 Saving board default
Oct 17 02:41:37 r-board app/web.1 Ramesh Raj logged in
Oct 17 02:41:38 r-board app/web.1 Saving board default
Oct 17 02:41:40 r-board app/web.1 Saving board default
Oct 17 02:41:41 r-board app/web.1 Saving board default
Oct 17 02:41:41 r-board app/api Deploy 5b58580 by user juha.paananen@reaktor.com
Oct 17 02:41:41 r-board app/api Release v661 created by user juha.paananen@reaktor.com
Oct 17 02:41:42 r-board heroku/web.1 Restarting

Nothing seems off in the snippet. Just that there's a compaction for board default and the serials look familiar from the error snippets. Gotta add serial range to the compaction log message from now on...

It works now thanks. It's a great project.