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

SlackBridge - Slack -> RC File Attachments not working #10002

Closed
mrplow opened this issue Mar 4, 2018 · 12 comments
Closed

SlackBridge - Slack -> RC File Attachments not working #10002

mrplow opened this issue Mar 4, 2018 · 12 comments

Comments

@mrplow
Copy link

mrplow commented Mar 4, 2018

Description:

Uploading a file from a synced private channel in slack isn't working. Messages sync 2-way fine

Server Setup Information:

  • Version of Rocket.Chat Server: 0.62.1
  • Operating System: Debian 8.10 64bit
  • Deployment Method(snap/docker/tar/etc): docker-compose
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • Node Version: 8.9.3
  • mongoDB Version: 3.4.13

Steps to Reproduce:

  1. Setup RC to sync with Slack by putting in your slack bot token
  2. Test by adding your bot to a channel in slack and send a message
  3. Upload a file in slack, nothing comes across in RC

Expected behavior:

The same file to show in RC

Actual behavior:

Nothing

Relevant logs:

Exception in callback of async function: Error: Meteor.userId can only be invoked in method calls or publications. at AccountsServer.userId (/app/bundle/programs/server/packages/accounts-base.js:516:35) at AccountsServer.user (/app/bundle/programs/server/packages/accounts-base.js:125:23) at Object.Meteor.user (/app/bundle/programs/server/packages/accounts-base.js:340:19) at Filter.validateFileUpload [as onCheck] (/app/bundle/programs/server/packages/rocketchat_file-upload.js:95:25) at Filter.check (/app/bundle/programs/server/packages/jalik_ufs.js:595:53) at FileUploadClass.insert (/app/bundle/programs/server/packages/rocketchat_file-upload.js:590:14) at requestModule.get.Meteor.bindEnvironment.stream (/app/bundle/programs/server/packages/rocketchat_slackbridge.js:857:17) at runWithEnvironment (packages/meteor.js:1240:24)

I checked my bot's setting and it seems correct. I switched from external to internal hubot. I installed a fresh RC to check my Permissions settings (what a pain since the users aren't showing in the same order since anonymous and leader are newer) (also checking a permissions box by accident is very easy and not obvious if using a touch screen).
Anyways nothing helped and I always receive the same error.

@theorenck theorenck added this to the 0.63.0 milestone Mar 8, 2018
@Hudell Hudell self-assigned this Mar 26, 2018
@Hudell
Copy link
Contributor

Hudell commented Mar 29, 2018

PR #10269 changed the application to send a message with a link to the attached files.

@engelgabriel engelgabriel modified the milestones: 0.63.0, 0.65.0 May 5, 2018
@JesseVS
Copy link

JesseVS commented May 24, 2018

I noticed that when I use /slackbridge-import it did import the pictures from slack to rocketchat. First I noticed that the Maximum File Upload Size (in bytes) at the File Upload settings section, was to small for certain pictures/files. I increased it and ran /slackbridge-import again and more pictures imported

@1000ouz
Copy link

1000ouz commented Nov 20, 2018

The problem is the same on the other side, meaning that if a file is uploaded on the Slack channel, it is not visible on the Rocket.Chat side. I suppose this bug was only making reference to file upload in Rocket.Chat not visible in Slack channel or was it both way ? Is it planned to fix those bugs because this is pretty annoying, we can't use Slack integration in this case, because file upload in channels is pretty common, still not working with 0.71.1. Any plan to fix this soon ?

@Hudell
Copy link
Contributor

Hudell commented Nov 20, 2018

When a file is uploaded on slack, you should be getting a link to download it on Rocket.Chat. Do you get any kind of error message on the logs?

@1000ouz
Copy link

1000ouz commented Nov 20, 2018

just did a test on a slack channel, I get the following info below in /var/log/syslog
I receive the description text on the Rocket.Chat side, but no link to anything....
I see the "Not Running" is there some other specific service ?

Nov 20 17:17:01 SRVRocket001 CRON[6875]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Nov 20 17:30:00 SRVRocket001 rocketchat-server.rocketchat-server[6108]: #33[34mSyncedCron ➔ info#033[39m Starting "Generate download files for user data".
Nov 20 17:30:00 SRVRocket001 rocketchat-server.rocketchat-server[6108]: #33[34mSyncedCron ➔ info#033[39m Finished "Generate download files for user data".
Nov 20 17:30:00 SRVRocket001 rocketchat-server.rocketchat-server[6108]: #33[34mSyncedCron ➔ info#033[39m Not running "Generate download files for user data" again.

@Hudell
Copy link
Contributor

Hudell commented Nov 20, 2018

No, that is unrelated. I'll run some tests here to see if I can find anything wrong.

@1000ouz
Copy link

1000ouz commented Nov 21, 2018

Did it run well with your tests ? Is there some more specific logs I can check except /var/log/syslog ?

@Hudell
Copy link
Contributor

Hudell commented Dec 3, 2018

I've confirmed the bug: it only happens with newer data. A few months ago slack change the structure in which they store their files, that is probably what is causing this issue.

@theorenck theorenck modified the milestones: 0.69.0, Short-term Dec 12, 2018
@nylen
Copy link

nylen commented Jan 25, 2019

any update on this? what part of the code can we look in to help?

@L3nny5
Copy link

L3nny5 commented Apr 12, 2019

Any idea when this will be fixed? It would really help us to migrate from Slack to Rocket.Chat.

@rodrigok
Copy link
Member

Closed via #14273

@engelgabriel engelgabriel modified the milestones: Short-term, 1.0.0 Apr 29, 2019
@L3nny5
Copy link

L3nny5 commented May 14, 2019

For me it does not seem to be fixed. Now I get a Link displayed in the channel, which is better. However it is not displaying it. Why can't Rocket.Chat import the file which is displayed in Slack?

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.