Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whiteboard Crashes after using it for 25+ minutes #258

Open
byquanton opened this issue Oct 31, 2024 · 5 comments · May be fixed by #306
Open

Whiteboard Crashes after using it for 25+ minutes #258

byquanton opened this issue Oct 31, 2024 · 5 comments · May be fixed by #306
Assignees
Labels
1. to develop bug Something isn't working high

Comments

@byquanton
Copy link

I used a whiteboard for about 25 Minutes and the server suddenly crashed. I had it open on 3 devices with the same Nextcloud account.
All changes were lost and nothing was saved to the Nextcloud (reopening it resulted in an empty file).

It was not possible to use the built-in download button to back up after the server crashed because closing the error alert stopped the whole "exalidraw" session and while the message was displayed it was not possible to interact with the page.

Logs:

[12808] Room data synced. Users: 1, Last edited by: *censored*, files: 4
[socket:*censored*] Disposing room
file:///app/websocket_server/SocketManager.js:160
			user: data.user,
			           ^

TypeError: Cannot read properties of undefined (reading 'user')
at file:///app/websocket_server/SocketManager.js:160:16
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Promise.all (index 0)
at async SocketManager.serverBroadcastHandler (file:///app/websocket_server/SocketManager.js:207:29)
@Grizaster
Copy link

same here!

@TobiasHofmaenner
Copy link

TobiasHofmaenner commented Nov 15, 2024

I have the exact same problem.
i added:

restart: unless-stopped

to my docker-compose.yaml but it's not really a fix...

@Timbio
Copy link

Timbio commented Nov 19, 2024

I have the same issue as well.

@TobiasHofmaenner
Copy link

TobiasHofmaenner commented Nov 19, 2024

I guess we should check and make sure that data.user is not undefined in SocketManager.js in the function:

	async getUserSocketsAndIds(roomID) {
		const sockets = await this.io.in(roomID).fetchSockets()
		return Promise.all(sockets.map(async (s) => {
			const data = await this.socketDataManager.getSocketData(s.id)
			return {
				socketId: s.id,
				user: data.user,
				userId: data.user.id,
			}
		}))
	}

@hweihwang
Copy link
Contributor

Thank you for reporting this issue! We've been able to reproduce the crash locally after extended usage.

@TobiasHofmaenner's suggestion about adding empty checks for data.user in SocketManager.js might help prevent the crashes temporarily.

We'll investigate the cause and provide proper fixes in upcoming releases. Thank you!

@hweihwang hweihwang self-assigned this Dec 2, 2024
@hweihwang hweihwang added bug Something isn't working 1. to develop high labels Dec 2, 2024
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Dec 2, 2024
@hweihwang hweihwang moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 📝 Office team Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop bug Something isn't working high
Projects
Status: 🏗️ In progress
Development

Successfully merging a pull request may close this issue.

5 participants