Skip to content

macOS init: document full re-sign and TCC reset flow after task_for_pid failures #111

Description

@Daily-AC

On macOS I hit a complete init recovery path that seems worth documenting more explicitly.

Observed flow:

  1. wx init first failed with task_for_pid kr=5.
  2. Re-signing WeChat could fail until all WeChat-related processes were fully stopped.
  3. Clearing extended attributes with sudo xattr -cr /Applications/WeChat.app helped make the ad-hoc re-sign path reliable.
  4. After re-signing, resetting TCC entries for com.tencent.xinWeChat was important before reopening WeChat.
  5. After reopening WeChat and logging in, sudo wx init succeeded and extracted keys correctly.

The working sequence on my machine was:

killall WeChat WeChatAppEx "WeChatAppEx Helper" "WeChatAppEx Helper (GPU)" "WeChatAppEx Helper (Renderer)" wxocr wxplayer wxutility crashpad_handler Autoupdate Installer Updater 2>/dev/null
sudo xattr -cr /Applications/WeChat.app
sudo codesign --force --deep --sign - /Applications/WeChat.app
for s in ScreenCapture Camera Microphone AppleEvents AddressBook SystemPolicyDocumentsFolder SystemPolicyDownloadsFolder SystemPolicyDesktopFolder; do
tccutil reset "$s" com.tencent.xinWeChat
done
open /Applications/WeChat.app
sudo wx init

Suggestion:

  • document this full recovery path in README and the macOS permission guide
  • make wx init error messages distinguish more clearly between not-root, not-resigned, app-still-running, and TCC-related follow-up steps

This would likely reduce trial-and-error for macOS users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions