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

net-im/wechat-universal-bwrap fails to launch: "bwrap: Can't find source path /run/systemd/userdb" #4490

Open
lizhuohua opened this issue Apr 7, 2024 · 11 comments · Fixed by #4489 or #4492

Comments

@lizhuohua
Copy link

wechat-universal-bwrap fails to launch on my system (using OpenRC). The error message is:

$ wechat-universal
Workaround for fcitx applied
Hint: Custom binds could be declared in '~/.config/wechat-universal/binds.list', each line a path, absolute or relative to your HOME
bwrap: Can't find source path /run/systemd/userdb: No such file or directory
@liangyongxiang
Copy link
Collaborator

Please help test the latest commits.

@lizhuohua
Copy link
Author

The error persists.

I think it is caused by the script in /usr/bin/wechat-universal, lines 139-144:

# /run
--dev-bind /run/dbus{,}
--ro-bind /run/systemd/userdb{,}
--ro-bind-try "${XAUTHORITY}"{,}
--ro-bind "${XDG_RUNTIME_DIR}/bus"{,}
--ro-bind "${XDG_RUNTIME_DIR}/pulse"{,}

The script tries to bind /run/systemd/userdb and /run/user/1000/bus, which do not exist in my system.

If I comment out lines 141 (--ro-bind /run/systemd/userdb{,}) and 143 (--ro-bind "${XDG_RUNTIME_DIR}/bus"{,}), WeChat can launch but I suspect this may affect functionalities.

Have you tested it on OpenRC? I am not sure whether this is a bug or an issue with my own system.

@liangyongxiang liangyongxiang reopened this Apr 7, 2024
@liangyongxiang
Copy link
Collaborator

@xen0n

@oatiz
Copy link
Contributor

oatiz commented Apr 7, 2024

--ro-bind /run/systemd/userdb{,}

Please use --ro-bind-try /run/systemd/userdb{,}

@liangyongxiang
Copy link
Collaborator

liangyongxiang commented Apr 7, 2024

@lizhuohua Can you test this pr?

This is the main command:

emerge github-cli
gh auth login

cd /var/db/repos/gentoo-zh
gh pr checkout 4492
emerge net-im/wechat-universal-bwrap

# restore
git checkout master

@lizhuohua
Copy link
Author

@liangyongxiang Now it works. Thank you very much!

Although it still outputs some errors:

$ wechat-universal
Workaround for fcitx applied
Hint: Custom binds could be declared in '~/.config/wechat-universal/binds.list', each line a path, absolute or relative to your HOME
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
libpng warning: iCCP: known incorrect sRGB profile

I will use it for a while to see if there are any missing functionalities.

@liangyongxiang
Copy link
Collaborator

@liangyongxiang Now it works. Thank you very much!

Although it still outputs some errors:

$ wechat-universal
Workaround for fcitx applied
Hint: Custom binds could be declared in '~/.config/wechat-universal/binds.list', each line a path, absolute or relative to your HOME
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
libpng warning: iCCP: known incorrect sRGB profile

I will use it for a while to see if there are any missing functionalities.

Under systemd it has the same output.

@vastchen
Copy link

vastchen commented Apr 7, 2024

不能点击公众号和链接。

@liangyongxiang liangyongxiang reopened this Apr 7, 2024
@liangyongxiang
Copy link
Collaborator

我这里 视频号 看一看 搜一搜 小程序 公众号 点击都没用。

@st0nie
Copy link
Contributor

st0nie commented Apr 7, 2024

这边也是

@qifly
Copy link
Contributor

qifly commented Apr 25, 2024

@liangyongxiang Now it works. Thank you very much!

Although it still outputs some errors:

$ wechat-universal
Workaround for fcitx applied
Hint: Custom binds could be declared in '~/.config/wechat-universal/binds.list', each line a path, absolute or relative to your HOME
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
/opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx: error while loading shared libraries: libilink_network.so: cannot open shared object file: No such file or directory
libpng warning: iCCP: known incorrect sRGB profile

I will use it for a while to see if there are any missing functionalities.

