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

Error with file upload when using Google SafeSearch #10168

Closed
reece8765 opened this issue Mar 19, 2018 · 1 comment · Fixed by #23160
Closed

Error with file upload when using Google SafeSearch #10168

reece8765 opened this issue Mar 19, 2018 · 1 comment · Fixed by #23160

Comments

@reece8765
Copy link

reece8765 commented Mar 19, 2018

Description:

Google SafeSearch when switched to Enabled and Block Adult Images causes an error. Files are uploaded but do not display in the chat window whilst this is active.

Log information:
I20180318-21:12:44.488(0) Exception while invoking method 'sendFileMessage' TypeError: this.storageClient.bucket is not a function at GoogleVision.blockUnsafeImages (/app/bundle/programs/server/packages/rocketchat_google-vision.js:231:40) at /app/bundle/programs/server/packages/rocketchat_lib.js:1157:27 at Array.reduce (:null:null) at Object.RocketChat.callbacks.run (/app/bundle/programs/server/packages/rocketchat_lib.js:1150:6) at EventEmitter.RocketChat.sendMessage (/app/bundle/programs/server/packages/rocketchat_lib.js:5158:33) at DDPCommon.MethodInvocation.sendMessage (/app/bundle/programs/server/packages/rocketchat_lib.js:15419:21) at DDPCommon.MethodInvocation.methodsMap.(anonymous function) (/app/bundle/programs/server/packages/rocketchat_lib.js:2134:26) at DDPCommon.MethodInvocation.methodMap.(anonymous function) (packages/rocketchat_monitoring.js:2731:30) at maybeAuditArgumentChecks (/app/bundle/programs/server/packages/ddp-server.js:1826:12) at DDP._CurrentMethodInvocation.withValue (/app/bundle/programs/server/packages/ddp-server.js:1753:100) at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15) at resolve (/app/bundle/programs/server/packages/ddp-server.js:1753:72) at new Promise (:null:null) at Server.applyAsync (/app/bundle/programs/server/packages/ddp-server.js:1753:12) at Server.apply (/app/bundle/programs/server/packages/ddp-server.js:1689:26) at Server.call (/app/bundle/programs/server/packages/ddp-server.js:1673:17) at DDPCommon.MethodInvocation.sendFileMessage (/app/bundle/programs/server/packages/rocketchat_file-upload.js:1483:16) at DDPCommon.MethodInvocation.methodsMap.(anonymous function) (/app/bundle/programs/server/packages/rocketchat_lib.js:2134:26) at DDPCommon.MethodInvocation.methodMap.(anonymous function) (packages/rocketchat_monitoring.js:2731:30) at maybeAuditArgumentChecks (/app/bundle/programs/server/packages/ddp-server.js:1826:12) at DDP._CurrentMethodInvocation.withValue (/app/bundle/programs/server/packages/ddp-server.js:892:126) at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15) at DDPServer._CurrentWriteFence.withValue (/app/bundle/programs/server/packages/ddp-server.js:892:98) at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15) at Promise (/app/bundle/programs/server/packages/ddp-server.js:892:46) at new Promise (:null:null) at Session.method (/app/bundle/programs/server/packages/ddp-server.js:865:23) at /app/bundle/programs/server/packages/ddp-server.js:744:85 => awaited here: at Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12) at Server.apply (/app/bundle/programs/server/packages/ddp-server.js:1698:27) at Server.call (/app/bundle/programs/server/packages/ddp-server.js:1673:17) at DDPCommon.MethodInvocation.sendFileMessage (/app/bundle/programs/server/packages/rocketchat_file-upload.js:1483:16) at DDPCommon.MethodInvocation.methodsMap.(anonymous function) (/app/bundle/programs/server/packages/rocketchat_lib.js:2134:26) at DDPCommon.MethodInvocation.methodMap.(anonymous function) (packages/rocketchat_monitoring.js:2731:30) at maybeAuditArgumentChecks (/app/bundle/programs/server/packages/ddp-server.js:1826:12) at DDP._CurrentMethodInvocation.withValue (/app/bundle/programs/server/packages/ddp-server.js:892:126) at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15) at DDPServer._CurrentWriteFence.withValue (/app/bundle/programs/server/packages/ddp-server.js:892:98) at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:15) at Promise (/app/bundle/programs/server/packages/ddp-server.js:892:46) at new Promise (:null:null) at Session.method (/app/bundle/programs/server/packages/ddp-server.js:865:23) at /app/bundle/programs/server/packages/ddp-server.js:744:8

Server Setup Information:

  • Version of Rocket.Chat Server: 0.61.2
  • Operating System: Linux/hosted with rocket.chat
  • Deployment Method(snap/docker/tar/etc): Automatic, setup with rocket.chat
  • Number of Running Instances: unknown, I’m not the owner but I am an admin
  • DB Replicaset Oplog: -
  • Node Version: 8.9.3
  • mongoDB Version: unknown

Steps to Reproduce:

  1. turn on SafeSearch filtering for images and block adult images
  2. Upload an image of any kind

Expected behaviour: image is to be uploaded and displayed in the chat window if it has passed Google’s safe image checks

Actual behavior: Image uploads and is displayed in the files list but not shown in the chat window.

Relevant logs:

See above

@MartinSchoeler MartinSchoeler changed the title Error with file upload Error with file upload when using Google SafeSearch Mar 26, 2018
@theorenck theorenck added this to the Mid-term milestone Apr 10, 2018
@knrt10
Copy link
Contributor

knrt10 commented Mar 14, 2019

On it, Will try to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants