天天看點

WDA問題混總

文章目錄

    • unable to access DB:
    • WebDriverAgentLib codesign失敗
    • WebDriverAgentLib codesign failure.
    • dyld_shared_cache_extract_dylibs failed
    • Could not connect to lockdownd, error code -19
    • 執行./autogen.sh,報錯No package 'libplist' found
  1. unable to access DB:

WDA問題混總

多個xcode線程在跑,殺掉xcode, 殺掉xcodebuild程序 , clean

  1. WebDriverAgentLib codesign失敗

環境:

mac 10.14.5

xcode 10.3

報錯: Command Codesign failed with a nonzero exit code… The bundle identifier for WebDriverAgentRunner-Runner.app couldn’t be read

WDA問題混總
WDA問題混總

背景: 更換了provision file, 導緻WebdriverAgetnLib codesign失敗。而使用xcode IDE 運作是沒問題的。

解決: 重新開機MAC。 猜測, 可能系統有關, xcodebuild指令執行時沒有對變動後的描述檔案識别,遲鈍,未生效。

  1. WebDriverAgentLib codesign failure.

library no loaded.

No suitable image found

WDA問題混總
WDA問題混總

背景:更改了bundleid和provision file。 xcode IDE 運作WDA正常, xcodebuild 指令行報錯。

解決: 對WebDriverAgentLib的info.plist 設定bundleid與WebDriverAgentRunner一緻,且 product bundle identifier也一緻,不要空着。 code signing identity - Debug - Any ios sdk指定為具體的iphone developer: who (xxxx)

  1. dyld_shared_cache_extract_dylibs failed

第一種方法:

  • go to window-devices and simulators
  • select the unrunable device and right click, then choose unpair
  • now this is the crucial part, your device will ask for trust automatically, dont click trust
  • focus back to the device panel, left click the + and add the device, click next, it will ask you to tap the “trust” IN THE PANEL
  • now you can tap the “trust” in your phone, the panel will say phone added successfully

第二種方法:

  • go to ~/Library/Developer/Xcode/iOS DeviceSupport/13.2/Symbols/System/Library/Caches/com.apple.dyld
  • create empty file if it is not there -

    .processed_dyld_shared_cache_arm64e

  • restart xcode and enjoy!

第三種方法:

  • unpair device (like carusd.ljt did), quit xcode
  • delete /Users/{username}/Library/Developer/Xcode/iOS DeviceSupport folder
  • rerun xcode, reconnect iphone, wait for it prepared, run the app.
  1. Could not connect to lockdownd, error code -19

如果隻是單個手機連不上,顯示該錯誤。 去到/var/db/lockdown,看下有沒有該手機的.plist,沒有則從其他連過該手機的Mac電腦該目錄下拷貝過來。解決。

如果所有手機都連不上, 解除安裝更新重裝libimobileservice

brew uninstall ideviceinstaller -g

brew uninstall libimobiledevice -g

brew install --HEAD libimobiledevice -g

brew install ideviceinstaller -g

sudo chmod -R 777 /var/db/lockdown

  1. 執行./autogen.sh,報錯No package ‘libplist’ found

編譯usbmuxd源碼,執行 ./autogen.sh 報錯

checking for libplist >= 1.11... no
configure: error: Package requirements (libplist >= 1.11) were not met:

No package 'libplist' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables libplist_CFLAGS
and libplist_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
           

可以在終端輸入

export libplist_LIBS=/usr/local/opt/libplist/lib/libplist-2.0.dylib
export libplist_CFLAGS=/usr/local/opt/libplist/lib/libplist-2.0.a
           

或者在.bash_profile裡配置

然後再執行./autogen.sh