sunnyyoung / WeChatTweak-macOS

A dynamic library tweak for WeChat macOS - 首款微信 macOS 客户端撤回拦截与多开 🔨
https://tweaks.app
Apache License 2.0
11.21k stars 1.38k forks source link

微信3.2.0 m1 MacBook pro 使用brew方式安装显示文件包损坏无法打开 #330

Closed panxlhe closed 2 years ago

panxlhe commented 3 years ago
image image
sunnyyoung commented 3 years ago
  1. 保证 /Applications/WeChat.app/Contents/MacOS/WeChat 文件存在
  2. 执行 codesign -dvvv /Applications/WeChat.app 看看结果
panxlhe commented 3 years ago

针对1,发现安装以后该文件消失,后来我从备份处粘贴进来,执行第二步 得到以下结果

image

依旧无法打开

sunnyyoung commented 3 years ago

是 App Store 下载的么?看着安装成功…… 尝试删掉重新下载 App 再安装试试

panxlhe commented 3 years ago

是的,我已经重复操作起码5次了,有点懵

sunnyyoung commented 3 years ago

😂 我也是 M1,但是没有复现,是用最新版 CLI 吗,1.1 的。

panxlhe commented 3 years ago

image shi使用这条命令安装的是1.1么?

sunnyyoung commented 3 years ago
brew upgrade wechattweak-cli --cask

确保更新到最新

sunnyyoung commented 3 years ago

FAQ 已更新,可参考下:https://github.com/Sunnyyoung/WeChatTweak-macOS#faq

panxlhe commented 3 years ago

重新操作之后显示, image 这个该如何处理

panxlhe commented 3 years ago

尝试重新卸载tweak,再安装之后依旧出现了,这个问题

sunnyyoung commented 3 years ago

@panxlhe 请问是 --uninstall 之后 --install 还是不行吗?

panxlhe commented 3 years ago

install之后就出现这个问题,uninstall之后就可以打开

panxlhe commented 3 years ago
image

安装过程,安装了之后就无法打开了,最后又卸载了

panxlhe commented 3 years ago

重新安装了下mac os,成功了。 我觉得问题可能是,跟之前装的一些python库冲突了。

mayouzi commented 2 years ago

重新安装了下mac os,成功了。 我觉得问题可能是,跟之前装的一些python库冲突了。

请问你最后是怎么解决的呢? 重装了macOS? 这么狠吗

panxlhe commented 2 years ago

重装解决的。

sunnyyoung commented 2 years ago

=。= 一般重装一下插件,或者重启下电脑就行了。没有依赖到 Python 相关,应该不会和 Python 冲突才对。

panxlhe commented 2 years ago

之前装过好几次,也重启了好几次,都没解决,一怒之下emmm...就重装了

mayouzi commented 2 years ago

=。= 一般重装一下插件,或者重启下电脑就行了。没有依赖到 Python 相关,应该不会和 Python 冲突才对。

官网下载的最新版 3.2.1版本试了下,重装了几次也不行,3.2.1版本对于install插件后提示“损坏”的问题,有解决办法吗?

BenjaminX commented 2 years ago

codesign -dvvv /Applications/WeChat.app Executable=/Applications/WeChat.app/Contents/MacOS/WeChat Identifier=WeChat-555549441dec0269176137f6a8ef00d2c5054aab Format=app bundle with Mach-O universal (x86_64 arm64) CodeDirectory v=20400 size=743016 flags=0x2(adhoc) hashes=23213+2 location=embedded Hash type=sha256 size=32 CandidateCDHash sha1=bd64947ae9fe3b6a4f1820d16d45ba931e164229 CandidateCDHashFull sha1=bd64947ae9fe3b6a4f1820d16d45ba931e164229 CandidateCDHash sha256=ffdb96f8d3614d8ebb735a0a5868d19c34b2ec52 CandidateCDHashFull sha256=ffdb96f8d3614d8ebb735a0a5868d19c34b2ec52660858952dad7eb4c579ac73 Hash choices=sha1,sha256 CMSDigest=f34f9580d4431cea20708e176bdcc5b6ba36c1c299450dd8381e96c339cba929 CMSDigestType=2 CDHash=ffdb96f8d3614d8ebb735a0a5868d19c34b2ec52 Signature=adhoc Info.plist=not bound TeamIdentifier=not set Sealed Resources=none Internal requirements count=0 size=12

