Upload file error: FileNotFound:

My system:
CentOS Linux release 7.7.1908
Rocket.Chat Version: 2.2.0
NodeJS Version: 8.16.2 - x64
MongoDB Version: 4.0.13
MongoDB Engine: mmapv1
Platform: linux
Process Port: 3000
Site URL: https://localhost

File upload, file system constant error progress 0% FridFS similar problem

Error: FileNotFound: no file with id CtrsAyXbSLTrgFu6z found
at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/gridfs-stream/index.js:188:25
at result (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:414:17)
at session.endSession (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:401:11)
at ClientSession.endSession (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/sessions.js:129:41)
at executeCallback (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:397:17)
at deleteCallback (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/collection_ops.js:349:17)
at removeDocuments (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/collection_ops.js:364:54)
at handleCallback (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:128:55)
at coll.s.topology.remove (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/collection_ops.js:1208:5)
at handler (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/replset.js:1197:22)
at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:532:18
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickDomainCallback (internal/process/next_tick.js:219:9)

i have the same problem

Error: FileNotFound: no file with id 2KAYQa2DwEhtkCqyC found
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/gridfs-stream/index.js:188:25
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at result (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:414:17)
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at session.endSession (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:401:11)
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at ClientSession.endSession (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/sessions.js:129:41)
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at executeCallback (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:397:17)
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at deleteCallback (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/collection_ops.js:349:17)
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at removeDocuments (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/collection_ops.js:364:54)
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at handleCallback (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:128:55)
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at coll.s.topology.remove (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/collection_ops.js:1208:5)
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at handler (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/replset.js:1197:22)
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:532:18
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at _combinedTickCallback (internal/process/next_tick.js:131:7)
Dec 17 14:09:55 sv252003001 RocketChat[5312]: at process._tickDomainCallback (internal/process/next_tick.js:218:9)

I also have the exact same issue when trying Local file storage rather than GridFS. Same errors as well.

Can any devs look into this? It’s affecting multiple users.
I’m running Rocket Chat on Ubuntu in Snaps.

Same issue here, but happens with GridFS or Local file storage. Strangely though, I’m able to upload files on mobile, so it seems like a client issue. Any ideas?

docker version 18.09.9
docker-compose 1.25.3
centos 7.6
rocket.chat 2.4.9
upload files only mobile(ios / Android ) and desktop upload file ,log will show Upload file error

If you have multiple instances of Rocket.Chat running. Make sure you have sticky sessions configured in your load balancer.

What can happen here is when uploading… When it starts and starts uploading chunks of the files… If they end up on different instances of Rocket.Chat running… it can’t piece the file back together.

So setting sticky sessions bypasses this.