I’am trying to upload file into a channel. But nothing works. File uploadings stacks at 0% and not progress more.
Steps to reproduce:
-
Open any channel.
-
Upload any file or files.
-
Click submit button.
Expected behavior:
File completely uploaded and message successfully sent.
Actual behavior:
Stacks at 0% of file uploading.
Server Setup Information:
Version of Rocket.Chat Server: 1.3.2
Operating System: CentOS Linux release 7.6.1810 (Core)
Deployment Method:
https://rocket.chat/docs/installation/manual-installation/centos/
Number of Running Instances: 1
NodeJS Version: 8.11.4
MongoDB Version: 4.0.12
Additional context:
I’m trying to upload files using API. All it’s done. But using web browser I have the problem.
Server Logs:
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: === UnHandledPromiseRejection ===
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: { Error: Match error: Expected string, got undefined
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: at check (packages/check/match.js:36:17)
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: at GridFSStore.Store.self.checkToken (packages/jalik:ufs/ufs-store.js:139:17)
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: at WebApp.connectHandlers.use (packages/jalik:ufs/ufs-server.js:149:24)
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: message: 'Match error: Expected string, got undefined',
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: path: '',
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: sanitizedError:
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: { Error: Match failed [400]
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: at errorClass. (packages/check/match.js:91:27)
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: at new errorClass (packages/meteor.js:725:17)
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: at check (packages/check/match.js:36:17)
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: at GridFSStore.Store.self.checkToken (packages/jalik:ufs/ufs-store.js:139:17)
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: at WebApp.connectHandlers.use (packages/jalik:ufs/ufs-server.js:149:24)
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: isClientSafe: true,
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: error: 400,
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: reason: 'Match failed',
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: details: undefined,
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: message: 'Match failed [400]',
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: errorType: 'Meteor.Error' },
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: errorType: 'Match.Error' }
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: ---------------------------------
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: Errors like this can cause oplog processing errors.
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: Setting EXIT_UNHANDLEDPROMISEREJECTION will cause the process to exit allowing your service to automatically restart the proce
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: Future node.js versions will automatically exit the process
сен 11 17:45:03 cmnp-app-1 rocketchat[1098]: =================================
Somebody knows whats wrong?
Thank You.
4
Answers
Please check if
Site URL
under general settings points to the public url of the application. I have seen instances where the upload is stuck when site url is incorrectMy roadtrip:
Works perfect for me.
You have to make sure that
Site URL
matches the public URL. If you don’t want to do this manually every time, make sure you setROOT_URL
upon deployment.Check that your “site url” setting is httpS if your site is.
In my case (docker version) I could use rocket-chat messages
with a non ssl “site url”
changing it to https allowed file upload
The setting is under