?? 編譯時報錯:Could not build module 'RoutingHTTPServer'
解決:進入appium-webdriveragent目錄,重新執(zhí)行:
? ? ? ? ????$?sh ./Scripts/bootstrap.sh
?? 運行報錯如下:'assign' property of object type may become a dangling reference; consider using 'unsafe_unretained'
? ?----解決:將 assign 改為 strong ,并重新build,如下的兩個錯誤同步解決掉 ??


?? 運行報錯,讓設(shè)置滾動時間,如:offset += MAX(scrollingTime, FBMinimumTouchEventDelay); // Setting Minimum scrolling time to avoid testmanager complaining about timing
----解決:把”FBMinimumTouchEventDelay“ 設(shè)置為實踐,比如3000,再次運行無此錯誤。

??運行報錯,/Users/Cathleen/xcode_workspace/WebDriverAgent/WebDriverAgent.xcodeproj User-supplied CFBundleIdentifier value 'com.facebook.wda.runner' in the Info.plist must be the same as the PRODUCT_BUNDLE_IDENTIFIER build setting value 'com.facebook.WebDriverAgentRunner.xcodetest'.


----解決:如下圖所示:


再次運行無提示性錯誤了
??WebDriverAgent編譯成功并安裝demo后,卸載后第二次在編譯雖然編譯成功但未安裝:
-----解決:執(zhí)行product--test,或者如下圖:

??(product> test)編譯成功且控制臺輸出了WDA的url,然后復(fù)制url到輸入在瀏覽器中,發(fā)現(xiàn)無法訪問


----解決:有些iPhone,據(jù)說是國產(chǎn)的原因或者ios10以后版本,直接使用ip不能連接手機(即輸入打印出來的url無法顯示手機界面),需要使用libimobiledevice?進行如下端口轉(zhuǎn)發(fā),轉(zhuǎn)發(fā)后輸入http://localhost:MacHost即可訪問:
端口轉(zhuǎn)發(fā)命令:$ iproxy macPort?iPhonePort?[UDID]
//macPort,mac上閑置的端口
//iPhonePort,手機設(shè)置的端口
//[UDID],手機的UDID,一臺設(shè)備的時候可不填,但是多臺設(shè)備就需要填了。比如:iproxy 8300 8100?103fc866d685f37dae974ca9cffa7262451d6383?
eg:
????????????????????# 使用--HEAD安裝最新版本
????????????????????$ brew install libimobiledevice --HEAD
????????????????????$ iproxy 8300 8100 -----回車后 直接在網(wǎng)站中輸入http://localhost:8300/status即可



??xcode打包報錯: Showing All Messages Command CodeSign failed with a nonzero exit code
---解決:如下圖所示進行操作后再次編譯,錯誤就會消失。還不行的話重啟Xcode后再重試,錯誤就會消失。

??執(zhí)行 “sh ./Scripts/bootstrap.sh”時報錯:ERROR in ./js/app.js Module parse failed:/app.js Unexpected token...如下圖所示:

----解決:
????????????a、修改Inspector下webpack.config.js文件
????????????b、去掉babel-loader配置后的,“exclude: /node_modules/”,如下圖:
????????????c、刪除Inspector下node_modules文件夾
????????????d、重新執(zhí)行 “sh ./Scripts/bootstrap.sh”,即可成功。