uu@gt /opt/wechat-universal/RadiumWMPF/runtime $ ldd WeChatAppEx
	linux-vdso.so.1 (0x00007ffc135e3000)
	libffmpeg.so => /opt/wechat-universal/RadiumWMPF/runtime/./libffmpeg.so (0x00007e8d60000000)
	libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007e8d6acb0000)
	libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007e8d6acab000)
	libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007e8d6ac4a000)
	libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007e8d606bc000)
	libnss3.so => /usr/lib64/libnss3.so (0x00007e8d5fec4000)
	libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007e8d6ac16000)
	libnspr4.so => /usr/lib64/libnspr4.so (0x00007e8d6abd5000)
	libgio-2.0.so.0 => /usr/lib64/libgio-2.0.so.0 (0x00007e8d5fcdb000)
	libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007e8d60692000)
	libm.so.6 => /usr/lib64/libm.so.6 (0x00007e8d5fbfd000)
	libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007e8d5fabb000)
	libXcomposite.so.1 => /usr/lib64/libXcomposite.so.1 (0x00007e8d6abce000)
	libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007e8d6abc9000)
	libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007e8d6067d000)
	libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007e8d60675000)
	libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007e8d60668000)
	libgbm.so.1 => /usr/lib64/libgbm.so.1 (0x00007e8d60657000)
	libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3 (0x00007e8d5fa6e000)
	libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007e8d60641000)
	libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007e8d5fa44000)
	libxkbcommon.so.0 => /usr/lib64/libxkbcommon.so.0 (0x00007e8d5f9fc000)
	libpango-1.0.so.0 => /usr/lib64/libpango-1.0.so.0 (0x00007e8d5f992000)
	libcairo.so.2 => /usr/lib64/libcairo.so.2 (0x00007e8d5f84f000)
	libatk-1.0.so.0 => /usr/lib64/libatk-1.0.so.0 (0x00007e8d5f826000)
	libatk-bridge-2.0.so.0 => /usr/lib64/libatk-bridge-2.0.so.0 (0x00007e8d5f7ea000)
	libasound.so.2 => /usr/lib64/libasound.so.2 (0x00007e8d5f700000)
	libatspi.so.0 => /usr/lib64/libatspi.so.0 (0x00007e8d5f6c6000)
	libilink2.so => /opt/wechat-universal/RadiumWMPF/runtime/./libilink2.so (0x00007e8d5f569000)
	libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libgcc_s.so.1 (0x00007e8d5f544000)
	libc.so.6 => /usr/lib64/libc.so.6 (0x00007e8d5f36a000)
	/lib64/ld-linux-x86-64.so.2 (0x00007e8d6accd000)
	libffi.so.8 => /usr/lib64/libffi.so.8 (0x00007e8d60631000)
	libpcre2-8.so.0 => /usr/lib64/libpcre2-8.so.0 (0x00007e8d5f2ce000)
	libplc4.so => /usr/lib64/libplc4.so (0x00007e8d6062a000)
	libplds4.so => /usr/lib64/libplds4.so (0x00007e8d60623000)
	libgmodule-2.0.so.0 => /usr/lib64/libgmodule-2.0.so.0 (0x00007e8d5f2c7000)
	libz.so.1 => /usr/lib64/libz.so.1 (0x00007e8d5f2ad000)
	libmount.so.1 => /usr/lib64/libmount.so.1 (0x00007e8d5f242000)
	libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007e8d5f235000)
	libwayland-server.so.0 => /usr/lib64/libwayland-server.so.0 (0x00007e8d5f21f000)
	libxcb-randr.so.0 => /usr/lib64/libxcb-randr.so.0 (0x00007e8d5f20e000)
	libsystemd.so.0 => /usr/lib64/libsystemd.so.0 (0x00007e8d5f10e000)
	libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007e8d5f109000)
	libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007e8d5f101000)
	libfribidi.so.0 => /usr/lib64/libfribidi.so.0 (0x00007e8d5f0e1000)
	libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007e8d5efb1000)
	libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007e8d5ef7a000)
	libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007e8d5ef2e000)
	libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007e8d5ee69000)
	libxcb-render.so.0 => /usr/lib64/libxcb-render.so.0 (0x00007e8d5ee5a000)
	libxcb-shm.so.0 => /usr/lib64/libxcb-shm.so.0 (0x00007e8d5ee55000)
	libpixman-1.so.0 => /usr/lib64/libpixman-1.so.0 (0x00007e8d5edab000)
	libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007e8d5ed96000)
	libilink_network.so => not found
	libilink_protobuf.so => not found
	libowl.so => /lib64/libowl.so (0x00007e8d5eca3000)
	libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libstdc++.so.6 (0x00007e8d5ea00000)
	libblkid.so.1 => /usr/lib64/libblkid.so.1 (0x00007e8d5e9a3000)
	libcap.so.2 => /usr/lib64/libcap.so.2 (0x00007e8d5ec95000)
	libgcrypt.so.20 => /usr/lib64/libgcrypt.so.20 (0x00007e8d5e88b000)
	liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007e8d5ec70000)
	libzstd.so.1 => /usr/lib64/libzstd.so.1 (0x00007e8d5e7ca000)
	libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007e8d5e7a4000)
	libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007e8d5e791000)
	libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007e8d5e769000)

上面命令的结果显示找不到libilink_network.so和libilink_protobuf.so两个库,但是浏览/opt/wechat-universal/RadiumWMPF/runtime文件夹可以看到两个文件都在的。
再看提示出错的libilink_network.so

uu@gt /opt/wechat-universal/RadiumWMPF/runtime $ ldd libilink_network.so
ldd: 警告:你没有执行权限  `./libilink_network.so'
	linux-vdso.so.1 (0x00007ffdc9b61000)
	libowl.so => not found
	libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x000079642d251000)
	libdl.so.2 => /usr/lib64/libdl.so.2 (0x000079642d24c000)
	libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libstdc++.so.6 (0x000079642c400000)
	libm.so.6 => /usr/lib64/libm.so.6 (0x000079642d16e000)
	libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/13/libgcc_s.so.1 (0x000079642d147000)
	libc.so.6 => /usr/lib64/libc.so.6 (0x000079642c226000)
	/lib64/ld-linux-x86-64.so.2 (0x000079642d26e000)

同样的情况,提示找不到libowl.so,但是浏览/opt/wechat-universal/RadiumWMPF/runtime文件夹也可以看到libowl.so。

猜想,尝试

doas ln -sf /opt/wechat-universal/RadiumWMPF/runtime/libowl.so /usr/lib64/
doas ln -sf /opt/wechat-universal/RadiumWMPF/runtime/libilink_network.so /usr/lib64
doas ln -sf /opt/wechat-universal/RadiumWMPF/runtime/libilink_protobuf.so /usr/lib64

做了软链接后,再没有上文的错误提示,公众号可以浏览了,小程序也可以使用了。

更好的做法,应该是通过LD_LIBRARY_PATH环境变量来解决。通过尝试,在/usr/bin/wechat-universal中BWRAP_ENV_APPEND=()
之后加入
env_add LD_LIBRARY_PATH "$LD_LIBRARY_PATH:/opt/wechat-universal/RadiumWMPF/runtime"
测试再不报错,公众号可以浏览了,小程序也可以使用了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants