nextcloud / nextcloud/whiteboard
TypeError when pasting an image from clipboard
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 215
- Forks
- 39
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 32
Description
When pasting and image from my clipboard to the whiteboard it appeared for a few seconds before informing me that the backend was not reachable. The screenshot was taken using the system default screenshot tool and only copied to the clipboard. Then pasted directly in the whiteboard.
When looking at the whiteboard container we can see it had an error and crashed. On restart of the container all data done during the seesion (1h+) was lost and restored to the state before begining.
The instance is running the container image Nextcloud :30.0.1, the whiteboard container is running the ghcr.io/nextcloud-releases/whiteboard:release
OS / Architecture: linux / amd64
Client is Firefox 132.0 (64-bit), Mozilla Firefox for Arch Linux, archlinux - 1.0. Running on Endeavour OS, KDE under Wayland.
Here are the relevant last lines of the container logs when the crash occurred:
[2145446] Disposing room
[2145446] Saving room data to server: 7 elements, 0 files
[2145446] K6QFAsUY3zr-x2s2AAAH added image 72a9af5eea558f4a6aecccae1eb9afd509185bc9
file:///app/websocket_server/SocketManager.js:252
room.addFile(id, data)
^
TypeError: Cannot read properties of undefined (reading 'addFile')
at SocketManager.imageAddHandler (file:///app/websocket_server/SocketManager.js:252:8)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Node.js v22.9.0
npm notice
npm notice New minor version of npm available! 10.8.3 -> 10.9.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0
npm notice To update run: npm install -g npm@10.9.0
npm notice
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at websocket_server/SocketManager.js:252 and trace imageAddHandler during clipboard-image pasting, using the supplied container log and reproduction details. Verify the behavior around room disposal and image addition. Done means pasting the image no longer crashes the whiteboard container and the active session data is not lost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100