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

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

Closed
panxlhe opened this issue Sep 14, 2021 · 26 comments

Comments

@panxlhe
Copy link

panxlhe commented Sep 14, 2021

image

image

@sunnyyoung
Copy link
Owner

  1. 保证 /Applications/WeChat.app/Contents/MacOS/WeChat 文件存在
  2. 执行 codesign -dvvv /Applications/WeChat.app 看看结果

@panxlhe
Copy link
Author

panxlhe commented Sep 14, 2021

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

@sunnyyoung
Copy link
Owner

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

@panxlhe
Copy link
Author

panxlhe commented Sep 14, 2021

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

@sunnyyoung
Copy link
Owner

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

@panxlhe
Copy link
Author

panxlhe commented Sep 14, 2021

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

@sunnyyoung
Copy link
Owner

sunnyyoung commented Sep 14, 2021

brew upgrade wechattweak-cli --cask

确保更新到最新

@sunnyyoung
Copy link
Owner

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

@panxlhe
Copy link
Author

panxlhe commented Sep 17, 2021

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

@panxlhe
Copy link
Author

panxlhe commented Sep 17, 2021

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

@sunnyyoung
Copy link
Owner

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

@panxlhe
Copy link
Author

panxlhe commented Sep 17, 2021

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

@panxlhe
Copy link
Author

panxlhe commented Sep 20, 2021

image

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

@panxlhe
Copy link
Author

panxlhe commented Sep 20, 2021

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

@mayouzi
Copy link

mayouzi commented Oct 19, 2021

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

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

@panxlhe
Copy link
Author

panxlhe commented Oct 19, 2021

重装解决的。

@sunnyyoung
Copy link
Owner

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

@panxlhe
Copy link
Author

panxlhe commented Oct 19, 2021

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

@mayouzi
Copy link

mayouzi commented Oct 20, 2021

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

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

@BenjaminX
Copy link

BenjaminX commented Nov 1, 2021

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
Copy link

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

再次强制签名解决问题了

@p0we7
Copy link

p0we7 commented Nov 12, 2021

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
Copy link

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
Copy link

p0we7 commented Nov 16, 2021

重新签名没成功

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

@p0we7
Copy link

p0we7 commented Dec 18, 2021


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

强制重签名:

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
Copy link

onns commented Dec 19, 2021

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

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

No branches or pull requests

6 participants