fsavje / math-with-slack

Rendered math (MathJax) with Slack's desktop client
MIT License
431 stars 62 forks source link

Cannot restore from backup. Missing file #26

Closed ggrrll closed 6 years ago

ggrrll commented 6 years ago

Hi,

thanks for the nice app.

However, I recently couldn't run it anymore due to this error message:

Cannot restore from backup. Missing file: /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop-lite.js.mwsbak

Any idea? - Thanks

fsavje commented 6 years ago

The script detects that you have installed math-with-slack, but it can't find the backup file it always creates when installing. Two ways to solve this:

  1. Manually open "ssb-interop-lite.js" and remove the three lines at the end that reads:

    // ** math-with-slack $MWS_VERSION ** https://github.com/fsavje/math-with-slack
    var mwsp = path.join(__dirname, 'math-with-slack.js').replace('app.asar', 'app.asar.unpacked');
    require('fs').readFile(mwsp, 'utf8', (e, r) => { if (e) { throw e; } else { eval(r); } });
  2. Re-install the Slack app from scratch.

Hope that helps.

jeanluct commented 6 years ago

Are you using slack-desktop v3.0.0, released just a few days ago? It breaks the script because the -lite file is gone.

See my pull request.

(A quick fix is to comment-out the two lines with -lite.)

ggrrll commented 6 years ago

@jeanluct it worked, thanks