Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 2.0以上ARM64版本在UOS平台上可以安装但无法打开。 #1102

Open
2 tasks done
MOSS099 opened this issue Jan 3, 2023 · 8 comments
Open
2 tasks done
Labels
bug Something isn't working upstream This is a problem caused by upstream

Comments

@MOSS099
Copy link

MOSS099 commented Jan 3, 2023

解决方案检查

预期行为

2.0以上arm64版本在UOS上可以正常安装,但打开无反应。1.22.3版本使用正常。平台为麒麟990

实际行为

在终端运行报错如下:
uos@uos-PC:~/Desktop$ /opt/lx-music-desktop/lx-music-desktop %U
Checking for beta autoupdate feature for deb/rpm distributions
Found package-type: deb
18:47:27.942 › App starting...
[25888:0103/184727.965536:ERROR:browser_main_loop.cc(271)] GLib-GObject: g_value_set_boxed: assertion 'G_VALUE_HOLDS_BOXED (value)' failed
init
Error: /tmp/.org.chromium.Chromium.5kmLfQ: æ æ³æå¼å±äº«å¯¹è±¡æ件: 没æé£ä¸ªæ件æçå½
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
at Module._extensions..node (node:internal/modules/cjs/loader:1203:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2039)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at new Database (/opt/lx-music-desktop/resources/app.asar/node_modules/better-sqlite3/lib/database.js:50:11)
at Object.init (/opt/lx-music-desktop/resources/app.asar/dist/dbService.worker.js:247:14) {
code: 'ERR_DLOPEN_FAILED'
}
Unhandled Rejection at: Promise Promise {
Error: /tmp/.org.chromium.Chromium.5kmLfQ: æ æ³æå¼å±äº«å¯¹è±¡æ件: 没æé£ä¸ªæ件æçå½
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
at Module._extensions..node (node:internal/modules/cjs/loader:1203:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2039)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at new Database (/opt/lx-music-desktop/resources/app.asar/node_modules/better-sqlite3/lib/database.js:50:11)
at Object.init (/opt/lx-music-desktop/resources/app.asar/dist/dbService.worker.js:255:14)
}
reason: Error: /tmp/.org.chromium.Chromium.5kmLfQ: æ æ³æå¼å±äº«å¯¹è±¡æ件: 没æé£ä¸ªæ件æçå½
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
at Module._extensions..node (node:internal/modules/cjs/loader:1203:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2039)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at new Database (/opt/lx-music-desktop/resources/app.asar/node_modules/better-sqlite3/lib/database.js:50:11)
at Object.init (/opt/lx-music-desktop/resources/app.asar/dist/dbService.worker.js:255:14)
18:47:28.456 › Error: /tmp/.org.chromium.Chromium.5kmLfQ: æ æ³æå¼å±äº«å¯¹è±¡æ件: 没æé£ä¸ªæ件æçå½
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
at Module._extensions..node (node:internal/modules/cjs/loader:1203:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2039)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at new Database (/opt/lx-music-desktop/resources/app.asar/node_modules/better-sqlite3/lib/database.js:50:11)
at Object.init (/opt/lx-music-desktop/resources/app.asar/dist/dbService.worker.js:255:14)
(node:25888) UnhandledPromiseRejectionWarning: Error: /tmp/.org.chromium.Chromium.5kmLfQ: æ æ³æå¼å±äº«å¯¹è±¡æ件: 没æé£ä¸ªæ件æçå½
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
at Module._extensions..node (node:internal/modules/cjs/loader:1203:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2039)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at new Database (/opt/lx-music-desktop/resources/app.asar/node_modules/better-sqlite3/lib/database.js:50:11)
at Object.init (/opt/lx-music-desktop/resources/app.asar/dist/dbService.worker.js:255:14)
(Use lx-music-desktop --trace-warnings ... to show where the warning was created)
(node:25888) 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)

Lx Music 版本

2.0.2

最后正常的版本

1.22.3

操作系统版本

UOS1042

附加信息

No response

@lyswhut
Copy link
Owner

lyswhut commented Jan 3, 2023

看起来是预编译的sqlite3模块导致的报错,不知道有没有人用这个架构的包成功在其他发行版系统跑起来,现在要验证是arm64这个架构包的问题还是只是这个系统的兼容问题,我这边没有这种架构的设备没法验证

@OortNebula
Copy link

看起来是预编译的sqlite3模块导致的报错,不知道有没有人用这个架构的包成功在其他发行版系统跑起来,现在要验证是arm64这个架构包的问题还是只是这个系统的兼容问题,我这边没有这种架构的设备没法验证

我用armbian测试也存在这个问题,可以安装但无法打开,换1.22.3就可以用,设备是斐讯N1

@lyswhut
Copy link
Owner

lyswhut commented Jan 4, 2023

我花了些时间去研究了这个,应该是这个架构的包的问题,v2.0.0的数据存储依赖了better-sqlite3,使用electron-builder为linux arm64架构预构建的better-sqlite3模块无法在election运行,但是直接在linux arm64环境下使用npm安装better-sqlite3后再rebuild的模块却可以直接用nodejs运行。

导致此问题的原因可能是electron-builder预构建该架构的模块时导致的问题,或者是better-sqlite3在linux arm64下对electron的兼容性问题

@lyswhut lyswhut added the upstream This is a problem caused by upstream label Jan 4, 2023
@lyswhut
Copy link
Owner

lyswhut commented Jan 5, 2023

继续测试发现是在Linux x64上交叉构建的arm64模块无法在目标平台上运行,在Linux arm64构建的可以运行,现在的临时解决方法是把在Linux arm64上预构建的模块在项目中,当构建目标是Linux arm64时跳过从源码构建,直接将预先构建的文件复制过去,其他架构的包仍然继续从源码构建。

@lyswhut
Copy link
Owner

lyswhut commented Jan 5, 2023

等构建完你们可以试试beta版是否已修复:https://github.com/lyswhut/lx-music-desktop/actions/workflows/beta-pack.yml

@Winnie0408
Copy link

等构建完你们可以试试beta版是否已修复:https://github.com/lyswhut/lx-music-desktop/actions/workflows/beta-pack.yml

实测最新的beta版本已经能在arm64设备上正常使用
٩۹(๑•̀ω•́ ๑)۶
Screenshot_2023-01-07-00-59-25-432_com.realvnc.viewer.android.jpg

@lyswhut
Copy link
Owner

lyswhut commented Jan 8, 2023

在v2.0.3开始采用内置预编译文件的方式修复,但这只是临时解决方案,更新Electron大版本或better-sqlite3后需要手动重新编译更新预置文件,根本原因是上游依赖或者构建环境的问题,现在暂时没时间继续去研究这个

@lingyurunxin
Copy link

在v2.0.3开始采用内置预编译文件的方式修复,但这只是临时解决方案,更新Electron大版本或better-sqlite3后需要手动重新编译更新预置文件,根本原因是上游依赖或者构建环境的问题,现在暂时没时间继续去研究这个

这么优秀的maintainer真是少见呀,对技术真是热爱!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream This is a problem caused by upstream
Projects
None yet
Development

No branches or pull requests

5 participants