qier222 / YesPlayMusic

高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:
https://music.qier222.com
MIT License
28.46k stars 4.18k forks source link

Cant use it in wayland gnome. #1814

Closed NEX-S closed 1 year ago

NEX-S commented 1 year ago

image

Linux UNEXPECTED 5.19.11-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Sat, 24 Sep 2022 18:24:22 +0000 x86_64 GNU/Linux
                   -`                    nex@UNEXPECTED
                  .o+`                   --------------
                 `ooo/                   OS: Arch Linux x86_64
                `+oooo:                  Host: ASUSTeK COMPUTER INC. ROG MAXIMUS XI HERO (WI-FI)
               `+oooooo:                 Kernel: 5.19.11-zen1-1-zen
               -+oooooo+:                Uptime: 31 mins
             `/:-:++oooo+:               Packages: 1305 (pacman)
            `/++++/+++++++:              Shell: fish 3.5.1-420-gd065ea31a
           `/++++++++++++++:             Resolution: 3440x1440, 2560x1440
          `/+++ooooooooooooo/`           DE: GNOME 42.5 (Wayland)
         ./ooosssso++osssssso+`          WM: Mutter
        .oossssso-````/ossssss+`         WM Theme: WhiteSur-Dark-yellow-nord
       -osssssso.      :ssssssso.        Theme: WhiteSur-Dark-yellow [GTK2/3]
      :osssssss/        osssso+++.       Icons: NEX-DARK [GTK2/3]
     /ossssssss/        +ssssooo/-       Terminal: alacritty
   `/ossssso+/:-        -:/+osssso+-     Terminal Font: 'CodeNewRoman Nerd Font Mono'
  `+sso+:-`                 `.-/+oso:    CPU: Intel i9-9900K (16) @ 5.000GHz
 `++:.                           `-/+/   GPU: NVIDIA GeForce RTX 2080 Ti Rev. A
 .`                                 `/   Memory: 4021MiB / 15907MiB
NEX-S commented 1 year ago

it usually works in Xorg, but not in Wayland.

tksmly commented 1 year ago

it usually works in Xorg, but not in Wayland.

实测在wayland加上--no-sandbox可以正常使用

NEX-S commented 1 year ago

it usually works in Xorg, but not in Wayland.

实测在wayland加上--no-sandbox可以正常使用

原谅本人没文化,一句牛逼行天下

danzou1ge6 commented 1 year ago

我在 KDE 5.26 + Wayland 下遇到了相同的问题,并且用 --no-sandbox 暂时解决了. 但是,--no-sandbox 听起来很危险. 查找了一些资料后我发现,大多数人都不推荐使用它. 所以,有没有其他的解决方法? (或者有没有人能向我解释为什么 --no-sandbox 在这里是安全的)

I experienced same issue in KDE 5.26 + Wayland, and fixed it using --no-sandbox. But, --no-sandbox sounds dangerous to me, and after some researching I found that it's not recommended by most people. Therefore, is there a way to fix the issue without using such a terrible work-around? (Or if someone can convince me that it's safe to run this application --no-sandbox?)

tksmly commented 1 year ago

我在 KDE 5.26 + Wayland 下遇到了相同的问题,并且用 --no-sandbox 暂时解决了. 但是,--no-sandbox 听起来很危险. 查找了一些资料后我发现,大多数人都不推荐使用它. 所以,有没有其他的解决方法? (或者有没有人能向我解释为什么 --no-sandbox 在这里是安全的)

I experienced same issue in KDE 5.26 + Wayland, and fixed it using --no-sandbox. But, --no-sandbox sounds dangerous to me, and after some researching I found that it's not recommended by most people. Therefore, is there a way to fix the issue without using such a terrible work-around? (Or if someone can convince me that it's safe to run this application --no-sandbox?)

正常情况下--no-sandbox确实不安全,但是YesPlayMusic是开源项目所以无需担心. 这一问题也许是由于过低的electron版本,亦或是一言难尽的nv驱动,如果你是nv显卡,建议等wayland成熟后再使用.

danzou1ge6 commented 1 year ago

谢谢答复. 我现在使用系统上安装的 electron19 直接执行 app.asar ,目前还没有遇到兼容性问题.

microcai commented 1 year ago

no-sandbox 加了也不行啊. 段错误. 崩了

[background.js] initializing
[NetEase API] initiating NCM API
[background.js] creating express app
(node:69925) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `yesplaymusic --trace-deprecation ...` to show where the warning was created)
server running @ http://localhost:10754
[background.js] app ready event
[background.js] creating app window
[background.js] checkForUpdates
Checking for update
[globalShortcut.js] registerGlobalShortcut
[1]    69925 trace trap (core dumped)  ./yesplaymusic --enable-features=UseOzonePlatform --ozone-platform=wayland   
tksmly commented 1 year ago

no-sandbox 加了也不行啊. 段错误. 崩了

[background.js] initializing
[NetEase API] initiating NCM API
[background.js] creating express app
(node:69925) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `yesplaymusic --trace-deprecation ...` to show where the warning was created)
server running @ http://localhost:10754
[background.js] app ready event
[background.js] creating app window
[background.js] checkForUpdates
Checking for update
[globalShortcut.js] registerGlobalShortcut
[1]    69925 trace trap (core dumped)  ./yesplaymusic --enable-features=UseOzonePlatform --ozone-platform=wayland   

no-sandbox可以让electron运行在xwayland上,所以去掉后面的参数