glajchs / slack-customizations

Some customizations to slack, such as some keybindings, dark theme, etc
MIT License
21 stars 1 forks source link

Slack for linux 3.3.7 no longer working #5

Closed jamesdwilson closed 5 years ago

jamesdwilson commented 5 years ago

Linux Mint 19.1, Slack version 3.3.7

4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

I've tried re-applying the patch, the patch warns it is already patched and no change after re-applying anyway.

I've tried apt purging and reinstalling it to no avail.

glajchs commented 5 years ago

Ah sorry! Just seeing this alert now. I'm using 3.3.7 successfully still. Let me see if I can get a list of steps to help diagnose.

I will say that one of the recent patches (for whatever reason) cleared for me the list of plugins that are enabled. This never used to happen for me for patches, and this data is stored in localStorage for the app itself.

Perhaps this is what happened to you? If you go to File -> Preferences (Ctrl+Comma), does it show the "Plugins" section on the left? That section is put there entirely by my script, and if that's there, then the stuff is loaded. It's likely in that case that you just need to go back into there and re-enable the various plugins.

jamesdwilson commented 5 years ago

Hi @glajchs - thank you again for your hard work on this project.

Unfortunately, the plugins menu does not show there. I hope this debug info helps reproduce:

james@james-dell-pc:~/Apps/slack-customizations$ git pull
Already up to date.
james@james-dell-pc:~/Apps/slack-customizations$ git log -n 1 master
commit c75a6c0b059ba6082f0e4dc4d7dfd2d6f93249b1 (HEAD -> master, origin/master, origin/HEAD)
Author: Scott Glajch <glajchs@gmail.com>
Date:   Thu Feb 28 11:40:22 2019 -0500

    Fix the CodeMirror code block colorings for the dark theme.
james@james-dell-pc:~/Apps/slack-customizations$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
james@james-dell-pc:~/Apps/slack-customizations$ ll
total 44
drwxr-xr-x 6 james james 4096 Feb 19 14:13 ./
drwxrwxr-x 4 james james 4096 Mar  1 10:28 ../
drwxr-xr-x 8 james james 4096 Mar  1 10:29 .git/
-rw-r--r-- 1 james james   30 Feb  8 17:12 .gitignore
-rw-r--r-- 1 james james 1069 Feb  8 17:12 LICENSE
drwxr-xr-x 2 james james 4096 Feb 19 14:13 patch-files/
-rwxr-xr-x 1 james james 1854 Feb  8 17:12 patch-slack.sh*
drwxr-xr-x 2 james james 4096 Feb 19 14:13 readme-files/
-rw-r--r-- 1 james james 4456 Feb  8 17:12 README.md
drwxr-xr-x 2 james james 4096 Mar  1 10:29 .slack/
james@james-dell-pc:~/Apps/slack-customizations$ sudo ./patch-slack.sh 
Slack's ssb-interop.js is already patched. Do you want to re-apply the patch? (y|n)? y
Patching Slack's ssb-interop.js file at /usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
Slack's index.js is already patched. Do you want to re-apply the patch? (y|n)? y
Patching Slack's index.js file at /usr/lib/slack/resources/app.asar.unpacked/src/static/index.js
james@james-dell-pc:~/Apps/slack-customizations$ which slack 
/usr/bin/slack
james@james-dell-pc:~/Apps/slack-customizations$ file /usr/bin/slack 
/usr/bin/slack: symbolic link to ../lib/slack/slack
james@james-dell-pc:~/Apps/slack-customizations$ file /usr/lib/slack/slack
/usr/lib/slack/slack: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, stripped
james@james-dell-pc:~/Apps/slack-customizations$ sha256sum /usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
b1e75da5e2d9c5750f72d1199dd16264d4f4aa084c781e788616cf514e673b66  /usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
james@james-dell-pc:~/Apps/slack-customizations$ sha256sum /usr/lib/slack/resources/app.asar.unpacked/src/static/index.js
1653bdf3654b012dd678822c1193aadf6b9637e2631951927550ae0f9ab1424e  /usr/lib/slack/resources/app.asar.unpacked/src/static/index.js
james@james-dell-pc:~/Apps/slack-customizations$ sha256sum /usr/lib/slack/slack 
ade23420938041909817027b2904016aacabaf1d766f894b73d30e9ea944aa04  /usr/lib/slack/slack
james@james-dell-pc:~/Apps/slack-customizations$ tar -cf - /usr/lib/slack | sha256sum
tar: Removing leading `/' from member names
28dc6383715738864c5fffa25de223d54789c6f835f04574f3668d5e8b597f18  -
james@james-dell-pc:~/Apps/slack-customizations$ slack --version
3.3.7
james@james-dell-pc:~/Apps/slack-customizations$ slack 
(electron) 'app.makeSingleInstance(cb)' is deprecated. Use 'app.requestSingleInstanceLock() and app.on('second-instance', cb)' instead.
Creating Slack Application
jamesdwilson commented 5 years ago

screenshot from 2019-03-01 10-40-09

glajchs commented 5 years ago

Hi James, thank you for the prompt information. I have one other quick thought before I link more detailed ways to debug this. Did you skip or change the step that puts the plugin files into your ${HOME}/.slack directory? EDIT I just removed the instructions on how to symlink the .slack directory and instead added the logic automatically to the "patch-slack" script. You can run that script again to symlink the ".slack" dir to your home dir if you haven't already. I just downloaded a fresh Ubuntu bionic install from osboxes for virtualbox, and a base Slack 3.3.7 install with the instructions on how to set things up is working for me.

For reference here are the installation instructions: https://github.com/glajchs/slack-customizations#installation-instructions

Here is a link to a more detailed set of ways to look into "what's wrong" in the loading process. I'm going to try to convert the below into a wiki page today. https://github.com/glajchs/slack-customizations/issues/1#issuecomment-443509713

jamesdwilson commented 5 years ago

Thank you, the symlink was the issue. Your fix is not compatible with my machine, it created a symlink to the repo root instead of /.slack.

Thank you again.

glajchs commented 5 years ago

Thanks for the confirmation James. I'll try to get work done this week to take the pain out of managing this lifecycle this week.

I've already got a good prototype at loading the plugin files directly from the master repo in git, and I think I can pare the installation process to just being 1 ".sh" or ".bat" file that you can run once to do installation (and re-run when slack patches over it). No symlinking required. Then I'll have everything automatically update from within the app, and probably give an option to turn off auto update for all plugins or per plugin.

As an FYI I'll track that work here: https://github.com/glajchs/slack-customizations/issues/6

jamesdwilson commented 5 years ago

You considered making a launcher link that would launch slack and verify/repatch as needed? Then we can update our desktop links to point to your launcher.

glajchs commented 5 years ago

I had not considered that. That's an excellent idea! Though one that will be OS specific and will require some extra legwork to be "complete". But I can start by making the linux one right now.