You are not logged in.

#1 2021-04-01 05:05:07

b0ss_
Member
Registered: 2021-01-16
Posts: 8

[SOLVED] Discord doesn't starts after fresh install

A couple days ago I broke my Arch build. I reinstalled it, but kept my /home partition. I've fixed most of the problems I had in that build, but I have new ones.

[b0ss] [01:58AM] [~] $ discord
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Path must be absolute
    at App.l._setDefaultAppPaths (electron/js2c/browser_init.js:5:1450)
    at Object.<anonymous> (electron/js2c/browser_init.js:205:2348)
    at Object../lib/browser/init.ts (electron/js2c/browser_init.js:205:3577)
    at __webpack_require__ (electron/js2c/browser_init.js:1:128)
    at electron/js2c/browser_init.js:1:1200
    at electron/js2c/browser_init.js:1:1267
    at NativeModule.compile (internal/bootstrap/loaders.js:287:5)
    at NativeModule.compileForPublicLoader (internal/bootstrap/loaders.js:222:8)
    at loadNativeModule (internal/modules/cjs/helpers.js:23:9)
    at Module._load (internal/modules/cjs/loader.js:698:15)

I can't get Discord to run. I've tried with a lot of other Discord clients, beta, nightly, but I can't get it to work.

I ran:

pacman -Syu

and I had to update Node.js. Didn't work either.

It just runs when I

sudo discord --no-sandbox

but I can't get it to work without sudo. Also, when I run Discord from the /opt/discord/ dir, I get a different error:

[b0ss] [02:03AM] [/opt/discord] $ ./Discord
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Failed to get 'appData' path
    at App.l._setDefaultAppPaths (electron/js2c/browser_init.js:5:1420)
    at Object.<anonymous> (electron/js2c/browser_init.js:205:2348)
    at Object../lib/browser/init.ts (electron/js2c/browser_init.js:205:3577)
    at __webpack_require__ (electron/js2c/browser_init.js:1:128)
    at electron/js2c/browser_init.js:1:1200
    at electron/js2c/browser_init.js:1:1267
    at NativeModule.compile (internal/bootstrap/loaders.js:287:5)
    at NativeModule.compileForPublicLoader (internal/bootstrap/loaders.js:222:8)
    at loadNativeModule (internal/modules/cjs/helpers.js:23:9)
    at Module._load (internal/modules/cjs/loader.js:698:15)

I've been searching for HOURS and the only solutions I've found are for Windows. If any info needed, please tell me and I'll give it to you guys!
Thanks beforehand smile

Edit: I'm using XMonad with Xstart. If any info needed, again, ask for it smile Also, I tried running Discord via

discord --no-sandbox
[b0ss] [02:07AM] [~] $ discord --no-sandbox
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Path must be absolute
    at App.l._setDefaultAppPaths (electron/js2c/browser_init.js:5:1450)
    at Object.<anonymous> (electron/js2c/browser_init.js:205:2348)
    at Object../lib/browser/init.ts (electron/js2c/browser_init.js:205:3577)
    at __webpack_require__ (electron/js2c/browser_init.js:1:128)
    at electron/js2c/browser_init.js:1:1200
    at electron/js2c/browser_init.js:1:1267
    at NativeModule.compile (internal/bootstrap/loaders.js:287:5)
    at NativeModule.compileForPublicLoader (internal/bootstrap/loaders.js:222:8)
    at loadNativeModule (internal/modules/cjs/helpers.js:23:9)
    at Module._load (internal/modules/cjs/loader.js:698:15)

And when I don't run it from $HOME/, I get this other error:

[b0ss] [02:08AM] [~/GIT/Discord_Bots] $ discord --no-sandbox
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Path must be absolute
    at App.l._setDefaultAppPaths (electron/js2c/browser_init.js:5:1450)
    at Object.<anonymous> (electron/js2c/browser_init.js:205:2348)
    at Object../lib/browser/init.ts (electron/js2c/browser_init.js:205:3577)
    at __webpack_require__ (electron/js2c/browser_init.js:1:128)
    at electron/js2c/browser_init.js:1:1200
    at electron/js2c/browser_init.js:1:1267
    at NativeModule.compile (internal/bootstrap/loaders.js:287:5)
    at NativeModule.compileForPublicLoader (internal/bootstrap/loaders.js:222:8)
    at loadNativeModule (internal/modules/cjs/helpers.js:23:9)
    at Module._load (internal/modules/cjs/loader.js:698:15)
