cucumber-sp / yandex-music-linux

Linux client of Yandex Music
Other
342 stars 8 forks source link

Got "UnhandledPromiseRejectionWarning" after fresh install from AUR #73

Closed vec137 closed 5 months ago

vec137 commented 5 months ago

Full log: 20:05:15.320 (Application) › Version: 5.0.21 20:05:15.326 (Application) › Build: 5.0.21 (release-beta-21/7a470fe4) 20:05:15.332 (SingleInstance) › Single instance (node:20449) UnhandledPromiseRejectionWarning: Error: ERR_FAILED (-2) loading 'music-application://desktop' at rejectAndCleanup (node:electron/js2c/browser_init:2:78358) at finishListener (node:electron/js2c/browser_init:2:78520) at WebContents.stopLoadingListener (node:electron/js2c/browser_init:2:78907) at WebContents.emit (node:events:518:28) (Use 'electron --trace-warnings ...' to show where the warning was created) (node:20449) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) 20:05:15.857 (WindowLifecycle) › Closed

cucumber-sp commented 5 months ago

Try to remove --no-sandbox from configuration file (~/.config/yandex-music.conf)

vec137 commented 5 months ago

It didn't work, I added --trace-warnings to arguments, maybe it would be more helpful: Using config file: /home/artix/.config/yandex-music.conf 17:57:55.987 (Application) › Version: 5.0.21 17:57:55.993 (Application) › Build: 5.0.21 (release-beta-21/7a470fe4) 17:57:56.000 (SingleInstance) › Single instance [29592:0424/175756.353877:ERROR:browser_main_loop.cc(278)] Gtk: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed (node:29592) UnhandledPromiseRejectionWarning: Error: ERR_FAILED (-2) loading 'music-application://desktop' at rejectAndCleanup (node:electron/js2c/browser_init:2:74086) at WebContents.stopLoadingListener (node:electron/js2c/browser_init:2:74473) at WebContents.emit (node:events:514:28) at emitUnhandledRejectionWarning (node:internal/process/promises:201:15) at processPromiseRejections (node:internal/process/promises:297:13) at process.processTicksAndRejections (node:internal/process/task_queues:96:32) (node:29592) Error: ERR_FAILED (-2) loading 'music-application://desktop' at rejectAndCleanup (node:electron/js2c/browser_init:2:74086) at WebContents.stopLoadingListener (node:electron/js2c/browser_init:2:74473) at WebContents.emit (node:events:514:28) 17:57:56.385 (WindowLifecycle) › Closed

cucumber-sp commented 5 months ago

It's because closing the window doesn't destroy app when you click button. Which desktop environment do you use?

cucumber-sp commented 5 months ago

Fixed with https://github.com/cucumber-sp/yandex-music-linux/commit/a49b665381c6027099a0376cf65eb6912ef3e0d6 Tray is now disabled by default. If you need to enable tray mode, refer to the following section of README.md

vec137 commented 5 months ago

It still doesn't help even with disabled tray. I am using Wayland/Hyprland

cucumber-sp commented 5 months ago

It still doesn't help even with disabled tray. I am using Wayland/Hyprland

if it crashes always, you should create issue in electron repository and mention this

vec137 commented 5 months ago

Well, I could fix that by downgrading xdg-utils from 1.2.1 to 1.1.3 and now it works fine

vec137 commented 5 months ago

Also enabled tray works fine