gamingdoom / datcord

An open-source Discord client that uses Firefox and Neutron
GNU General Public License v3.0
113 stars 5 forks source link

[Bug] Datcord process remains active after closing main window #66

Closed burdoto closed 2 days ago

burdoto commented 1 week ago

When closing the main window of datcord, the process remains active; resulting in an error when trying to launch again: image

Terminating the process manually is required.

OS: archlinux 6.9.4 + KDE X11 Version: 0.5.1 (flatpak)

gamingdoom commented 1 week ago

Do you have this same issue when using version 0.5.2 from the AUR? I am still working on updating the Flatpak version.

burdoto commented 1 week ago

The problem behaves differently for the 0.5.2-1 version from AUR.

First of all, as a means of differentiating; I launched it from the commandline. Upon closing the window; the terminal thread never exited, and gave me this output:

ATTENTION: default value of option mesa_glthread overridden by environment.
console.error: "formatURLPref: Couldn't get pref: " "startup.homepage_welcome_url"
console.error: "formatURLPref: Couldn't get pref: " "startup.homepage_welcome_url.additional"
JavaScript error: resource:///modules/BrowserGlue.sys.mjs, line 1523: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getIntPref]
console.error: (new TypeError("this._searchProviderInfo is null", "resource:///modules/SearchSERPTelemetry.sys.mjs", 939))
JavaScript error: https://discord.com/assets/79892.a1a4de34025cad84c3b7.js, line 1: Error: Cannot find module './notosans-400-normalitalic.woff2'
ATTENTION: default value of option mesa_glthread overridden by environment.
App Closed!
Started headless
*** You are running in headless mode.
[GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
JavaScript error: resource:///modules/BrowserGlue.sys.mjs, line 1523: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getIntPref]
console.error: "getScreenshot(https://discord.com/app) failed:" (new Error("page-thumbnail:error", "resource://gre/modules/BackgroundPageThumbs.sys.mjs", 141))
JavaScript error: https://discord.com/assets/79892.a1a4de34025cad84c3b7.js, line 1: Error: Cannot find module './notosans-400-normalitalic.woff2'

When opening a second terminal, and again executing the datcord command, that second terminal never printed anything, and the primary terminal (which was still running the initial thread) started outputting the following:

Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
ATTENTION: default value of option mesa_glthread overridden by environment.
JavaScript error: resource:///modules/BrowserGlue.sys.mjs, line 1523: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getIntPref]
JavaScript error: https://discord.com/assets/79892.a1a4de34025cad84c3b7.js, line 1: Error: Cannot find module './notosans-400-normalitalic.woff2'
ATTENTION: default value of option mesa_glthread overridden by environment.

Datcord was able to open another window then.

I will stick with the AUR version for both this behaviour and for unification sake. Please also note that #67 also does not apply to this AUR version of Datcord.

gamingdoom commented 1 week ago

This is intended behavior. In order to deliver notifications in the background, datcord runs in headless mode. When you launch datcord while datcord is running in headless mode, it tells the first datcord to come out of the background.