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 file does not render when I did not save it in the whiteboard app myself #395

Closed
tpokorra opened this issue Mar 6, 2025 · 2 comments

Comments

@tpokorra
Copy link

tpokorra commented Mar 6, 2025

This works:

  • I create a whiteboard file, add some content, close it, I can open it again, and see my content.

This does not work:

  • I create a whiteboard file, add some content, close it, copy it to a different filename. I open it, and I see a blank whiteboard.
  • Same for the templates: I create a new whiteboard, select a template. But I see a blank whiteboard.

even when I cannot see the whiteboard:
When I save the whiteboard from the whiteboard app, the file is downloaded, and comparing with a text editor, the content is there.

Example code that does not render after renaming the file:

{"type":"excalidraw","elements":[{"type":"rectangle","version":12,"versionNonce":1975657819,"isDeleted":false,"id":"Ep81w3Wf5gS5GZIZIWxzz","fillStyle":"solid","strokeWidth":1,"strokeStyle":"solid","roughness":0,"opacity":100,"angle":0,"x":121,"y":22,"strokeColor":"#1e1e1e","backgroundColor":"transparent","width":333,"height":98,"seed":1416249979,"groupIds":[],"frameId":null,"roundness":{"type":3},"boundElements":[],"updated":1741207166583,"link":null,"locked":false},{"type":"text","version":6,"versionNonce":450465301,"isDeleted":false,"id":"o5y2qKvpPulYpWLcK9X5H","fillStyle":"solid","strokeWidth":1,"strokeStyle":"solid","roughness":0,"opacity":100,"angle":0,"x":191,"y":49,"strokeColor":"#1e1e1e","backgroundColor":"transparent","width":58.58333206176758,"height":24,"seed":44745211,"groupIds":[],"frameId":null,"roundness":null,"boundElements":[],"updated":1741207170512,"link":null,"locked":false,"fontSize":20,"fontFamily":3,"text":"test2","textAlign":"left","verticalAlign":"top","containerId":null,"originalText":"test2","lineHeight":1.2,"baseline":20}],"files":[],"savedAt":1741207184254}

This is with Nextcloud 30.0.6 and Nextcloud Whiteboard 1.0.5.

I cannot see errors in the output of the node service, or on the browser console.

Is this a common issue, or is something wrong with my setup?

@grnd-alt
Copy link
Member

grnd-alt commented Mar 6, 2025

Thanks for your report, I was not able to reproduce the issue. It sounds like your whiteboard server can't reach the nextcloud server correctly, though that should be visible in the logs. Could you please verify, that your you can reach your nextcloud instance from inside the whiteboard server?

@tpokorra
Copy link
Author

tpokorra commented Mar 6, 2025

Thank you so much @grnd-alt . Your hint helped me to solve it!

yes, indeed, there is an error message.
I ignored it, because it comes up for both situations.

[474] Fetching server data: {}
Error: HTTP error! status: 401: {"message":"Unauthorized"}
    at ApiService.fetchData (file:///home/pacs/tim05/users/ncwhiteboard/ncwhiteboard/websocket_server/ApiService.js:39:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async RoomDataManager.fetchRoomData (file:///home/pacs/tim05/users/ncwhiteboard/ncwhiteboard/websocket_server/RoomDataManager.js:216:19)
    at async RoomDataManager.determineDataToUpdate (file:///home/pacs/tim05/users/ncwhiteboard/ncwhiteboard/websocket_server/RoomDataManager.js:107:11)
    at async RoomDataManager.syncRoomData (file:///home/pacs/tim05/users/ncwhiteboard/ncwhiteboard/websocket_server/RoomDataManager.js:64:24)
    at async SocketManager.joinRoomHandler (file:///home/pacs/tim05/users/ncwhiteboard/ncwhiteboard/websocket_server/SocketManager.js:238:16)
    at async SocketManager.safeSocketHandler (file:///home/pacs/tim05/users/ncwhiteboard/ncwhiteboard/websocket_server/SocketManager.js:488:11)
[474] Server data is invalid, recovering from backup: {}
[474] Recovered from backup: {}

But it makes sense: the file was loaded from backup, and that is why I saw the content of a file that I had edited previously.

I have now fixed the HTTP_AUTHORIZATION in my .htaccess file, because that is causing trouble with PHP hosted with FPM:

RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

@tpokorra tpokorra closed this as completed Mar 6, 2025
@github-project-automation github-project-automation bot moved this from 🧭 Planning evaluation (don't pick) to ☑️ Done in 📝 Office team Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants