NativeScript / NativeScript/nativescript-cli

tns test android no reachable hosts

未關閉
#5,167 7 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
JavaScript
星號
1.1k
分支
204
平均合併
1 天 9 小時
30 天內合併 PR
8

描述

Environment

  • CLI: 6.2.2
  • Cross-platform modules: 6.2.1
  • Android Runtime: 6.2.0
  • iOS Runtime: n/a
  • Plugin(s):

Describe the bug && Reproduction
I'm experiencing the same issue outlined in #4119.

Run tns test android with usesCleartextTraffic=false, the test app shows "no reachable hosts". Setting usesCleartextTraffic=true allows the tests to execute.

I don't want to set usesCleartextTraffic to true with my production application, so I'm wondering how I get around this.

Expected behavior
I expect the tests to run 😄

Additional context
This was supposed to be resolved with this pull request. I see that there is an AndroidManifest.xml file in those changes, and I'm wondering if that is supposed to override the settings in my application's manifest
https://github.com/NativeScript/nativescript-unit-test-runner/pull/30

package.json

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先使用 tns test androidusesCleartextTraffic=false 重現問題,接著檢查 pull request #30 中參照的 AndroidManifest.xml 變更,並將其與應用程式的資訊清單行為進行比較。當 Android 測試不需要在正式應用程式中要求 usesCleartextTraffic=true 即可執行時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
android, javascript
領域
cli, mobile-dev, testing-qa
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。