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

Added Discord Dynamic Paths detection, Flatpak and NixOS #65

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

SparrowOchon
Copy link

Some people have been having trouble finding discord and being given; " Could not find Discord executable" this is mainly due to the change in discord name in different installation. As such it is related to;

fixes #62
fixes #25

and supersedes; Pull Request #63

Fix the error that causes multiple people to get the Could not find Discord executable. When installing with Flatpak, and different distros due to the process name not being Exactly 'Discord-Helper'
@SparrowOchon SparrowOchon changed the title Fix for some users not being able to find Discord. Fix for some users not being able to find Discord AND config path files on linux Jul 2, 2019
@SparrowOchon
Copy link
Author

Dynamically fetch config directory path as such fixes issues from snap and flatpak users as well as addressing issues such as #66.

@SparrowOchon
Copy link
Author

Also fixes #53

@tadeokondrak

This comment has been minimized.

@SparrowOchon
Copy link
Author

@tadeokondrak should be fixed now. Let me know if theres anything else.

@SparrowOchon
Copy link
Author

Config path autofinding still not in the main branch. The injection patch changed to use .cache

@IGJoshua
Copy link

I've attempted to use this branch on NixOS version 20.03 and while it succeeded to find discord, it hangs before reporting the following:

Traceback (most recent call last):
  File "/home/suskeyhose/tmp/.venv/bin/beautifuldiscord", line 11, in <module>
    load_entry_point('BeautifulDiscord==0.1.1', 'console_scripts', 'beautifuldiscord')()
  File "/home/suskeyhose/tmp/.venv/lib/python3.7/site-packages/beautifuldiscord/app.py", line 280, in main
    os.chdir(discord.script_path)
  File "/home/suskeyhose/tmp/.venv/lib/python3.7/site-packages/beautifuldiscord/app.py", line 128, in script_path
    config
RuntimeError: Could not find discord application version under "/home/suskeyhose/.config/discord/0.0.10/modules/discord_desktop_core".

Notable is that there are files under that directory which appear to be acting as normal (although the package.json does list the "version" property as "0.0.0", however changing this to "0.0.10" fixes nothing)

@SparrowOchon
Copy link
Author

Hey @IGJoshua can you post a ls -la of /home/suskeyhose/.config/discord/0.0.10/modules/discord_desktop_core I cant seem to reproduce this error

@IGJoshua
Copy link

ls -la

total 7424
drwxr-xr-x  2 suskeyhose 985    4096 May 12 12:33 ./
drwxr-xr-x 10 suskeyhose 985    4096 Feb 27 07:29 ../
-rw-r--r--  1 suskeyhose 985 7583089 Feb 27 07:28 core.asar
-rw-r--r--  1 suskeyhose 985      40 Feb 27 07:28 index.js
-rw-r--r--  1 suskeyhose 985      85 May 12 12:31 package.json

package.json

{"name":"discord_desktop_core","version":"0.0.0","private":"true","main":"index.js"}

@SparrowOchon
Copy link
Author

@IGJoshua Hey, mind trying it now ?. It should be fixed

@IGJoshua
Copy link

@SparrowOchon Awesome, it works! Thanks!

@SparrowOchon SparrowOchon changed the title Fix for some users not being able to find Discord AND config path files on linux Added Discord Dynamic Paths detection, Flatpak and NixOS May 30, 2020
@unresolvedsymbol
Copy link

Trying to use this with a flatpak installation, and it never writes core.asar. Just moves the old one to original_core.asar and causes Discord to fail to start.

@SparrowOchon
Copy link
Author

Truth be told, I don't use Discord, and seeing as this most likely won't ever be merged I won't bother putting time into keeping this up to date. Feel free to make modifications or fork my fork.

@unresolvedsymbol This is most likely related to the directory not being found thus, with the discord update. Make sure the in the app.py file the directory is being properly found. Since the Flatpak most likely moved files around.

@GunnerBasil There should be nothing stopping this from working on Arch already. Auto path detection is distro independent.

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

Successfully merging this pull request may close these issues.

Issue with Flatpak Installation "Could not find Discord executable." on Linux
4 participants