➜ ~ open /Applications/WeChat.app The application cannot be opened for an unexpected reason, error=Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600001245800 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}

报错是这个信息

安装等看起来都是对的。

BenjaminX commented 2 years ago

sudo codesign --force --deep --sign - /Applications/WeChat.app

再次强制签名解决问题了

p0we7 commented 2 years ago

sudo codesign --force --deep --sign - /Applications/WeChat.app

重签名我也依然不行,签名提示如下。

a@Mac-mini /Applications % sudo codesign --force --deep --sign - /Applications/WeChat.app

/Applications/WeChat.app: replacing existing signature
/Applications/WeChat.app: the codesign_allocate helper tool cannot be found or used

命令行启动错误如下:

a@Mac-mini /Applications % open WeChat.app 
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10826 "kLSNoLaunchPermissionErr: User doesn't have permission to launch the app (managed networks)" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=2436, NSUnderlyingError=0x12d615dc0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x12d612590 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 153}}}}}
a@Mac-mini /Applications % 

wechattweak-cli 已经是最新版:

a@Mac-mini /Applications % brew upgrade wechattweak-cli --cask
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
kube-score     kubeval        libxls         pip-tools      tailscale      tfmigrate      tilt           urlwatch
==> Updated Formulae
Updated 323 formulae.

wechattweak-cli --uninstall 后正常打开没问题。

M1 Mac Mini , Big Sur 11.6 微信也重装过3次,重启电脑也试过。


更新

使用微信官网 DMG 重装微信之后,出现文件损坏错误。

BenjaminX commented 2 years ago

sudo codesign --force --deep --sign - /Applications/WeChat.app

重签名我也依然不行,签名提示如下。

a@Mac-mini /Applications % sudo codesign --force --deep --sign - /Applications/WeChat.app

/Applications/WeChat.app: replacing existing signature
/Applications/WeChat.app: the codesign_allocate helper tool cannot be found or used

命令行启动错误如下:

a@Mac-mini /Applications % open WeChat.app 
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10826 "kLSNoLaunchPermissionErr: User doesn't have permission to launch the app (managed networks)" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=2436, NSUnderlyingError=0x12d615dc0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x12d612590 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 153}}}}}
a@Mac-mini /Applications % 

wechattweak-cli 已经是最新版:

a@Mac-mini /Applications % brew upgrade wechattweak-cli --cask
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
kube-score     kubeval        libxls         pip-tools      tailscale      tfmigrate      tilt           urlwatch
==> Updated Formulae
Updated 323 formulae.

wechattweak-cli --uninstall 后正常打开没问题。

M1 Mac Mini , Big Sur 11.6 微信也重装过3次,重启电脑也试过。

更新

使用微信官网 DMG 重装微信之后,出现文件损坏错误。

重新签名没成功

p0we7 commented 2 years ago

重新签名没成功

换了官网版本,签名成功也一样不行。

p0we7 commented 2 years ago


没有权限来打开应用程序解决办法

强制重签名:

sudo codesign --force --deep --sign - /Applications/WeChat.app

运行上面命令后如果出现如下错误:

/Applications/WeChat.app: replacing existing signature
/Applications/WeChat.app: the codesign_allocate helper tool cannot be found or used

可以尝试这个链接的解决办法检查 codesign_allocate是否不存在或有其他程序正在使用。

然后 reset 一下 xcode (来源)

sudo xcode-select --reset

reset 完毕后可能需要等几分钟,然后再次运行强制重签名命令,如果重签名正常则微信应该可以正常打开。

上面的步骤执行后,如果依然签名失败,尝试重启一次后再签名。



重签名成功的提示如下:

a@Mac-mini /Applications % sudo codesign --force --deep --sign - /Applications/WeChat.app
/Applications/WeChat.app: replacing existing signature
a@Mac-mini /Applications % 
onns commented 2 years ago

好像真的需要重启一次,我重启解决了= =