Failed to create HOME/.cache for shader cache (No such file or directory)---disabling.

Well, I'll stop bloating this post. Hope we can work this out!! smile

Last edited by b0ss_ (2021-04-02 01:23:57)

Offline

#2 2021-04-01 11:51:05

bjornp_
Member
Registered: 2020-12-31
Posts: 17

Re: [SOLVED] Discord doesn't starts after fresh install

How did you install discord? The recommended method is to install the package from the repositories, and I have seen people having issues before when using a different one. Since it seems you might have installed discord when your system was in a partially updated state, try uninstalling discord, then installing again it using `pacman -Syu discord', to make sure all dependencies are up to date at install-time


Fun fact: I actually have no clue what I'm doing

Offline

#3 2021-04-01 21:50:50

b0ss_
Member
Registered: 2021-01-16
Posts: 8

Re: [SOLVED] Discord doesn't starts after fresh install

bjornp_ wrote:

How did you install discord?

I did it via Pacman. Although, my /home directory has a looot of .config/ files. I've come to the thought that making a /home partition is not necessarily the best thing to do, because I'm having troubles with Firefox and FIrefox-based Web browsers, but that's for another topic.

I'll first remove it, as you recommend, via:

# sudo pacman -Rnsc discord

And install it again via

# sudo pacman -Syu discord
[b0ss] [06:42PM] [~] $ discord
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Path must be absolute
    at App.l._setDefaultAppPaths (electron/js2c/browser_init.js:5:1450)
    at Object.<anonymous> (electron/js2c/browser_init.js:205:2348)
    at Object../lib/browser/init.ts (electron/js2c/browser_init.js:205:3577)
    at __webpack_require__ (electron/js2c/browser_init.js:1:128)
    at electron/js2c/browser_init.js:1:1200
    at electron/js2c/browser_init.js:1:1267
    at NativeModule.compile (internal/bootstrap/loaders.js:287:5)
    at NativeModule.compileForPublicLoader (internal/bootstrap/loaders.js:222:8)
    at loadNativeModule (internal/modules/cjs/helpers.js:23:9)
    at Module._load (internal/modules/cjs/loader.js:698:15)

It's one of the same errors I had before. For more info, I'll pass on my:
:

 $ uname -a
Linux archlinux 5.11.11-arch1-1 #1 SMP PREEMPT Tue, 30 Mar 2021 14:10:17 +0000 x86_64 GNU/Linux

I've also tried using the tar.gz Discord desktop app, it throws the exact same problem.

 $ ./Discord
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Path must be absolute
    at App.l._setDefaultAppPaths (electron/js2c/browser_init.js:5:1450)
    at Object.<anonymous> (electron/js2c/browser_init.js:205:2348)
    at Object../lib/browser/init.ts (electron/js2c/browser_init.js:205:3577)
    at __webpack_require__ (electron/js2c/browser_init.js:1:128)
    at electron/js2c/browser_init.js:1:1200
    at electron/js2c/browser_init.js:1:1267
    at NativeModule.compile (internal/bootstrap/loaders.js:287:5)
    at NativeModule.compileForPublicLoader (internal/bootstrap/loaders.js:222:8)
    at loadNativeModule (internal/modules/cjs/helpers.js:23:9)
    at Module._load (internal/modules/cjs/loader.js:698:15)

I will also send the output of running Discord as root with the --no-sandbox option:

$ sudo discord --no-sandbox
Discord 0.0.14
(node:7840) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /root/.config/discord/0.0.14/modules
[Modules] Module installed file path: /root/.config/discord/0.0.14/modules/installed.json
[Modules] Module download path: /root/.config/discord/0.0.14/modules/pending
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
[Modules] No module updates available.

(discord:7840): libappindicator-WARNING **: 18:49:00.181: Unable to get the session bus: Unknown or unsupported transport ?disabled? for address ?disabled:?

(discord:7840): LIBDBUSMENU-GLIB-WARNING **: 18:49:00.185: Unable to get session bus: Unknown or unsupported transport ?disabled? for address ?disabled:?

I hope we can work this out smile Thanks!

Offline

#4 2021-04-01 22:20:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,505

Re: [SOLVED] Discord doesn't starts after fresh install

How are you starting your graphical session? What's your output of

printenv

I have a feeling your home and lots of your environment is not set properly.

Offline

#5 2021-04-01 22:54:21

b0ss_
Member
Registered: 2021-01-16
Posts: 8

Re: [SOLVED] Discord doesn't starts after fresh install

V1del wrote:

How are you starting your graphical session? What's your output of

printenv

I have a feeling your home and lots of your environment is not set properly.

$ printenv
SHELL=/bin/bash
WINDOWID=10485762
COLORTERM=truecolor
XDG_CONFIG_DIRS=/etc/xdg
XDG_DATA_HOME=$HOME/.local/share
XDG_CONFIG_HOME=$HOME/.config
EDITOR=vim
GTK_MODULES=canberra-gtk-module
XDG_SEAT=seat0
PWD=/home/b0ss
PKEY= not gonna show this
LOGNAME=b0ss
XDG_SESSION_TYPE=tty
XAUTHORITY=/home/b0ss/.Xauthority
WINDOWPATH=1
MOTD_SHOWN=pam
HOME=/home/b0ss
LANG=C
CKEY= not gonna show this
INVOCATION_ID=828e1c729e0a477bb053845e7f300406
XDG_CACHE_HOME=HOME/.cache
XDG_SESSION_CLASS=user
TOKEN= not gonna show this
TTOKEN= not gonna show this
TERM=alacritty
USER=b0ss
CUDA_PATH=/opt/cuda
DISPLAY=:0
SHLVL=3
XDG_VTNR=1
XDG_SESSION_ID=1
ACCTOKEN= not gonna show this
XDG_RUNTIME_DIR=/run/user/1000
JOURNAL_STREAM=8:20212
XDG_DATA_DIRS=/usr/local/share:/usr/share
PATH=/home/b0ss/.config/:/home/b0ss/proyectos/sh_scripts:/home/b0ss/.local/bin:/home/b0ss/.config/:/home/b0ss/proyectos/sh_scripts:/home/b0ss/.local/bin:/home/b0ss/.cargo/bin:/home/b0ss/.config/:/home/b0ss/proyectos/sh_scripts:/home/b0ss/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
BASE16_THEME=synth-midnight-dark
ALACRITTY_LOG=/tmp/Alacritty-2360.log
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MAIL=/var/spool/mail/b0ss
OLDPWD=/home/b0ss/.config/base16-shell
_=/usr/bin/printenv

That's my printenv.

I saw this:

XDG_SESSION_TYPE=tty

Looks weird too me. What do you think?

EDIT: Checked my .bashrc and I saw this:

export XDG_CACHE_HOME='HOME/.cache'

Tried to add a # in #HOME, source .bashrc, tried to start Discord, didn't work.

Last edited by b0ss_ (2021-04-01 22:58:15)

Offline

#6 2021-04-01 23:55:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,505

Re: [SOLVED] Discord doesn't starts after fresh install

That's the default you could also just not set it... However to do what your intention is you'd do

export XDG_CACHE_HOME=$HOME/.cache

note the $ and the lack of '' and do that for all of the xdg variables they should not contain the literal string $HOME

Last edited by V1del (2021-04-01 23:58:00)

Offline

#7 2021-04-02 01:23:36

b0ss_
Member
Registered: 2021-01-16
Posts: 8

Re: [SOLVED] Discord doesn't starts after fresh install

V1del wrote:

That's the default you could also just not set it... However to do what your intention is you'd do

export XDG_CACHE_HOME=$HOME/.cache

note the $ and the lack of '' and do that for all of the xdg variables they should not contain the literal string $HOME

Yessss you were right! You're a genius! Thank you soooo much smile

I did what you said. I converted the $HOME vars directly into my home directory. That solved literally every other problem I had before hahahaha.

V1del you're my hero!

SOLVED!

Offline

#8 2021-04-02 10:39:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,505

Re: [SOLVED] Discord doesn't starts after fresh install

You can use the $HOME shorthand but you need to use it like in my example. If you wrap ' around it that tells bash it should consider the string as a literal without expanding $HOME to /home/b0ss

Offline

Board footer

Powered by FluxBB