qq音乐linux报错

Source: feipeng8848

I installed an entertainment app on the Ubuntu 22.04 with 2K (2560*1440) screen, it crashed with these errors:

$ qqmusic
(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false".  It will change to be "true" in Electron 9.  For more information please check https://github.com/electron/electron/issues/18397
(node:1859629) UnhandledPromiseRejectionWarning: undefined
(node:1859629) UnhandledPromiseRejectionWarning: undefined
(node:1859629) 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(). (rejection id: 1)
(node:1859629) 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(). (rejection id: 1)
(node:1859629) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:1859629) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
login refresh fail
(node:1859629) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
(node:1859629) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
(electron) 'setUserAgent function' is deprecated and will be removed. Please use 'userAgent property' instead.
[1859629:0703/100159.399913:FATAL:gpu_data_manager_impl_private.cc(1034)] The display compositor is frequently crashing. Goodbye.
Trace/breakpoint trap (core dumped)

It will work normally by running:

$ qqmusic --no-sandbox

So I added --no-sandbox in qqmusic.desktop under /usr/share/applications, if it is not system-wide applications, you need to navigate to user-specific applications path: ~/.local/share/applications/

[Desktop Entry]                                                                                                                              
Name=qqmusic
Exec=/opt/qqmusic/qqmusic %U --no-sandbox
Terminal=false
Type=Application
Icon=qqmusic
StartupWMClass=qqmusic
Comment=Tencent QQMusic
Categories=AudioVideo;

And to make this changes take effect, I pressed Alt + F2 for GNOME and entered r to reload the desktop environment, you could also try log out and log back in.