Error when deleting attachment from card
Created by: knacky34
Issue
Server Setup Information
- Did you test in newest Wekan?: yes, 7.30.0
- Did you configure root-url correctly so Wekan cards open correctly (see https://github.com/wekan/wekan/wiki/Settings)? yes
- Operating System: Debian Bookworm
- Deployment Method (Snap/Docker/Sandstorm/bundle/source): Podman
- Http frontend if any (Caddy, Nginx, Apache, see config examples from Wekan GitHub wiki first): Caddy
- Node.js Version: 14.21.4
- MongoDB Version: 7.0.5
- What webbrowser version are you using (Wekan should work on all modern browsers that support Javascript)? Firefox
Problem description
This issue may be related to : #5195.
When I try to delete an attachment, everything seems OK but I got the following error in logs.
As I understand from issue #5195, attachments are stored in Mongo GridFS even with WRITABLE_PATH env set. Maybe Wekan tries to delete file on filesystem instead of on GridFS.
Reproduction Steps
- Setup Docker container:
podman run -d \ -e ROOT_URL=https://$DOMAIN \ -e MONGO_URL=mongodb://wekan:$MONGO_PASSWORD_WEKAN@mongo:27017/wekan?authSource=admin \ -e WRITABLE_PATH=/data \ -e MAIL_URL=smtp://localhost \ -e MAIL_FROM="Wekan Notifications <noreply.wekan@$DOMAIN>" \ -v wekan_data:/data \ docker.io/wekanteam/wekan:latest
- Create a board and add a new card.
- Add an attachment to the card.
- Delete the attachment
Logs
Exception in removedobserveChanges callback: Error: Removed nonexistent document -65bfabc40ce1fa80edac80ef
at SessionCollectionView.removed (packages/ddp-server/livedata_server.js:269:17)
at Session.removed (packages/ddp-server/livedata_server.js:468:12)
at Subscription.removed (packages/ddp-server/livedata_server.js:1430:19)
at removed (packages/cottz:publish-relations/lib/server/cursor/cursor.js:52:13)
at runWithEnvironment (packages/meteor.js:1486:24)
at packages/meteor.js:1499:14
at packages/mongo/observe_multiplex.js:178:30
at Array.forEach (<anonymous>)
at Function._.each._.forEach (packages/underscore.js:139:11)
at Object.task (packages/mongo/observe_multiplex.js:172:9)
at Meteor._SynchronousQueue.SQp._run (packages/meteor.js:1026:16)
at packages/meteor.js:1003:12