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

[Bug] Unable to inject BetterDiscord from source, complains about node-sass not being signed. #332

Open
3 tasks done
FrobtheBuilder opened this issue Apr 9, 2019 · 8 comments
Labels
bug Something isn't working

Comments

@FrobtheBuilder
Copy link

FrobtheBuilder commented Apr 9, 2019

  • Used appropriate template for the issue type
  • Searched both open and closed issues for duplicates of this issue
  • Title adequately and concisely reflects the feature or the bug

Describe the bug
Can't inject into Discord on macOS when building from source. Discord launches with a JS error complaining about the node-sass binary being unsigned.

To Reproduce
Run npm install, npm run build,npm run release, etc, then npm run inject and get this stupid error on startup then Discord launches without BetterDiscord being properly injected. Try to fix it with npm run build_node-sass and rebuilding but it still doesn't work.

Expected behavior
I assume it should launch without that error and have BetterDiscord injected into the client, but it doesn't.

Screenshots
image

System information
macOS Mojave, Mainline Discord latest version

Are you willing and able to fix this?
I assume it has something to do with signing the node-sass binary so Electron will accept it, but I'm not sure exactly what that entails, so I guess not. Perhaps I could figure it out if given enough time but I assume somebody else is probably more qualified to handle this.

@FrobtheBuilder FrobtheBuilder added the bug Something isn't working label Apr 9, 2019
@samuelthomas2774
Copy link

I've never had this issue (maybe because I compiled the bindings myself?) but @qwerasd205 has worked around this by removing Discord's signature. You should be able to ad-hoc sign the binding though as suggested in the error:

codesign --force -s - node_modules/node-sass/vendor/darwin-x64-69/binding.node

@FrobtheBuilder
Copy link
Author

FrobtheBuilder commented Apr 9, 2019

I tried compiling my own bindings with the build_node-sass thing but I'll try that real quick.

@FrobtheBuilder
Copy link
Author

Doesn't work, complains about it being signed adhoc.
image

@FrobtheBuilder
Copy link
Author

I found something on this here ycm-core/YouCompleteMe#3216. I have Homebrew's python@2 installed and I know node-gyp uses python so I'll try removing it and building again. Let me see if that fixes it.

@FrobtheBuilder
Copy link
Author

Still doesn't work. Not sure what's up with this.

@FrobtheBuilder
Copy link
Author

I fixed it by running codesign --remove-signature on /Applications/Discord.app/Contents/MacOS/Discord.

Phwew, that was annoying. You think there might be a better solution for this?

@qwerasd205
Copy link

The unsigning of the executable will be an automated part of the install process on macOS in the installer.

@FrobtheBuilder
Copy link
Author

Alright, then at least it's documented in this issue in case anybody else runs into the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants