SpacingBat3 / WebCord

A Discord and SpaceBar :electron:-based client implemented without Discord API.
MIT License
1.88k stars 93 forks source link

Webcord doesn't open - Session can only be received when app is ready #461

Closed astonish-g closed 11 months ago

astonish-g commented 11 months ago

Acknowledgements

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

I can't open the app

Application version

4.4.0 r866.976e123-1

Bug description

Hello,

Since three or four days, when I try to open Webcord, the application does not open and it gives this error in a popup window:

The title of the window: Session can only be received when app is ready Text: at Object. (sources/code/common/main.ts:354:11)

I am using the Webcord-vencord-git version because the other versions do not work on my system. I am unable to get past the log-in screen and this version has worked flawlessly till now. On the dialog window, when I click on ignore, it still doesn't open the app. And abort closes the dialog window.

Sorry if it was an easily resolvable issue for an experienced Linux user, but I thought that this could be a bug so in case it is, I wanted to report it.

I have the same issue on my both laptops running EndevourOS with Hyprland. One with AMD 6800HS cpu and integrated GPU, and the other one with AMD 5800H cpu and Nvidia RTX Gpu.

I am also attaching a screenshot of the dialog window.

Also if it helps, when I am trying to open it from terminal by typing webcord, I receive these messages:

❯ webcord App threw an error during load TypeError: Session can only be received when app is ready at Object.get defaultSession [as defaultSession] (node:electron/js2c/browser_init:2:61594) at Object.<anonymous> (/usr/share/webcord/app.asar/sources/code/common/main.ts:354:11) at Module._compile (node:internal/modules/cjs/loader:1269:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1324:10) at Module.load (node:internal/modules/cjs/loader:1124:32) at Module._load (node:internal/modules/cjs/loader:965:12) at Function.f._load (node:electron/js2c/asar_bundle:2:13330) at loadApplicationPackage (/usr/lib/electron25/resources/default_app.asar/main.js:121:16) at Object.<anonymous> (/usr/lib/electron25/resources/default_app.asar/main.js:233:9) at Module._compile (node:internal/modules/cjs/loader:1269:14)

May be this could help.

Thank you for your attention.

Additional context

Webcord_bug

SpacingBat3 commented 11 months ago

First of all, I couldn't reproduce this issue. Also the code trace points to this: https://github.com/SpacingBat3/WebCord/blob/976e123ba62ca215b61985bf4acf6e116493a855/sources/code/common/main.ts#L354 …which isn't very helpful, since there's no reference to any Session class here. Given I'm pretty sure you used webcord-git from AUR, I'll take a look how it behaves here and what JS code it generates as a reference.

SpacingBat3 commented 11 months ago

Electron version

I can't open the app

That'll be really useful to be filled here, with AUR package you might check it with pacman -Qi webcord-git as this AUR package uses system Electron binary.

bash-ful commented 11 months ago

from the webcord-vencord-git aur page: https://aur.archlinux.org/packages/webcord-vencord-git#comment-932328

i believe it's specific to this package, as like the commenter there, other webcord packages like webcord-git work fine for me, and the error only appears on webcord-vencord-git.

pacman -Qi webcord-vencord-git shows that it depends on electron which itself depends on electron25 which i think is the latest on arch's official repo

SpacingBat3 commented 11 months ago

I guess I'll close this then (I don't support mods like this now). I suppose vencord package just adds a refference to Session in its PKBUILD that launches before ready event in Electron (I saw sed command doing that in PKGBUILD).

Given I think it uses (unpacked, non-crx) Chromium extensions feature in Electron and these WebCord can load in debug builds from ~/.config/WebCord/Chrome, most likely you'll be able to use that instead of this package.